Re: [Tutor] (no subject)

2008-10-01 Thread Pierre Dagenais
Timothy Grant wrote: On Tue, Sep 30, 2008 at 10:20 PM, Pierre Dagenais <[EMAIL PROTECTED]> wrote: kayla bishop wrote: I can't figure out how to write a program where you flip a coin 100 times and it keeps track of how many heads and tails you flipped but it has to be random. Can you ple

Re: [Tutor] python: can't open file 'test.py' : [Errno 2] No such file or directory

2008-10-01 Thread Pierre Dagenais
Timothy Grant wrote: On Tue, Sep 30, 2008 at 9:01 PM, Pierre Dagenais <[EMAIL PROTECTED]> wrote: Timothy Grant wrote: On Tue, Sep 30, 2008 at 12:58 PM, Pierre Dagenais <[EMAIL PROTECTED]> wrote: The file test.py is in I:\Python25\MyCode, if I enter: C:\>Python25\MyCode\python

Re: [Tutor] python: can't open file 'test.py' : [Errno 2] No such file or directory

2008-10-01 Thread Alan Gauld
"Pierre Dagenais" <[EMAIL PROTECTED]> wrote The file test.py is in I:\Python25\MyCode, There is an inconsistency here. You say at this point that the drive is I I've set the environment variable pythonpath as C:\>set pythonpath = C:\\Python25\\MyCode But here you add a folder in the C d

[Tutor] Idle and windows XP firewall

2008-10-01 Thread David Holland
At work I have windows XP service pack 3 and although I have sys admin I can not use idle. I have googled but no success - any ideas? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] python: can't open file 'test.py' : [Errno 2] No such file or directory

2008-10-01 Thread Alan Gauld
"Pierre Dagenais" <[EMAIL PROTECTED]> wrote Yes Tim, but both PATH and PYTHONPATH are set to \python25 and \python25\MyCode, so I don't understand why python searches the CWD but neither the path nor pythonpath directories. Because that's how Windows works, its how Bill Gates decided it sho

[Tutor] Heads & Tails was Re: (no subject)

2008-10-01 Thread Alan Gauld
"kayla bishop" <[EMAIL PROTECTED]> wrote Please use a sensible subject line I can't figure out how to write a program where you flip a coin 100 times and it keeps track of how many heads and tails you flipped but it has to be random. This sounds like homework so we cannot give you a soluti

Re: [Tutor] (no subject)

2008-10-01 Thread Kent Johnson
On Wed, Oct 1, 2008 at 3:55 AM, Pierre Dagenais <[EMAIL PROTECTED]> wrote: > Timothy Grant wrote: > If that's what it is, and I thought it might be, he won't learn how to > program but on exam day he'll realize that cheating is very expensive. A > great lesson to learn early in life if possible. O

Re: [Tutor] (no subject)

2008-10-01 Thread bhaaluu
Since an answer has already been given (by Pierre Dagenais), let's see if we can help you "figure it out". The first step is to read the program specification, or, in your case, read the homework problem very carefully. Since most computer programs have INPUT, PROCESS, and OUTPUT, let's try to loo

[Tutor] PyCon 2009 (US) - Call for Tutorials

2008-10-01 Thread Greg Lindstrom
The period for submitting tutorial proposals for Pycon 2009 (US) is open and will continue through Friday, October 31th. This year features two "pre-conference" days devoted to tutorials on Wednesday March 25 & Thursday March 26 in Chicago. This allows for more classes than ever. Tutorials are 3-h

Re: [Tutor] unable to import Image module from my application

2008-10-01 Thread Emile van Sebille
ShivKumar Anand wrote: I am using Python Image library on windows and it is running well. I am using RHEL E4 on another machine and when I installed "python-imaging-1.1.6-2.el4.rf.i386.rpm", still i am not able to call the Image and ImagOps modules from my application on this Linux machine.

Re: [Tutor] Idle and windows XP firewall

2008-10-01 Thread David Holland
The program does not start up.  I think it is a firewall issue but I am having problems changing my firewall to allow idle. --- On Wed, 1/10/08, Kent Johnson <[EMAIL PROTECTED]> wrote: From: Kent Johnson <[EMAIL PROTECTED]> Subject: Re: [Tutor] Idle and windows XP firewall To: [EMAIL PROTECTED] D

Re: [Tutor] Idle and windows XP firewall

2008-10-01 Thread W W
Why would your firewall be blocking idle? Does idle connect to the internet? On Wed, Oct 1, 2008 at 8:21 AM, David Holland <[EMAIL PROTECTED]>wrote: > The program does not start up. I think it is a firewall issue but I am > having problems changing my firewall to allow idle. > > --- On *Wed, 1/1

Re: [Tutor] Text Scatter Plots?

2008-10-01 Thread R. Alan Monroe
> Is there a text graphics module that does say scatter plots or > histograms? I'm thinking of stuff prior to the graphics era of > computing. I'm looking for something really simple. Here's a quick and dirty way to do basic histogram of dice rolls: import random rolls={} for x in range(1)

Re: [Tutor] Idle and windows XP firewall

2008-10-01 Thread Lie Ryan
, mendacious, violent, lascivious, lazy, cowardly: every > weakness, > every vice, has found its defenders, its rhetoric, its ennoblement and > exaltation, but stupidity hasn't. - Primo Levi > -- next part -- > An HTML attachment was scrubbed... > URL:

Re: [Tutor] unable to import Image module from my application

