Re: [Tutor] gui further explained

2009-06-10 Thread Wayne
On Tue, Jun 9, 2009 at 10:31 PM, Essah Mitges wrote: > i don't know if its what i am searching that is wrong but what i am trying > to do is > link my game i made in pygame to my pygame menu the menu has 4 button > classes on it one foe instruction one to quit one for high scores and one to > sta

Re: [Tutor] Help running a simple python script for one time operation (noob)

2009-06-10 Thread Wayne
On Tue, Jun 9, 2009 at 11:57 PM, Melinda Roberts wrote: > Hi - > > I would like to export a large amount of data from ExpressionEngine to > Wordpress, and have had lots of trouble finding something that isn't miles > over my head. I did find these three scripts, which seem to be perfect for > thi

Re: [Tutor] recursive glob -- recursive dir walk

2009-06-10 Thread Sander Sweers
2009/6/10 spir : > A foolow-up ;-) from previous question about glob.glob(). Hopefully no misunderstanding this time :-) > I need to 'glob' files recursively from a top dir (parameter). Tried to use > os.walk, but the structure of its return value is really unhandy for such a > use (strange, be

Re: [Tutor] recursive glob -- recursive dir walk

2009-06-10 Thread Kent Johnson
On Wed, Jun 10, 2009 at 2:28 AM, spir wrote: > Hello, > > A foolow-up ;-) from previous question about glob.glob(). > > I need to 'glob' files recursively from a top dir (parameter). Tried to use > os.walk, but the structure of its return value is really unhandy for such a > use (strange, because

Re: [Tutor] recursive glob -- recursive dir walk

2009-06-10 Thread Martin Walsh
spir wrote: > Hello, > > A foolow-up ;-) from previous question about glob.glob(). > > I need to 'glob' files recursively from a top dir (parameter). Tried to use > os.walk, but the structure of its return value is really unhandy for such a > use (strange, because it seems to me this precise us

Re: [Tutor] gui further explained

2009-06-10 Thread Jacob Mansfield
does anyone know how to make a parallel or serial interface with respective software, i would prefer parallel because it is easy to utilise ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] gui further explained

2009-06-10 Thread A.T.Hofkamp
Jacob Mansfield wrote: does anyone know how to make a parallel or serial interface with respective software, i would prefer parallel because it is easy to utilise Both the serial and the parallel interface seem to be covered by pyserial http://pyserial.wiki.sourceforge.net and http://pyserial.

[Tutor] GUI recommendations/tutorials?

2009-06-10 Thread taserian
I think I'm ready to start working with some simple graphic output. Currently, I've got the basics of a Python program that calculates full tours of a honeycomb structure, going through each cell exactly once. The output from the program shows the paths as coordinates of each cell; what I'd like to

Re: [Tutor] GUI recommendations/tutorials?

2009-06-10 Thread bhaaluu
Have you looked at PyGame yet? http://www.pygame.org/ On Wed, Jun 10, 2009 at 12:05 PM, taserian wrote: > I think I'm ready to start working with some simple graphic output. > Currently, I've got the basics of a Python program that calculates full > tours of a honeycomb structure, going through ea

Re: [Tutor] What is nntp news reader address for this mailing list?

2009-06-10 Thread ayyaz
testing again ayyaz wrote: Testing "Zia" wrote in message news:h0mqv0$b0...@ger.gmane.org... Thanks It works now. http://www.parglena.co.uk/outlookexpress.htm -Zia "Emile van Sebille" wrote in message news:h0mpjl$7b...@ger.gmane.org... On 6/9/2009 3:38 PM Mohammad Khawar Zia said... Hell

Re: [Tutor] GUI recommendations/tutorials?

2009-06-10 Thread Wayne
On Wed, Jun 10, 2009 at 11:05 AM, taserian wrote: > I think I'm ready to start working with some simple graphic output. > Currently, I've got the basics of a Python program that calculates full > tours of a honeycomb structure, going through each cell exactly once. The > output from the program s

Re: [Tutor] question about class

2009-06-10 Thread Lie Ryan
Vincent Davis wrote: > Thanks again for the help, A little followup. > For my applicant class I have a few initial values that need to be set > but I what to choose the value (actually the calculation to set the > value) for each applicant (instance?) > Here is the start of my Applicant Class > >

Re: [Tutor] vpython compatibility

