On copying arrays

2008-03-23 Thread ernesto . adorio
Is there a conceptual difference between best =test[:] and best = [x for x in test] ? test is a list of real numbers. Had to use the second form to avoid a nasty bug in a program I am writing. I have to add too that I was using psyco in Python 2.5.1. Regards, Ernie. -- http://mail.python.o

Re: Cascading ifs

2007-04-09 Thread Ernesto García García
to work with a common context, but in that case I could store the context in an object and use the object's methods. Thanks, Ernesto -- http://mail.python.org/mailman/listinfo/python-list

Cascading ifs

2007-04-02 Thread Ernesto García García
: doSomething3(line) etc. Thanks in advance and regards, Ernesto -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a commas-in-between idiom?

2006-11-06 Thread Ernesto García García
> I've collected a bunch of list pydioms and other notes here: > >http://effbot.org/zone/python-list.htm Thank you for the suggestion. Ernesto -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a commas-in-between idiom?

2006-11-05 Thread Ernesto García García
fore and after each inter-element comma? No, but it was only an example. I usually go for string concatenation. > An often-overlooked alternative to playing with ",".join() is: > >print str(list)[1:-1] That's funny! Not that I like it more that the join solution,

Re: Is there a commas-in-between idiom?

2006-11-05 Thread Ernesto García García
Ernesto García García wrote: > Hi experts, > > it's very common that I have a list and I want to print it with commas > in between. How do I do this in an easy manner, whithout having the > annoying comma in the end? > > > > list = [1,2,3,4,5,6] > >

Is there a commas-in-between idiom?

2006-11-05 Thread Ernesto García García
s what I really want. is there some way better? if (len(list) > 0): print list[0], for element in list[1:]: print ',', element, Thx, Ernesto -- http://mail.python.org/mailman/listinfo/python-list

Re: Pythondocs.info : collaborative Python documentation project

2006-09-17 Thread ernesto . adorio
Somehow all of the above discussions did not mention having examples or demos "built-in" for the language itself: majorfunction.example() demo("package") or package.demo() search engine in local html documentation apropos() The statistical software R is bettter in this respect

Re: building lists of dictionaries

2006-07-23 Thread Ernesto García García
'limited': [0, 0], 'fixed': 0, 'limits': [0.0, 0.0], 'value': 0.0}, {'limited': [0, 0], 'fixed': 0, 'limits': [0.0, 0.0], 'value': 0.0}] >>> parinfo[0]['limited'] [0, 0] >>> parinfo[0]['limited'][0]=1 >>> parinfo [{'limited': [1, 0], 'fixed': 0, 'limits': [0.0, 0.0], 'value': 0.0}, {'limited': [0, 0], 'fixed': 0, 'limits': [0.0, 0.0], 'value': 0.0}, {'limited': [0, 0], 'fixed': 0, 'limits': [0.0, 0.0], 'value': 0.0}, {'limited': [0, 0], 'fixed': 0, 'limits': [0.0, 0.0], 'value': 0.0}, {'limited': [0, 0], 'fixed': 0, 'limits': [0.0, 0.0], 'value': 0.0}, {'limited': [0, 0], 'fixed': 0, 'limits': [0.0, 0.0], 'value': 0.0}] Ernesto -- http://mail.python.org/mailman/listinfo/python-list

Re: [Newbie] List from a generator function

2006-07-23 Thread Ernesto García García
Thank you guys. So the answer is to keep with the original form, perhaps with xrange. Ernesto -- http://mail.python.org/mailman/listinfo/python-list

Re: building lists of dictionaries

2006-07-23 Thread Ernesto García García
> parinfo = [{'value':0., 'fixed':0, 'limited':[0,0], 'limits':[0.,0.]}]*6 With this, you are creating a list with 6 references to the same list. Note that the left operand of '*' is evaluated only once before "multiplying" it six times. Regards, Tito -- http://mail.python.org/mailman/listinfo

