Re: [Tutor] File Input of "Objects"

2005-06-01 Thread Wolfram Kraus
Chuck Allison wrote: > Hello tutor, > > I notice that with 'print >> f' one can print the string > representation of objects to a file. Is there a corresponding input > facility that parses through a file creating objects? I can't find > one. In the meantime, I did this: > > f = open

Re: [Tutor] List processing

2005-06-01 Thread Alan G
> I have a load of files I need to process. Each line of a file looks > something like this: > > eYAL001C1 Spar 81 3419 4518 4519 2 1 > > So basically its a table, separated with tabs. What I need to do is make a > new file where all the entries in the table are those where the values in > columns

Re: [Tutor] List processing

2005-06-01 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > Hi, > > I have a load of files I need to process. Each line of a file looks > something like this: > > eYAL001C1 Spar81 3419451845192 1 > > So basically its a table, separated with tabs. What I need to do is make a > new file whe

Re: [Tutor] imbedding python into another program?

2005-06-01 Thread Danny Yoo
On Wed, 1 Jun 2005, Jeff Peery wrote: > ok, thanks! that helps. I have an application that reads a data file, > crunches some numbers, and spits out some graphs. In addition to this I > would also like users to be able to write small python scripts to > operate on the data that is available wi

Re: [Tutor] imbedding python into another program?

2005-06-01 Thread Jeff Peery
ok, thanks! that helps.  I have an application that reads a data file, crunches some numbers, and spits out some graphs.  In addition to this I would also like users to be able to write small python scripts to operate on the data that is available within the program. I suppose this could be accompl

Re: [Tutor] List processing

2005-06-01 Thread Terry Carroll
On 1 Jun 2005 [EMAIL PROTECTED] wrote: > eYAL001C1 Spar81 3419451845192 1 > > So basically its a table, separated with tabs. What I need to do is make > a new file where all the entries in the table are those where the values > in columns 1 and 5 were present

Re: [Tutor] imbedding python into another program?

2005-06-01 Thread André Roberge
Jeff Peery wrote: > hello, is it possible to add something like the python IDLE into > another program, say if I wanted to simply run scripts from within a > wxPython program? Could someone point me to the correct reference? > thanks. > Hi Jeff, you may want to have a look at PyCr

[Tutor] File Input of "Objects"

2005-06-01 Thread Chuck Allison
Hello tutor, I notice that with 'print >> f' one can print the string representation of objects to a file. Is there a corresponding input facility that parses through a file creating objects? I can't find one. In the meantime, I did this: >>> f = open('out.dat','w') >>> print >> f, 1, 2 >

Re: [Tutor] List processing

2005-06-01 Thread Danny Yoo
On 1 Jun 2005 [EMAIL PROTECTED] wrote: > I have a load of files I need to process. [text cut] > So basically its a table, separated with tabs. What I need to do is make > a new file where all the entries in the table are those where the values > in columns 1 and 5 were present as a pair more t

Re: [Tutor] imbedding python into another program?

2005-06-01 Thread Danny Yoo
On Wed, 1 Jun 2005, Jeff Peery wrote: > hello, is it possible to add something like the python IDLE into another > program Hi Jeff, Getting IDLE to work within wxPython is technically possible, but probably a little tricky, since it'll involve getting the GUI event loops to cooperate. I belie

[Tutor] List processing

2005-06-01 Thread cgw501
Hi, I have a load of files I need to process. Each line of a file looks something like this: eYAL001C1 Spar81 3419451845192 1 So basically its a table, separated with tabs. What I need to do is make a new file where all the entries in the table are those

[Tutor] imbedding python into another program?

2005-06-01 Thread Jeff Peery
hello, is it possible to add something like the python IDLE into another program, say if I wanted to simply run scripts from within a wxPython program? Could someone point me to the correct reference? thanks.   Jeff___ Tutor maillist - Tutor@python.or

Re: [Tutor] Win32 Question

2005-06-01 Thread Alan G
> this line causes the error given above -> process.GetOwner() > #apply( process.GetOwner ) I may be barking up the wrong tree but why not just call process.GetOwner() directly? Why use apply() at all? Or is that what the comment means? That you get an error when you try to use

Re: [Tutor] Strange IndexError

