>> Near as I can tell, I got rid of the permissions error, the ZipFile
>> error with the missing capital 'F'
>> Now I need to 'get into' the non zipped folder of each student and
>> unzip any and all zips that are inside of it.
>
>
> The error message says 'No such file or directory'. That means th
On 25 September 2012 00:33, Gregory Lund wrote:
>
> z.extractall(outDir)
>
> zipContents = z.namelist()
> print zipContents
> z.close()
>
> for item in zipContents:
> if item.endswith('.zip'):
> x = zipfile.ZipFile(item,'r')
> x.extractall()
> x.close()
>
> Traceback (m
On 25/09/12 00:31, Benjamin Fishbein wrote:
Last login: Mon Sep 24 18:27:48 on ttys000
Benjamins-MacBook-Air:~ bfishbein$ cd
'/Users/bfishbein/Documents/Python in Use/' &&
'/usr/local/bin/pythonw' '/Users/bfishbein/Documents/Python in
Use/BB.py' && echo Exit status: $? && e
> No but Python did when it ran your code and it tried to tell you. The trick
> is to read the error message, see what line of code it occurs at and then
> look very closely at that line of code and the surrounding lines of code.
> The first thing to check for is a typo.
To be honest, I did check
>
> Can you start up a terminal window then try to run your program and finally
> paste the whole session into a mail and post it here?
>
> That should help.
> If your program is complex try a simple one like:
>
> print ('Hello world')
> input('Hit enter to quit...')
Last login: Mon Sep 24 18:
On Mon, Sep 24, 2012 at 7:25 PM, Dwight Hutto wrote:
> On Mon, Sep 24, 2012 at 7:13 PM, Alan Gauld wrote:
>> On 24/09/12 20:13, Aija Thompson wrote:
>>>
>>> Hi!
>>>
>>> So I've been working on this question for hours! And Python keeps giving
>>> me an error saying that my syntax for BMI is wrong.
On Mon, Sep 24, 2012 at 7:13 PM, Alan Gauld wrote:
> On 24/09/12 20:13, Aija Thompson wrote:
>>
>> Hi!
>>
>> So I've been working on this question for hours! And Python keeps giving
>> me an error saying that my syntax for BMI is wrong. I really can't
>> understand why.
>
>
I'd suggest an editor,
On 24/09/12 20:13, Aija Thompson wrote:
Hi!
So I've been working on this question for hours! And Python keeps giving
me an error saying that my syntax for BMI is wrong. I really can't
understand why.
So send us the full error text not a summary.
If Python reports a syntax its usually recorde
On 24/09/12 17:41, Benjamin Fishbein wrote:
Hello. I can run programs in IDLE but when I try to do it in a terminal or with
textwrangler, it usually just logs out and says it's completed, but the program
hasn't been run. This is particularly so when the program uses urllib. I'm
using OS X.
lo
Note: attributions might be a bit off due to the way this was sent.
Dwight Hutto wrote:
>
> Dwight,
>
> Please stop responding to Mark. His behaviour is typical schoolyard
> bully, meaning he's saying things precisely because he gets a reaction
> from you. He probably doesn't even realise th
On Mon, Sep 24, 2012 at 9:41 AM, Benjamin Fishbein
wrote:
> Hello. I can run programs in IDLE but when I try to do it in a terminal or
> with textwrangler, it usually just logs out and says it's completed, but the
> program hasn't been run. This is particularly so when the program uses
> urllib
On 24 September 2012 22:15, Gregory Lund wrote:
> >> but now get a " x = zipfile.Zipfile(item,'r')
> >> AttributeError: 'module' object has no attribute 'Zipfile' "
> >>
> >> error
> >>
> >> gr, this is going to send me to the funny farm!
> >>
> >> greg
> >>
> > One way to avoid the "funny
>
> Capital F. ZipFile not Zipfile.
>
Keyboard - Forehead - SCHMACK.
(and hand/forehead smack.)
DOH!
Thank you.
Greg
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
>> but now get a " x = zipfile.Zipfile(item,'r')
>> AttributeError: 'module' object has no attribute 'Zipfile' "
>>
>> error
>>
>> gr, this is going to send me to the funny farm!
>>
>> greg
>>
> One way to avoid the "funny farm" is to learn to use the tools that
> Python provides, built-in.
On 09/24/2012 04:56 PM, Aija Thompson wrote:
>
> Hi,
By top-posting, you lose all the context. The convention is to quote
those parts of the previous messages necessary to understand the
context, and then add your own remarks immediately after the appropriate
parts.
> Yeah this is my first ass
Hi,
Yeah this is my first assignment and I've never worked on anything programming
before.
I am working in Python 2.7
The shorter and longer months thing is just a not to myself, that is why it has
the hash tag before he sentence.
But my initial plan was to make a string of months and a string o
Dwight,
Please stop responding to Mark. His behaviour is typical schoolyard
bully, meaning he's saying things precisely because he gets a reaction
from you. He probably doesn't even realise that he's doing it
consciously, but either way the best way to deal with such behaviour
is to stop giving
On 09/24/2012 03:20 PM, Aija Thompson wrote:
> Hi!
> I've been working on this question for a long time and for some reason it's
> just not clicking.
> I'm not sure if my loop for the question is the right one, or if I'm even on
> the right track.
> We're supposed to make a program that counts
Aija Thompson wrote:
> Hi!
>
> I've been working on this question for a long time and for some reason it's
> just not clicking.
>
> I'm not sure if my loop for the question is the right one, or if I'm even on
> the right track.
>
> We're supposed to make a program that counts the number of days
On Mon, Sep 24, 2012 at 4:24 PM, Dwight Hutto wrote:
> On Mon, Sep 24, 2012 at 3:20 PM, Aija Thompson
> wrote:
>> Hi!
>>
>> I've been working on this question for a long time and for some reason it's
>> just not clicking.
>
> Algorithm is the appropriate approach. That's what makes it click.
>
>
On Mon, Sep 24, 2012 at 3:20 PM, Aija Thompson wrote:
> Hi!
>
> I've been working on this question for a long time and for some reason it's
> just not clicking.
Algorithm is the appropriate approach. That's what makes it click.
>
> I'm not sure if my loop for the question is the right one, or if
On 24/09/2012 20:20, Aija Thompson wrote:
Hi!
I've been working on this question for a long time and for some reason it's
just not clicking.
I'm not sure if my loop for the question is the right one, or if I'm even on
the right track.
We're supposed to make a program that counts the number of
Aija Thompson wrote:
> Hi!
>
> So I've been working on this question for hours! And Python keeps giving me an
> error saying that my syntax for BMI is wrong. I really can't understand why.
>
> So this is what I have so far:
One suggestion: immediately convert to appropriate number type
instead
On Mon, Sep 24, 2012 at 3:13 PM, Aija Thompson wrote:
>
> ft, inches = h. split("'")
> h_sum = float(12*int(ft)) + (int(inches.strip('"'))
Leave h_sum as an int:
h_sum = 12 * int(ft) + int(inches.strip('"'))
A better name here would be "h_inch". Also, make sure your parentheses
are closed.
On 24/09/2012 20:15, Aija Thompson wrote:
I'm sorry, I have no idea how this has any reference to my Python question...
Please accept my apologies for getting completely off topic on your thread.
--
Cheers.
Mark Lawrence.
___
Tutor maillist - T
Hi!
I've been working on this question for a long time and for some reason it's
just not clicking.
I'm not sure if my loop for the question is the right one, or if I'm even on
the right track.
We're supposed to make a program that counts the number of days into the year
it is if you input a d
On Sep 24, 2012, at 3:16 PM, Aija Thompson wrote:
Hi!
So I've been working on this question for hours! And Python keeps giving me
an error saying that my syntax for BMI is wrong. I really can't understand
why.
So this is what I have so far:
w = raw_input('Please give your weight in lbs: ')
h
I'm sorry, I have no idea how this has any reference to my Python question...
> To: tutor@python.org
> From: breamore...@yahoo.co.uk
> Date: Mon, 24 Sep 2012 20:16:39 +0100
> Subject: Re: [Tutor] Sudoku
>
> On 24/09/2012 17:52, Walter Prins wrote:
> > Mark,
> >
> > On 23 September 2012 22:53, Ma
Hi!
So I've been working on this question for hours! And Python keeps giving me an
error saying that my syntax for BMI is wrong. I really can't understand why.
So this is what I have so far:
w = raw_input('Please give your weight in lbs: ')h = raw_input('Now your height
in feet and inches: ')h.
On 24/09/2012 17:52, Walter Prins wrote:
Mark,
On 23 September 2012 22:53, Mark Lawrence wrote:
Is the personal sniping really necessary? (That's a rhetorical
question, just to be clear.)
Well if Dwight insists on replying to something without quoting the context
so the rest of us haven't t
On 24 September 2012 17:41, Benjamin Fishbein wrote:
> Hello. I can run programs in IDLE but when I try to do it in a terminal or
> with textwrangler, it usually just logs out and says it's completed, but
> the program hasn't been run. This is particularly so when the program uses
> urllib. I'm u
On Mon, Sep 24, 2012 at 6:02 AM, Albert-Jan Roskam wrote:
>
> I have three classes, Generic, Test and Test2. Generic contains a load
> method that loads a file. This may only be done once, as a
> file_read_open error is returned if the file is open already and an
> attempt is made to re-open it. T
Mark,
On 23 September 2012 22:53, Mark Lawrence wrote:
>> Is the personal sniping really necessary? (That's a rhetorical
>> question, just to be clear.)
>
> Well if Dwight insists on replying to something without quoting the context
> so the rest of us haven't the faintest idea what he's talking
Hello. I can run programs in IDLE but when I try to do it in a terminal or with
textwrangler, it usually just logs out and says it's completed, but the program
hasn't been run. This is particularly so when the program uses urllib. I'm
using OS X.
logout
[Process completed]
That's what it pri
Albert-Jan Roskam wrote:
> Hi Pythonistas,
>
> I have three classes, Generic, Test and Test2. Generic contains a load
> method that loads a file. This may only be done once, as a file_read_open
> error is returned if the file is open already and an attempt is made to
> re-open it. The file may be
Hi Pythonistas,
I have three classes, Generic, Test and Test2. Generic contains a load method
that loads a file. This may only be done once, as a file_read_open error is
returned if the file is open already and an attempt is made to re-open it. The
file may be opened from Test or Test2. After a
36 matches
Mail list logo