Re: [Newbie] List from a generator function

2006-07-23 Thread Ernesto García García
have explained better. I just want to build a fix length list made up of elements generated by a function, in this case random.choice(). I don't like my list comprehension, because I'm using that dumb variable x and the range() list. Ernesto -- http://mail.python.org/mailman/listinfo/python-list

[Newbie] List from a generator function

2006-07-23 Thread Ernesto García García
Hi all, I'm sure there is a better way to do this: [random.choice(possible_notes) for x in range(length)] Regards, Ernesto -- http://mail.python.org/mailman/listinfo/python-list

Global "except" condition

2006-07-10 Thread Ernesto
Within the scope of one Python file (say myFile.py), I'd like to print a message on ANY exception that occurs in THAT file, dependent on a condition. Here's the pseudocode: if anyExceptionOccurs(): if myCondition: print "Here's my global exception message" Is this functionalit

Re: Converting floating point to string in non-scientific format

2006-05-01 Thread ernesto . adorio
See also non-exponential floating point representation in http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/358361 by R. Hettinger. -- http://mail.python.org/mailman/listinfo/python-list

Re: [pygtk] Advanced Treeview Filtering Trouble

2006-04-27 Thread JUAN ERNESTO FLORES BELTRAN
Thanks a lot! it did work!! :) -- http://mail.python.org/mailman/listinfo/python-list

fwd: Advanced Treeview Filtering Help

2006-04-27 Thread JUAN ERNESTO FLORES BELTRAN
by the way, iam using pygtk to develop the GUI Regards.- -- http://mail.python.org/mailman/listinfo/python-list

Advanced Treeview Filtering Help

2006-04-27 Thread JUAN ERNESTO FLORES BELTRAN
Hi you all, I am developping a python application which connects to a database (postresql) and displays the query results on a treeview. In adittion to displaying the info i do need to implement filtering facility for all the columns of the treestore/liststore model in order to allow the user a

Re: [Newbie] Referring to a global variable inside a function

2006-04-09 Thread Ernesto García García
>>How would you do this? > > def line_action(line, match_dictionary): > global count # make it a module-global variable, not a function-local > count = count + 1 > > OK, I had put it on the global block. Thanks, Ernesto -- http://mail.python.org

[Newbie] Referring to a global variable inside a function

2006-04-09 Thread Ernesto García García
Hi experts, I've built a class for parsing a user-defined list of files and matching lines with a user-defined list of regular expressions. It looks like this: import re import glob class LineMatcher: """ Parses a list of text files, matching their lines with the given regular expression

Re: Terminating a subprocess question

2006-03-30 Thread Ernesto
Ernesto wrote: > I'm opening a telnet session with the subprocess call below. I then > wait ten seconds and attempt to terminate the telnet window I created. > Unfortuantely, the telnet window remains after the 'TerminateProcess" > call below. This software works grea

Re: Terminating a subprocess question

2006-03-29 Thread Ernesto
Fredrik Lundh wrote: > Ernesto wrote: > > > Plus, everytime, I tried to use the read_all object, my program crashed > > pretty hard... > > > > tn = telnetlib.Telnet("localhost",6000) > > print tn.read_all() > > # CRASH > > that&

Re: Terminating a subprocess question

2006-03-29 Thread Ernesto
Diez B. Roggisch wrote: > Ernesto wrote: > > > I'm opening a telnet session with the subprocess call below. I then > > wait ten seconds and attempt to terminate the telnet window I created. > > Unfortuantely, the telnet window remains after the 'TerminateProce

Free Python IDE ?

2006-03-29 Thread Ernesto
I'm looking for a tool that I can use to "step through" python software (debugging environment). Is there a good FREE one (or one which is excellent and moderately priced ) ? -- http://mail.python.org/mailman/listinfo/python-list

Terminating a subprocess question