2009-06-10 Thread Kent Johnson
On Wed, Jun 10, 2009 at 1:52 PM, roberto wrote: > and last question: may python 3.0 and 2.6 be installed on the same pc ? Yes, no problem. Kent ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] vpython compatibility

2009-06-10 Thread roberto
On Sun, Jun 7, 2009 at 8:05 PM, Emile van Sebille wrote: > On 6/7/2009 10:48 AM roberto said... >> >> hello >> i have a short question: >> is vpython usable in conjunction with python 3.0 ? >> > > This is likely better answered by the vpython crowd -- I've not used or > previously hear of vpython,

[Tutor] Parse Text File

2009-06-10 Thread Stefan Lesicnik
Hi Guys, I have the following text [08 Jun 2009] DSA-1813-1 evolution-data-server - several vulnerabilities {CVE-2009-0547 CVE-2009-0582 CVE-2009-0587} [etch] - evolution-data-server 1.6.3-5etch2 [lenny] - evolution-data-server 2.22.3-1.1+lenny1 [04 Jun 2009] DSA-1812-1 ap

[Tutor] Need help solving this problem

2009-06-10 Thread Raj Medhekar
I have been teaching myself Python using a book. The chapter I am on currently, covers branching, while loops and program planning. I am stuck on on of the challenges at the end of this chapter, and I was hoping to get some help with this. Here it is: Write a program that flips a coin 100 times

Re: [Tutor] Need help solving this problem

2009-06-10 Thread Albert-jan Roskam
hi! This is how I would do it, but I'm still learning this too, so I'm very much open for suggestions. Cheers!! Albert-Jan import random def draw (): return random.sample(["head", "tail"], 1) def toss (): heads, tails = 0, 0 for flip in range(100): if draw() == ["head"]: he

Re: [Tutor] Need help solving this problem

2009-06-10 Thread Robert Berman
What you are looking at is a simulation whereby a coin having 2 outcomes (heads or tails) is flipped exactly 100 times. You need to tell how many times the coin falls heads up and how many times the coin falls tails up. First become familiar with the random module. Assign a value of 1 for heads a

Re: [Tutor] Parse Text File