2005-06-01 Thread Alan G
> Traceback (most recent call last): > File "NeedBrain.py", line 233, in update > self._isNearMarker = self._markerDist < self.STAY_MIN_DIST > IndexError: tuple assignment index out of range > > I don't see, where tuples are involved. I only compare two floats. I've Python > 2.3.4. Usually w

[Tutor] Process control and capturing output

2005-06-01 Thread Connor . Smith
Hi there - I'm trying to capture the output of a long-running command in the background (it's a CVS rdiff on a fairly big repository).  I need to capture the stdout from this command, and then parse it later for a report Defining the function: def rdiffApp (targetModule, buildFromStamp, buildT

[Tutor] Win32 Question

2005-06-01 Thread Gooch, John
I am not sure if there is a better list to ask this question on, but here it is: I have a Python script that works fine for accessing WMI ( Windows Management Interface ) class properties, but it does not let me access any of their methods. The code below works fine with Win32_Process objects unl

Re: [Tutor] Variations on putpixel - More Pixel manipulation - #14

2005-06-01 Thread D. Hartley
Nevermind! Off by one. Man, that feels dumb! Thanks for your patience, everyone, and for all your hints! ~Denise ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Variations on putpixel - More Pixel manipulation - #14

2005-06-01 Thread D. Hartley
In working out the "two different iterations at once" part, I decided to do the following: function that creates a "tolist" (a list of coordinate-pair-tuples, incremented in the correct way to go around in the direction I want) and then a for loop to iterate one by one over the wire.png (the "fro

Re: [Tutor] IDLE not working?

2005-06-01 Thread Danny Yoo
On Wed, 1 Jun 2005, Jeff Peery wrote: > Hello, I upgraded python to 2.4 and now my IDLE isn't working. There is > an error indicating something is wrong with my configuration file for > the IDLE settings. Any suggestions for how to solve this problem would > be much appreciated. thanks. Hi Jeff

Re: [Tutor] Strange IndexError

2005-06-01 Thread Danny Yoo
On Wed, 1 Jun 2005, Willi Richert wrote: > in my code I get in rare occasions an IndexError which is > incomprehensible to me in that situation, where I do a simple > comparison: > > NeedBrain.py:233: RuntimeWarning: tp_compare didn't return -1 or -2 for > exception > self._isNearMarker = self

[Tutor] IDLE not working?

2005-06-01 Thread Jeff Peery
Hello, I upgraded python to 2.4 and now my IDLE isn't working. There is an error indicating something is wrong with my configuration file for the IDLE settings. Any suggestions for how to solve this problem would be much appreciated. thanks.   Jeff___ Tut

[Tutor] securely transmitting data via email

2005-06-01 Thread Don Jennings
Goal: to securely transmit data (collected on a form on a secure web site) to recipient Possible solutions, thus far: 1) create web page accessible through HTTPS; email link to recipient, BUT that adds extra steps for him. I'd like it to be as transparent as possible (doesn't everyone? ; >)

Re: [Tutor] Planning a program with algorithm?

2005-06-01 Thread Mike Hansen
> > > Subject: > [Tutor] Planning a program with algorithm? > From: > ". ," <[EMAIL PROTECTED]> > Date: > Sun, 29 May 2005 19:21:33 + > To: > tutor@python.org > > To: > tutor@python.org > > > I know how to write a pro

[Tutor] Strange IndexError

2005-06-01 Thread Willi Richert
Hi, in my code I get in rare occasions an IndexError which is incomprehensible to me in that situation, where I do a simple comparison: NeedBrain.py:233: RuntimeWarning: tp_compare didn't return -1 or -2 for exception self._isNearMarker = self._markerDist < self.STAY_MIN_DIST Traceback (most

Re: [Tutor] Variations on putpixel - More Pixel manipulation - #14

2005-06-01 Thread Kent Johnson
D. Hartley wrote: > Rudy, > I have the im.getpixel incrementing at every pixel by i (in a for loop > for each pixel in wire.png), and I know incrementing the xy in the new > one goes like this: > > x + 1 > y + 1 > x - 1 > x - 1 > y - 1 > y - 1 > x + 1 > x + 1 > x + 1 ... etc > > First the x and t