2006-03-29 Thread Ernesto
I'm opening a telnet session with the subprocess call below. I then wait ten seconds and attempt to terminate the telnet window I created. Unfortuantely, the telnet window remains after the 'TerminateProcess" call below. This software works great for opening an executable directly (i.e. Handle =

Re: Terminating a subprocess '.exe'

2006-03-24 Thread Ernesto
Fredrik Lundh wrote: > "Ernesto" wrote: > > > I launch a Windows executable and wish to close it from Python. The > > code is below. Normally, my program waits for rib.exe to finish, but > > I'd like to be able to close it from python if possible. (I s

Terminating a subprocess '.exe'

2006-03-23 Thread Ernesto
I launch a Windows executable and wish to close it from Python. The code is below. Normally, my program waits for rib.exe to finish, but I'd like to be able to close it from python if possible. (I suppose if I was going to do this, I wouldn't use .wait() ) Any ideas ? # Launch a program witho

Re: Send email notification

2006-03-07 Thread Ernesto
I guess that was jerk-off version of: "smtplib" Thanks a lot. -- http://mail.python.org/mailman/listinfo/python-list

Send email notification

2006-03-07 Thread Ernesto
Is there a special module for mail ? I'd like to send an email [to 'n' unique email addresses] from a python script. Thanks ! -- http://mail.python.org/mailman/listinfo/python-list

Re: tricky regular expressions

2006-02-07 Thread Ernesto
Petr Jakes wrote: > PS: just wonder why are you asking the same question in two different > topics Thanks for the help Peter. That happened accidentally. I meant to only put that in python topic. Aplogies... -- http://mail.python.org/mailman/listinfo/python-list

Re: tricky regular expressions

2006-02-07 Thread Ernesto
Xavier Morel wrote: > Ernesto wrote: > > I'm not sure if I should use RE's or some other mechanism. Thanks > > > I think a line-based state machine parser could be a better idea. Much > simpler to build and debug if not faster to execute. What is a line-

tricky regular expressions

2006-02-07 Thread Ernesto
So regular expressions have been good to me so far, but now my problem is a bit trickier. The string I'm getting data from looks like this: myString = [USELESS DATA] Request : Play [USELESS DATA] Title: Beethoven's 5th [USELESS DATA] Request : next [USELESS DATA] Title: song #2 . I'm using

tricky regular expressions

2006-02-07 Thread Ernesto
I'm trying to get the right syntax for my regular expression. The string I'm trying to parse is: # myString [USELESS DATA] Request: Play [USELESS DATA] Name: David Dude [USELESS DATA] Request: Next [USELESS DATA] Name: Ernesto Python User # Right now, I'm using the

Re: Regular Expression Syntax Help

2006-02-07 Thread Ernesto
So now I need to add the requirement that only "Name:" 's which are followed by "Request: Play" or "Request: Next" ANYWHERE between the previous titles and the new titles. Can I use RE's for that ? Ernesto wrote: > I'm trying to get the right syn

Re: * 'struct-like' list *

2006-02-07 Thread Ernesto
Thanks tons ! -- http://mail.python.org/mailman/listinfo/python-list

Re: Regular Expression Syntax Help

2006-02-07 Thread Ernesto
The word "Title" there should be "Name". What I really need is the pattern for getting the entire string after "Name: " until a '\n' is found. -- http://mail.python.org/mailman/listinfo/python-list

Re: * 'struct-like' list *

2006-02-07 Thread Ernesto
Thanks ! -- http://mail.python.org/mailman/listinfo/python-list

Regular Expression Syntax Help

2006-02-07 Thread Ernesto
I'm trying to get the right syntax for my regular expression. The string I'm trying to parse is: # myString [USELESS DATA] Name: David Dude [USELESS DATA] Right now, I'm using the following code: pattern_Name= '''(?x) Title:\s+(\w+)\s+ ''' names = re.findall(pattern_Name, myString) print