2008-10-01 Thread Emile van Sebille
Emile van Sebille wrote: To verify a path problem, add sys.path.append('/usr/lib/Python2.4/site-packages//usr/lib/Python2.4/site-packages') erhhmmm... sys.path.append('/usr/lib/Python2.4/site-packages/Imaging1.1.4') EvS ___ Tutor maillist - Tuto

[Tutor] sample python twill scripts?

2008-10-01 Thread jeremiah
Just wondering if anyone here would be interested in sharing a python twill script? I'd just like to take a gander at how others are engineering their scripts. Thanks, JJ Disclaimer: The information contained in this transmission, including any attachments, may contain confidential informatio

Re: [Tutor] Idle and windows XP firewall

2008-10-01 Thread Alan Gauld
"W W" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Why would your firewall be blocking idle? Does idle connect to the internet? It connects to itself via a socket. But I thought that problem had been fixed several releases ago... On Wed, Oct 1, 2008 at 8:21 AM, David Holland

Re: [Tutor] python: can't open file 'test.py' : [Errno 2] No such file or directory

2008-10-01 Thread Pierre Dagenais
If you're right about having to give the full path, and I suspect you are, Then this means that python knows to search the currennt working directory for the file to execute, but nowhere else. Correct, just like every other program. If you run notepad foo.txt notepad will open a new foo.txt

Re: [Tutor] (no subject)

2008-10-01 Thread Pierre Dagenais
kayla bishop wrote: ok i imported the random module and set it up with a 2... i can't get it to loop correctly to where it keeps going until the total of heads and tails is 100> Date: Wed, 1 Oct 2008 00:18:51 -0400> From: [EMAIL PROTECTED]> CC: tutor@python.org> Subject: Re: [Tutor] (no subject)>

Re: [Tutor] (no subject)

2008-10-01 Thread bhaaluu
Correction of post typo follows. On Wed, Oct 1, 2008 at 8:57 AM, bhaaluu <[EMAIL PROTECTED]> wrote: > > #Now, let's flip the coin (PROCESS). > > while count != 0: >#each time through the loop, flip will randomly choose a side of the coin >flip = random.choice(coin) >#if/else select

[Tutor] Finding the "streaks" in heads/tails list

2008-10-01 Thread Alec Henriksen
Hello, I thought it'd be cool to write a program for my logic/critical thinking class, and right now we're evaluating randomness - and the deception of it. A previous post inspired it - coin flipping. So, I've written a program that flips a coin 1000 times and records it all in a dictionary, like

Re: [Tutor] (no subject)

2008-10-01 Thread Kent Johnson
On Wed, Oct 1, 2008 at 4:15 PM, Pierre Dagenais <[EMAIL PROTECTED]> wrote: > I didn't realize the list had a policy, I'm sorry for breaking it. Were can > I read it? ignorance not being an excuse. Hmm, it doesn't seem to be written down. I'll have to add it to the list info page and the welcome m

Re: [Tutor] Finding the "streaks" in heads/tails list

2008-10-01 Thread Kent Johnson
On Wed, Oct 1, 2008 at 4:56 PM, Alec Henriksen <[EMAIL PROTECTED]> wrote: > Hello, > > I thought it'd be cool to write a program for my logic/critical thinking > class, and right now we're evaluating randomness - and the deception of > it. A previous post inspired it - coin flipping. > > So, I've w

[Tutor] newbee needs direction

2008-10-01 Thread Michael yaV
Here is my problem and my coding knowledge consists of html. I have all the time in the world to play with this so I thought I would at least ask how to get started. I want to create a web base program that would output team standings. The only given will be the names of each team and their d

Re: [Tutor] Finding the "streaks" in heads/tails list

2008-10-01 Thread Danny Yoo
> Regular expressions are for processing strings, not loops. >From a theoretical point of view, this isn't quite true: regular expressions can deal with sequences of things. It's true that most regular expression libraries know how to deal only with characters, but that's a matter of specializing

Re: [Tutor] Finding the "streaks" in heads/tails list

2008-10-01 Thread Kent Johnson
On Wed, Oct 1, 2008 at 6:00 PM, Danny Yoo <[EMAIL PROTECTED]> wrote: >> Regular expressions are for processing strings, not loops. > > From a theoretical point of view, this isn't quite true: regular > expressions can deal with sequences of things. Sheesh! OK, *Python* regular expressions are for

Re: [Tutor] Finding the "streaks" in heads/tails list

2008-10-01 Thread Alan Gauld
"Kent Johnson" <[EMAIL PROTECTED]> wrote What I want to do, is find out the largest "streak" of digits. In the above example, the streak would be 5, because there are 5 tails flips in a row. I would loop through the list with a for loop, keeping track of the last value seen and the current

Re: [Tutor] newbee needs direction

2008-10-01 Thread Alan Gauld
"Michael yaV" <[EMAIL PROTECTED]> wrote Here is my problem and my coding knowledge consists of html. OK, The first step is to pause your project long enough to learn the basics of programming - with Python since you are asking on a Python list! :-) I want to create a web base program that wou

Re: [Tutor] newbee needs direction

2008-10-01 Thread Michael Waltemeyer
Thanks Alan. On Oct 1, 2008, at 8:37 PM, Alan Gauld wrote: "Michael yaV" <[EMAIL PROTECTED]> wrote Here is my problem and my coding knowledge consists of html. OK, The first step is to pause your project long enough to learn the basics of programming - with Python since you are asking on a P