Re: [Tutor] Docking Windows using Python

2009-05-29 Thread W W
On Fri, May 29, 2009 at 7:48 PM, Hi wrote: > My program will have two windows. I want to be able to dock the two so they > are side by side. I am wondering if this is doable in Python. If so, could > someone lead me to the right direction on where to look? Thank you very > much. > I think you co

Re: [Tutor] (no subject)

2009-05-29 Thread Lie Ryan
Gregory Morton wrote: > I'm having a problem understanding how this code works in lesson 4.4 on > the python tutorial. Can anyone explain it in easy-to-digest details? I > kind of know what most of the stuff means, but I can't comprehend how it > all works in unison. That, and I'm having a hard tim

[Tutor] (no subject)

2009-05-29 Thread Gregory Morton
I'm having a problem understanding how this code works in lesson 4.4 on the python tutorial. Can anyone explain it in easy-to-digest details? I kind of know what most of the stuff means, but I can't comprehend how it all works in unison. That, and I'm having a hard time understanding what break

[Tutor] Docking Windows using Python

2009-05-29 Thread Hi
My program will have two windows. I want to be able to dock the two so they are side by side. I am wondering if this is doable in Python. If so, could someone lead me to the right direction on where to look? Thank you very much. ___ Tutor maillist - Tut

Re: [Tutor] how to get variable from an external script or program

2009-05-29 Thread shawn bright
cool, thanks again sk On Fri, May 29, 2009 at 5:09 PM, Alan Gauld wrote: > > "vince spicer" wrote >> >> import commands >> output = commands.getout("ls -lah") > > There are many ways to do this in Python including os.popen, commands and > subprocess. > > But subprocess is the "officially correct

Re: [Tutor] how to get variable from an external script or program

2009-05-29 Thread Alan Gauld
"vince spicer" wrote import commands output = commands.getout("ls -lah") There are many ways to do this in Python including os.popen, commands and subprocess. But subprocess is the "officially correct" version, the others are deprecated and could theoretically disappear in a future ver

Re: [Tutor] how to get variable from an external script or program

2009-05-29 Thread shawn bright
kick butt, gents, thanks a lot sk On Fri, May 29, 2009 at 4:39 PM, W W wrote: > On Fri, May 29, 2009 at 4:27 PM, shawn bright wrote: >> >> Hey all >> >> I have a small program that when run from the command line, will >> return a certain value for an arguement. Like this: >> >> > mfetchz 45 >> >

Re: [Tutor] how to get variable from an external script or program

2009-05-29 Thread W W
On Fri, May 29, 2009 at 4:27 PM, shawn bright wrote: > Hey all > > I have a small program that when run from the command line, will > return a certain value for an arguement. Like this: > > > mfetchz 45 > > 45j > > so the program is mfetchz and the argument is 45 > > i know i can call the program

Re: [Tutor] how to get variable from an external script or program

2009-05-29 Thread vince spicer
Sorry *output import commands > output = commands.getoutput("ls -lah") > Vince > > > On Fri, May 29, 2009 at 3:27 PM, shawn bright wrote: > >> Hey all >> >> I have a small program that when run from the command line, will >> return a certain value for an arguement. Like this: >> >> > mfetchz 4

Re: [Tutor] how to get variable from an external script or program

2009-05-29 Thread vince spicer
import commands output = commands.getout("ls -lah") Vince On Fri, May 29, 2009 at 3:27 PM, shawn bright wrote: > Hey all > > I have a small program that when run from the command line, will > return a certain value for an arguement. Like this: > > > mfetchz 45 > > 45j > > so the program is mfet

[Tutor] how to get variable from an external script or program

2009-05-29 Thread shawn bright
Hey all I have a small program that when run from the command line, will return a certain value for an arguement. Like this: > mfetchz 45 > 45j so the program is mfetchz and the argument is 45 i know i can call the program with os.system("mfetchz 45") but how do i get the return? The OS is lin

Re: [Tutor] creating interactive program with python

2009-05-29 Thread Skipper Seabold
On Thu, May 28, 2009 at 7:43 PM, Andre Walker-Loud wrote: > Hi All, > > I am thinking of creating a data analysis suite with python, and I want it > to be interactive - ie the program asks the user (me) for input, like which > data file to use, how many parameters to minimize, etc.  There are a fe

Re: [Tutor] creating interactive program with python

2009-05-29 Thread Kent Johnson
On Thu, May 28, 2009 at 8:43 PM, Andre Walker-Loud wrote: > Hi All, > > I am thinking of creating a data analysis suite with python, and I want it > to be interactive - ie the program asks the user (me) for input, like which > data file to use, how many parameters to minimize, etc.  There are a fe

Re: [Tutor] missing first argument on subprocess.Popen w/ executable

2009-05-29 Thread Lie Ryan
A.T.Hofkamp wrote: > Lie Ryan wrote: >> I'm wondering whether I have misunderstood the documentation or this is >> a bug in either the documentation or the python: >> >> Python 2.5.4 (r254:67916, May 18 2009, 20:53:31) >> [GCC 4.3.2] on linux2 >> Type "help", "copyright", "credits" or "license" for

Re: [Tutor] missing first argument on subprocess.Popen w/ executable

2009-05-29 Thread A.T.Hofkamp
Lie Ryan wrote: I'm wondering whether I have misunderstood the documentation or this is a bug in either the documentation or the python: Python 2.5.4 (r254:67916, May 18 2009, 20:53:31) [GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. import subproces

[Tutor] missing first argument on subprocess.Popen w/ executable

2009-05-29 Thread Lie Ryan
I'm wondering whether I have misunderstood the documentation or this is a bug in either the documentation or the python: Python 2.5.4 (r254:67916, May 18 2009, 20:53:31) [GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import subprocess >>> subproces