Re: * 'struct-like' list *

2006-02-07 Thread Ernesto
Thanks for the approach. I decided to use regular expressions. I'm going by the code you posted (below). I replaced the line re.findall line with my file handle read( ) like this: print re.findall(pattern, myFileHandle.read()) This prints out only brackets []. Is a 're.compile' perhaps necess

* 'struct-like' list *

2006-02-06 Thread Ernesto
I'm still fairly new to python, so I need some guidance here... I have a text file with lots of data. I only need some of the data. I want to put the useful data into an [array of] struct-like mechanism(s). The text file looks something like this: [BUNCH OF NOT-USEFUL DATA] Name: David A

Re: read file problem

2006-02-06 Thread Ernesto
Thanks to all. -- http://mail.python.org/mailman/listinfo/python-list

Re: Size of list

2006-02-06 Thread Ernesto
Thanks ! -- http://mail.python.org/mailman/listinfo/python-list

Size of list

2006-02-06 Thread Ernesto
for line in PM_File_Handle.readlines(): PM_fields = line.split(';') # Is there a way to get the size of PM_Fields here ? # Something like size = PM_fields.size( ) # I could not find this attribute in the python docs. Thanks -- http://mail.python.org/mailman/listinfo/python-list

read file problem

2006-02-06 Thread Ernesto
I'm just want to read in the contents of a (text) file. The text file is filled with semiColon delimited floating point strings... 0.456;1.265;99.742;... For some reason, I can't get the contents back when I call file.read() Here's my code. filePath = "C:\\folder\\myFile.txt fileHandle = open(

Re: Making Popen items terminate when program ends.

2006-02-04 Thread Ernesto
Peter Hansen wrote: > Please see this page: http://docs.python.org/ref/strings.html and read > about escape sequences in strings, and about raw strings. Thanks Peter. Forgot about that one. In a way, I wish it *would* have given me trouble, so I could have found it early rather than later. --

Making Popen items terminate when program ends.

2006-02-03 Thread Ernesto
I used Popen to launch a seperate telnet window, like this: subprocess.Popen("start telnet.exe -f C:\Folder\File.txt localhost 6000",shell=True) I is preferable to have this telnet window with the python program. Is there something I can do to that line of code to make that happen, or perhaps an

Re: Launch Windows command window....

2006-02-03 Thread Ernesto
wait a minute, that did work correctly. Thanks ! -- http://mail.python.org/mailman/listinfo/python-list

Re: Launch Windows command window....

2006-02-03 Thread Ernesto
jay graves wrote: > > This should work but only lightly tested. > subprocess.Popen("start telnet.exe -f C:\Folder\output.txt localhost > 6000",shell=True) Thanks a lot, but this still didn't launch a seperate telnet window. I just want the telnet window to open up and do "it's thing" in the back

Re: Launch Windows command window....

2006-02-03 Thread Ernesto
I'm one step closer... subprocess.Popen("telnet.exe -f C:\Folder\output.txt localhost 6000") is improved, but still doesn't launch a SEPERATE window... -- http://mail.python.org/mailman/listinfo/python-list

Launch Windows command window....

2006-02-03 Thread Ernesto
I'm trying to launch a seperate telnet window from within my python program. The command I thought I was supposed to use is below: os.system("telnet.exe -f C:\Folder\output.txt localhost 6000") This creates a telnet window inside the current window. This is not desirable. I need it to launch a

Re: Run Windows shortcut

2006-02-03 Thread Ernesto
Nevermind this is not the design I need. -- http://mail.python.org/mailman/listinfo/python-list

Run Windows shortcut

2006-02-03 Thread Ernesto
Assuming the shortcut is in the current directory, how could I launch the shortcut (without waiting for it to finish) ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows - create text file - (newb)

2006-02-02 Thread Ernesto
got it . thanks tons. i'm doing the tutorial now. -- http://mail.python.org/mailman/listinfo/python-list