2009-06-10 Thread Eduardo Vieira
On Wed, Jun 10, 2009 at 12:44 PM, Stefan Lesicnik wrote: > Hi Guys, > > I have the following text > > [08 Jun 2009] DSA-1813-1 evolution-data-server - several vulnerabilities >     {CVE-2009-0547 CVE-2009-0582 CVE-2009-0587} >     [etch] - evolution-data-server 1.6.3-5etch2 >     [lenny

Re: [Tutor] Need help solving this problem

2009-06-10 Thread karma
Hi Raj, I'm another learner, I used the following: >>> def toss(n): heads = 0 for i in range(n): heads += random.randint(0,1) return heads, n-heads >>> print "%d heads, %d tails" % toss(100) Best of luck in your python endeavors! 2009/6/10 Raj Medhekar :

Re: [Tutor] python and serial port

2009-06-10 Thread Alan Gauld
"Ranjeeth P T" wrote I am new to python i want to communicate i.e send and receive b/n an arm device and pc via a serial port, and "Jacob Mansfield" wrote does anyone know how to make a parallel or serial interface with respective software, i would prefer parallel because it is easy to ut

Re: [Tutor] gui

2009-06-10 Thread Essah Mitges
thx lol fixed part of the problem > To: tutor@python.org > From: lie.1...@gmail.com > Date: Wed, 10 Jun 2009 13:24:48 +1000 > Subject: Re: [Tutor] gui > > Essah Mitges wrote: >> 1. >> Traceback (most recent call last): >> 2. >> File "C:\Users\John Doe\Desk

Re: [Tutor] GUI recommendations/tutorials?

2009-06-10 Thread Alan Gauld
"taserian" wrote My problem is that I have no GUI experience outside of Visual Studio-style drag-and-drop IDEs. Which Python GUI system would you recommend for neophytes that would allow line drawing and a simple graphic load of a honeycomb structure in a JPG, for example, as a background?

Re: [Tutor] Need help solving this problem

2009-06-10 Thread David
Raj Medhekar wrote: I have been teaching myself Python using a book. The chapter I am on currently, covers branching, while loops and program planning. I am stuck on on of the challenges at the end of this chapter, and I was hoping to get some help with this. Here it is: Write a program that

Re: [Tutor] Need help solving this problem

2009-06-10 Thread Alan Gauld
"Raj Medhekar" wrote Write a program that flips a coin 100 times and the tells you the number of heads and tails. I have tried to think about several ways to go about doing this but I have hit a wall. Even though I understand the general concept of branching and looping, I have been having

Re: [Tutor] file/subprocess error

2009-06-10 Thread Wayne
On Wed, Jun 10, 2009 at 4:00 PM, Essah Mitges wrote: > > So no one is confused about the error i screenshot it I am not sure of the > problemWhen I run the game outside the menu it works fine but when I call it > as a child window it start then the modules attached cannnot load the games > images

Re: [Tutor] subprocess/files help

2009-06-10 Thread Wayne
On Wed, Jun 10, 2009 at 4:21 PM, Essah Mitges wrote: > > The problem I am have now is that once my game is initiated from the menu > file the modules that are with cannot import the imagesthe folder looks like > thisWODDSdataAll images and sound for gamegamelib > ObjectsU

Re: [Tutor] subprocess/files help

2009-06-10 Thread Essah Mitges
game runs fine out of the WODDS.py it when I start it from the menu lies the problemup-1.png is the first pic file used in the program so I'm guessing that all of the imported files from data have a problem if i took away up-1 up-2 would start a problem then side-1 and so on __

Re: [Tutor] file/subprocess error

2009-06-10 Thread Alan Gauld
"Essah Mitges" wrote So no one is confused about the error i screenshot it Thanks. I am not sure of the problem It says it can't find the file. Does a file C:\Users\John Doe\Desktop\WODDS\WODDS\gamelib\data\up-1.png actually exist? And is it readable by the user running the program? Whe

Re: [Tutor] Need help solving this problem

2009-06-10 Thread ayyaz
Raj Medhekar wrote: I have been teaching myself Python using a book. The chapter I am on currently, covers branching, while loops and program planning. I am stuck on on of the challenges at the end of this chapter, and I was hoping to get some help with this. Here it is: Write a program that

Re: [Tutor] file/subprocess error

2009-06-10 Thread Essah Mitges
But will it work I run 3 module for this game utilites is just 1 > To: tutor@python.org > From: alan.ga...@btinternet.com > Date: Wed, 10 Jun 2009 23:57:35 +0100 > Subject: Re: [Tutor] file/subprocess error > > "Essah Mitges" wrote >> So no one is confus

[Tutor] Syntax Error First Example

2009-06-10 Thread Randy Trahan
Hi, Just opened the book Python Programming, Second Edition by Michael Dawson and have my first question. Instead of the usual "Hello World" as the first example he asked to type this: print "Game Over" raw input("\n\nPress the enter key to exit.") First, I am suppose to put this in the script mo

Re: [Tutor] Syntax Error First Example

2009-06-10 Thread bob gailer
Randy Trahan wrote: Hi, Just opened the book Python Programming, Second Edition by Michael Dawson and have my first question. Instead of the usual "Hello World" as the first example he asked to type this: print "Game Over" raw input("\n\nPress the enter key to exit.") Try raw_input("\n\nPr

Re: [Tutor] Syntax Error First Example

2009-06-10 Thread Wayne
On Wed, Jun 10, 2009 at 9:12 PM, bob gailer wrote: > Randy Trahan wrote: > >> First, I am suppose to put this in the script mode vs the IDLE mode >> correct? He failed to mention where.. > > It really doesn't matter - although presumably he meant you to write a script instead of in the shell/int

Re: [Tutor] Syntax Error First Example

2009-06-10 Thread Lie Ryan
Randy Trahan wrote: > Hi, > Just opened the book Python Programming, Second Edition by Michael > Dawson and have my first question. Instead of the usual "Hello World" as > the first example he asked to type this: > > print "Game Over" > raw input("\n\nPress the enter key to exit.") > > First, I

Re: [Tutor] subprocess/files help

2009-06-10 Thread Lie Ryan
Essah Mitges wrote: > game runs fine out of the WODDS.py it when I start it from the menu lies the > problemup-1.png is the first pic file used in the program so I'm guessing > that all of the imported files from data have a problem if i took away up-1 > up-2 would start a problem then side-1 an

Re: [Tutor] XML: changing value of elements

2009-06-10 Thread Stefan Behnel
Hi, it's funny how many times I see Python users go: "I have an XML problem, so I'll use minidom." Because then they have two problems. Johan Geldenhuys wrote: > I have a rather complex XML file and I need to change some values inside > this file. > > So far I have been using minidom, but I can