Re: OS.MKDIR( ) Overwriting previous folder created...

2006-02-02 Thread Ernesto
NEVERMIND ! Here is the solution... # if (os.path.isdir("C:\\MyNewFolder") == 0): os.mkdir("C:\\MyNewFolder") # - thanks -- http://mail.python.org/mailman/li

Re: OS.MKDIR( ) Overwriting previous folder created...

2006-02-02 Thread Ernesto
Ernesto wrote: > I couldn't find this with a search, but isn't there a way to overwrite > a previous folder (or at least not perform osmkdir( ) if your program > detects it already exists). Thanks ! I suppose this also leads to the question of: "Is there a way to deter

Windows - create text file - (newb)

2006-02-02 Thread Ernesto
Can Python be used to create (and/or open, read, and write) a text file in Windows (if the path is known) ? -- http://mail.python.org/mailman/listinfo/python-list

OS.MKDIR( ) Overwriting previous folder created...

2006-02-02 Thread Ernesto
I couldn't find this with a search, but isn't there a way to overwrite a previous folder (or at least not perform osmkdir( ) if your program detects it already exists). Thanks ! -- http://mail.python.org/mailman/listinfo/python-list

Re: Capture Windows command line output - put in text file

2006-02-01 Thread Ernesto
Ernesto wrote: > I'm looking for a way to capture command line output from a cmd > session. Is there a way to use python to launch the application from > the beggining then stream all of the output to a text file ? Nevermind. This is a telnet question. I'm trying to g

Capture Windows command line output - put in text file

2006-02-01 Thread Ernesto
I'm looking for a way to capture command line output from a cmd session. Is there a way to use python to launch the application from the beggining then stream all of the output to a text file ? -- http://mail.python.org/mailman/listinfo/python-list

Re: subprocess terminate help

2005-11-16 Thread Ernesto
program.exe ? I was looking at the Windows task manager after I used a Cntrl + C to manually terminate the running python program. The program.exe is apparently ending when I end the python program. -- http://mail.python.org/mailman/listinfo/python-list

Re: subprocess terminate help

2005-11-16 Thread Ernesto
A... I figured out a way around this. I'll use program.exe to shut down itself. That way I won't have to use any extension modules. Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: subprocess terminate help

2005-11-16 Thread Ernesto
Yeah I know. I posted it b/c I was having the same problems and I'm investigating ways to do this. None of those methods gave me desired results for my program. All I want to do is end my python program and return to the DOS prompt. -- http://mail.python.org/mailman/listinfo/python-list

subprocess terminate help

2005-11-16 Thread Ernesto
def launchWithoutConsole(command, args): """Launches 'command' windowless and waits until finished""" startupinfo = subprocess.STARTUPINFO() startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW return subprocess.Popen([command] + args, startupinfo=startupinfo).wait() handle = la

Re: subprocess.Popen - terminate

2005-11-15 Thread Ernesto
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/347462 Also try searching this group for "subprocess kill" -- http://mail.python.org/mailman/listinfo/python-list

Self terminate a python program

2005-11-15 Thread Ernesto
how do you self terminate a python program from within the code? something similar to exit(0) in C. I think the problem is that I'm using subprocess and popen to launch a '.exe' file and python is "waiting" on the .exe file to finish. since it never does, the python program won't end. how can I

Re: Subprocess.Popen - passing args help

2005-11-02 Thread Ernesto
A nice person from another thread helped me... a = 'disable "@USB\VID_0403&PID_6010&MI_00\7&15E4F68&1&' print a disable "@USB\VID_0403&PID_6010&MI_00&15E4F68&1& \7 is the ASCII bell so your args may be different from what you think. I thought the quote method I have fixes this problem,

Re: subprocess module under Windows 98

2005-11-02 Thread Ernesto
This worked for me on XP... not sure for 98... http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/409002 -- http://mail.python.org/mailman/listinfo/python-list

Subprocess.Popen - passing args help

2005-11-02 Thread Ernesto
I'm trying to use Popen to do some command line work Windows XP style. I have devcon.exe which I would use on a Windows command line like so: devcon disable "@USB\VID_05E3&PID_0605\5&2CE74B9E&1&6" Using subprocess.Popen, I have something like this: subprocess.Popen([r"devcon.exe","disable",'"USB

Re: * TypeError - Need help passings args

2005-11-02 Thread Ernesto
Thanks, that ran without errors. The only problem now is that it launches devcon.exe without actually passing the parameters to the program. It's as if I just typed "devcon" at a Windows command prompt and pressed enter. I can't figure out why it doesn't accept my parameter. -- http://mail.pyt

Re: Windows - Need to process quotes in string...

2005-11-02 Thread Ernesto
Thanks. -- http://mail.python.org/mailman/listinfo/python-list

* TypeError - Need help passings args

2005-11-02 Thread Ernesto
My program is below. I'm trying to use two Windows ".exe" files with my command line python interface. I get user input, then call "launchWithoutConsole". This was working OK until I introduced the 'args' part. Now I get the following error everytime I call "launchWithoutConsole": return

Windows - Need to process quotes in string...

2005-10-31 Thread Ernesto
I'm trying to use a $ delimeter, but it doesn't seem to work. Here is the code: launchWithoutConsole("devcon.exe",d'$enable "@USB\VID_0403&PID_6010&MI_00\7&15E4F68&1&"$) I want to send the string parameter: enable "@USB\VID_0403&PID_6010&MI_00\7&15E4F68&1&" to the program devcon. The

Re: Execute C code through Python

2005-10-26 Thread Ernesto
Peter Hansen wrote: > > Google found the following (after I read the docs for subprocess and > learned about the "startupinfo" flag, and searched for "subprocess > startupinfo"). Does this help? > > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/409002 > > -Peter Thanks Peter! That's

Re: Execute C code through Python

2005-10-25 Thread Ernesto
So i generated the .exe file "myFile.exe" This is a Windows - text based application. Right now, when I run: import subprocess subprocess.call("myFile") the application starts in its own console window. Is there a way for it to run inside the python interface? Thanks, -- http://mail.python.

Re: Execute C code through Python

2005-10-24 Thread Ernesto
Fredrik Lundh wrote: > "Ernesto" wrote: > > > Thanks. Can anyone provide an example of using *subprocess* to run > > helloWorld.C through the python interpreter. > > compile helloWorld, and run: > > import subprocess > subprocess.call(&q

Re: Compile C program -> .pyc file

2005-10-21 Thread Ernesto
Fredrik Lundh wrote: > "Ernesto" wrote: > > > Is there a way to compile a C program into a .pyc file that has the > > same behavior as the compiled C program? > > unless you find a C->Python compiler, no. PYC files contain Python bytecode, > C compilers

Re: Execute C code through Python

2005-10-21 Thread Ernesto
Thanks. Can anyone provide an example of using *subprocess* to run helloWorld.C through the python interpreter. -- http://mail.python.org/mailman/listinfo/python-list

Compile C program -> .pyc file

2005-10-21 Thread Ernesto
Is there a way to compile a C program into a .pyc file that has the same behavior as the compiled C program? Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Execute C code through Python

2005-10-20 Thread Ernesto
What's the easiest and quickest way to execute a compiled C "command line interface" program THROUGH Python? -- http://mail.python.org/mailman/listinfo/python-list

Wrapper module for Linux shared lib

2005-09-16 Thread Ernesto
What's the best resource for finding out how to write a wrapper module for a shared library file *.so* in Linux? -- http://mail.python.org/mailman/listinfo/python-list

Re: Accessing shared library file...

2005-09-16 Thread Ernesto
Where is the ctypes mailing list? -- http://mail.python.org/mailman/listinfo/python-list

Re: Accessing shared library file...

2005-09-15 Thread Ernesto
The .dll file is a shared library file that is associated with a programming interface for a semi-conductor chip. The chip drivers come in two different flavors: One is a .dll (for Windows) and the other is a shared library file for Linux. The name of the Linux file is "nameofFile.so.0.4.5" The

Accessing shared library file...

2005-09-15 Thread Ernesto
I'm in the process of moving a Python application from Windows to Linux. This means that the drivers for windows ".dll" now must be Linux drivers "shared library file" (.so I think). With Windows, I used: ctypes ("from ctypes import windll") Then "_dll = windll.NAME" I'm not sure how to includ

Re: Ctypes Install in Linux

2005-09-13 Thread Ernesto
THANKS !!! -- http://mail.python.org/mailman/listinfo/python-list

Re: Ctypes Install in Linux

2005-09-12 Thread Ernesto
Thanks for the help. I'm kind of new to Linux, but I am the only user of this machine (just installed Red Hat). How do I make myself a "root-user"? For the second method you mentioned, how do I add access the PYTHONPATH environment variable? Thanks again! -- http://mail.python.org/mailman/li

Ctypes Install in Linux

2005-09-12 Thread Ernesto
I'm trying to install ctypes for Python in Linux. Linux won't let me create /usr/local/lib/python2.4/site-packages/ctypes ... "Permission denied" ... Anyone know how I could get it to work? It's probably something I need to chmod or change permissions on... Thanks! -- http://mail.python.org/mai

Re: Launching Python programs from Linux shell script

2005-09-12 Thread Ernesto
Thanks! How do you add Python in Linux to the path? Similar to setting environment variables in Windows. I want to be able to type "python" when I'm in any directory to launch the interpreter. Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Where do .pyc files come from?

2005-09-09 Thread Ernesto
I noticed in a python distribution there were 5 python files (.py) and 5 other files with the same name, but with the extension .pyc . Is this some kind of compiled version of the .py files. Thanks, -- http://mail.python.org/mailman/listinfo/python-list

Launching Python programs from Linux shell script

2005-09-09 Thread Ernesto
Does anyone know how to start Python program(s) from a Linux shell script? Is it just $python myscript.py ?? Thanks, -- http://mail.python.org/mailman/listinfo/python-list

Re: GUI - Windows: Where to get started

2005-07-27 Thread Ernesto
THANKS SO MUCH FOR ALL YOUR RESPONSES! I will look into everything and find what's right for my project. -- http://mail.python.org/mailman/listinfo/python-list

GUI - Windows: Where to get started

2005-07-26 Thread Ernesto
Hi all, Would anyone know a good place to start for learning how to build simple GUI's in Windows XP? I just want users to be able to select a few parameters from a pull-down menu, then be able to run some batch files using the parameters from the pull down menus. I would also need a "Browse" me

Re: Run batch files in Windows XP

2005-07-25 Thread Ernesto
Looks like I'm not getting my parameters to my batch file correctly. I'm using os.system like this: os.system('bootmanager.bat %s' %"BOOTMANAGER ALL") where 'BOOTMANAGER ALL' is what I type at the command prompt arguments. That must not be right? -- http://mail.python.org/mailman/listinfo/pytho

Re: Run batch files in Windows XP

2005-07-25 Thread Ernesto
Thanks. Yeah I started to write in Python. Looks like this: ** import os from os.path import join # Get input from user and make sure it is valid fileDirec = raw_input("\nEnter the path of where your STMP3XXX_SDK_FIRMWARE\nis located (i.e. C:

Re: Run batch files in Windows XP

2005-07-25 Thread Ernesto
Thanks Peter. The issue is I haven't done very much batch programming. I need to prompt the user for input and each batch file is in a different directory. How do I change directories and prompt for user input? Thanks! -- http://mail.python.org/mailman/listinfo/python-list