Re: organizing many python scripts, in a large corporate environment.

2011-03-15 Thread bukzor
On Mar 15, 12:24 pm, booklover wrote: > > Is everyone really happy with this? > > I'm not happy with this. In fact, if Python 3.3 came out with a > solution for this problem, it would be a major motivation for me to > migrate. > > I don't think that it would take much to fix either. Perhaps if Pyt

Re: Is there any python library that parse c++ source code statically

2011-03-15 Thread kuangye
Thank you guys. Seems it's rather complex. -- http://mail.python.org/mailman/listinfo/python-list

To collect a basic body hair incidents can be avoided, if the consultant is still an abs

2011-03-15 Thread brandclothings
www.airmax-seller.com To collect a basic body hair incidents can be avoided, if the consultant is still an abstraction. Stoudemire capacity and liquidity, cheap air Jordan heel once again as women’s basketball player is very good, good players introduced inspiration branch. She and her fertility de

Re: Multiprocessing.Process Daemonic Behavior

2011-03-15 Thread James Mills
On Wed, Mar 16, 2011 at 12:34 PM, John L. Stephens wrote: > I would have expected the daemonic children processes to terminate with the > parent process, regardless of how the parent process terminates, either > normally or forcefully. As I understand it. If you forcibly kill the parent process w

Re: Multiprocessing.Process Daemonic Behavior

2011-03-15 Thread MRAB
On 16/03/2011 02:34, John L. Stephens wrote: Greetings, I'm trying to understand the behavior of the multiprocessing.Process daemonic attribute. Based on what I have read, if a Process ( X ) is created, and before it is started ( X.start() ), I should be able to set the process as daemonic usin

Multiprocessing.Process Daemonic Behavior

2011-03-15 Thread John L. Stephens
Greetings, I'm trying to understand the behavior of the multiprocessing.Process daemonic attribute. Based on what I have read, if a Process ( X ) is created, and before it is started ( X.start() ), I should be able to set the process as daemonic using X.daemon=True. Once this attribute is

Re: possible to run a python script without installing python?

2011-03-15 Thread Katie T
On Tue, Mar 15, 2011 at 8:58 PM, davidj411 wrote: > it seems that if I copy the python.exe binary and the folders > associated with it to a server without python, i can run python. > does anyone know which files are important to copy and which can be > omitted? > > i know about py2exe and have ha

Re: possible to run a python script without installing python?

2011-03-15 Thread Terry Reedy
On 3/15/2011 4:58 PM, davidj411 wrote: it seems that if I copy the python.exe binary and the folders associated with it to a server without python, i can run python. does anyone know which files are important to copy and which can be omitted? For the 3.2 Windows installation, you should be able

Re: possible to run a python script without installing python?

2011-03-15 Thread scattered
On Mar 15, 4:58 pm, davidj411 wrote: > it seems that if I copy the python.exe binary and the folders > associated with it to a server without python, i can run python. > does anyone know which files are important to copy and which can be > omitted? > > i know about py2exe and have had no luck with

Re: Py_Initialize() fails on windows when SDL.h is included.

2011-03-15 Thread Nathan Coulson
Recompiling SDL, using --disable-stdio-redirect fixed this problem. On Tue, Mar 15, 2011 at 1:48 AM, Nathan Coulson wrote: > I began porting one of my projects from linux (no problems under > linux) to windows,  but I am getting the following problem when > attempting to run it  (This was within

Re: newbie question (for loop)

2011-03-15 Thread Algis Kabaila
On Wednesday 16 March 2011 05:48:14 Tim Morneau wrote: > You have to add the colon to the end of the statement if this > is an accurate representation of the statement so: > > "for i in range(len(list)):" instead of "for i in > range(len(list))" > It seems to me that it would be simpler to

Re: logging and PyQt4

2011-03-15 Thread Vinay Sajip
On Mar 14, 7:40 am, Adrian Casey wrote: > I have a multi-threaded PyQt4 application which has both a GUI and command- > line interface.  I am using Qt4's threading because from what I have read, > it is more efficient than the native python threading module.  Also, given > most users will probably

Re: argparse, tell if arg was defaulted

2011-03-15 Thread Neal Becker
Robert Kern wrote: > On 3/15/11 12:46 PM, Neal Becker wrote: >> Robert Kern wrote: >> >>> On 3/15/11 9:54 AM, Neal Becker wrote: Is there any way to tell if an arg value was defaulted vs. set on command line? >>> >>> No. If you need to determine that, don't set a default value in the >>>

Re: using simplejson.dumps to encode a dictionary to json

2011-03-15 Thread Aaron
Rock on, thanks guys. I'm on python 2.5 btw - I use it with google app engine so cannot upgrade unfortunately. A -- http://mail.python.org/mailman/listinfo/python-list

Re: Good literature about python twisted

2011-03-15 Thread Corey Richardson
On 03/15/2011 03:18 PM, gelonida wrote: > o it seems another book or some other documentation would be great. > > Does anyone have recommendations? > http://krondo.com/?page_id=1327 -- Corey Richardson -- http://mail.python.org/mailman/listinfo/python-list

Re: Get Path of current Script

2011-03-15 Thread eryksun ()
On Tuesday, March 15, 2011 9:47:17 AM UTC-4, Mario Rol wrote: > > os.path.join(sys.path[0], 'config.txt') > > If the script and config.txt are in /tmp this will return '/tmp/ > config.txt' no matter from which directory you started the script. You have to be careful about symlinks. Even Windows

possible to run a python script without installing python?

2011-03-15 Thread davidj411
it seems that if I copy the python.exe binary and the folders associated with it to a server without python, i can run python. does anyone know which files are important to copy and which can be omitted? i know about py2exe and have had no luck with it. -- http://mail.python.org/mailman/listinfo/

Re: using simplejson.dumps to encode a dictionary to json

2011-03-15 Thread MRAB
On 15/03/2011 19:56, Aaron wrote: If I print authreq_data to screen I get {"req": {"username": "##", "password": "#", "productType": "CFD_Demo"}} Essentially I want the inner brackets to be [ ] instead of {} but alternating on each level so it would be: {"req": [{"username": "##

Re: using simplejson.dumps to encode a dictionary to json

2011-03-15 Thread Chris Rebert
On Tue, Mar 15, 2011 at 12:56 PM, Aaron wrote: > If I print authreq_data to screen  I get > > {"req": {"username": "##", "password": "#", "productType": > "CFD_Demo"}} > > Essentially I want the inner brackets to be  [ ] instead of {} but > alternating on each level so it would be: > > {

Re: using simplejson.dumps to encode a dictionary to json

2011-03-15 Thread MRAB
On 15/03/2011 19:40, Aaron wrote: Hi there, I am attempting to use simplejson.dumps to convert a dictionary to a json encoded string. For some reason this doesn't work - it would be awesome if someone could give me a clue as to why. loginreq = {"username":username, "password":password, "prod

Re: Tk MouseWheel Support

2011-03-15 Thread Greg Couch
On Mar 10, 1:37 pm, Corey Richardson wrote: > On 03/10/2011 03:35 PM, Corey Richardson wrote: > > > Middle button is Button-3 IIRC, and I think it'd be MouseUp and > > MouseDown. I'm really not sure though. > > It's Button-2 rather. > > -- > Corey Richardson Middle button is button-3 on Mac OS X,

Re: using simplejson.dumps to encode a dictionary to json

2011-03-15 Thread Aaron
I'm attempting to write an xml as a json object. the xml object is authreq_data = """ %s CFD_Demo %s """ %(username, password) -- http://mail.python.org/mailman/listinfo/python-list

Re: using simplejson.dumps to encode a dictionary to json

2011-03-15 Thread Aaron
If I print authreq_data to screen I get {"req": {"username": "##", "password": "#", "productType": "CFD_Demo"}} Essentially I want the inner brackets to be [ ] instead of {} but alternating on each level so it would be: {"req": [{"username": "##", "password": "#", "productType

Re: calling 64 bit routines from 32 bit matlab on Mac OS X

2011-03-15 Thread Philip Semanchuk
On Mar 15, 2011, at 11:58 AM, Danny Shevitz wrote: > Howdy, > > I have run into an issue that I am not sure how to deal with, and would > appreciate any insight anyone could offer. > > I am running on Mac OS X 10.5 and have a reasonably large tool chain including > python, PyQt, Numpy... If I d

using simplejson.dumps to encode a dictionary to json

2011-03-15 Thread Aaron
Hi there, I am attempting to use simplejson.dumps to convert a dictionary to a json encoded string. For some reason this doesn't work - it would be awesome if someone could give me a clue as to why. loginreq = {"username":username, "password":password, "productType":"CFD_Demo"} authreq_data =

Re: How to schedule execution of code?

2011-03-15 Thread Irmen de Jong
On 15-03-11 08:16, Virgil Stokes wrote: Suppose that I have some Python code (vers. 2.6) that has been converted into an *.exe file and can be executed on a Windows (Vista or 7) platform. What can one do to have this *.exe executed at a set of specific times each day? In addition, if a day is mis

Re: Good literature about python twisted

2011-03-15 Thread Nelle Varoquaux
Hi, The krondo blog is a good place to start : http://krondo.com/?page_id=1327 It's a serie of 22 blogposts, introducing asynchronous programming and twisted. Cheers, Nelle On 15 March 2011 19:18, gelonida wrote: > On Mar 15, 2:18 pm, Daniel Mahoney wrote: > > On Tue, 15 Mar 2011 04:34:52 -0

Re: organizing many python scripts, in a large corporate environment.

2011-03-15 Thread booklover
> Is everyone really happy with this? I'm not happy with this. In fact, if Python 3.3 came out with a solution for this problem, it would be a major motivation for me to migrate. I don't think that it would take much to fix either. Perhaps if Python looked in the current directory for ".pth" file

Re: Good literature about python twisted

2011-03-15 Thread gelonida
On Mar 15, 2:18 pm, Daniel Mahoney wrote: > On Tue, 15 Mar 2011 04:34:52 -0700, gelonida wrote: > > Hi, > > > Just wanted to learn more about python twisted and wanted to buy the > > O'Reilly book. > > > However I noticed, that the book is from 2005. > > > Is this book still worth it or is there a

Using vectors in single NLP constraint inside proc iml with call statement

2011-03-15 Thread ayaa
I have two variables that are stored in a data set and also are stored as matrices and vectors. I want to formulate only one constraint that is a function of all the data set's observations (or elements of these vectors) and a decision variable. Suppose the two stored variables (two vectors) are a

Re: argparse, tell if arg was defaulted

2011-03-15 Thread Robert Kern
On 3/15/11 12:46 PM, Neal Becker wrote: Robert Kern wrote: On 3/15/11 9:54 AM, Neal Becker wrote: Is there any way to tell if an arg value was defaulted vs. set on command line? No. If you need to determine that, don't set a default value in the add_argument() method. Then just check for Non

Re: Py2exe problem with pyqt+matplotlib

2011-03-15 Thread John Posner
On 2:59 PM, Massi wrote: > I everyone, > > I'm trying to write a setup file for py2exe (0.6.9) to convert my > script into a windows (on win 7) executable. In my script (python2.6) > I use PyQt and matplotlib. Here is the setup.py file: > ImportError: No module named Tkinter > > Obviously Tkinter

Re: newbie question (for loop)

2011-03-15 Thread Tim Morneau
You have to add the colon to the end of the statement if this is an accurate representation of the statement so: "for i in range(len(list)):" instead of "for i in range(len(list))" On 3/15/2011 2:01 AM, Sachin Kumar Sharma wrote: BB, I am getting error on the following syntax while r

Re: argparse, tell if arg was defaulted

2011-03-15 Thread Jean-Michel Pichavant
Neal Becker wrote: Robert Kern wrote: On 3/15/11 9:54 AM, Neal Becker wrote: Is there any way to tell if an arg value was defaulted vs. set on command line? No. If you need to determine that, don't set a default value in the add_argument() method. Then just check for None and r

Re: argparse, tell if arg was defaulted

2011-03-15 Thread Neal Becker
Robert Kern wrote: > On 3/15/11 9:54 AM, Neal Becker wrote: >> Is there any way to tell if an arg value was defaulted vs. set on command >> line? > > No. If you need to determine that, don't set a default value in the > add_argument() method. Then just check for None and replace it with the > def

Re: How should I handle socket receiving?

2011-03-15 Thread Hans
On Mar 14, 1:33 pm, MRAB wrote: > On 14/03/2011 19:47, Hans wrote: > > > > > On Mar 12, 10:13 pm, Tim Roberts  wrote: > >> Hans  wrote: > > >>> I'm thinking to write a code which to: > >>> 1. establish tons of udp/tcp connections to a server > > >> What does "tons" mean?  Tens?  Hundreds? > > >>>

Re: Guido rethinking removal of cmp from sort method

2011-03-15 Thread Ian Kelly
On Tue, Mar 15, 2011 at 2:00 AM, Paul Rubin wrote: > Ian Kelly writes: >> I would think that you can sort them with key as long as none of the >> sequences are equal (which would result in an infinite loop using >> either method).  Why not this? > > Yes you can do something like that, but look ho

email library

2011-03-15 Thread peterob
Hi, Im completely confused from email library. When you parse email from file it creates object Message. f = open(emailFile, 'r') msg = email.message_from_file(f) f.close() How can I access RAW header of email represented by object msg? I dont wanna access each header field by hand. Im doing a

Re: argparse, tell if arg was defaulted

2011-03-15 Thread Robert Kern
On 3/15/11 9:54 AM, Neal Becker wrote: Is there any way to tell if an arg value was defaulted vs. set on command line? No. If you need to determine that, don't set a default value in the add_argument() method. Then just check for None and replace it with the default value and do whatever othe

Re: argparse, tell if arg was defaulted

2011-03-15 Thread Kushal Kumaran
- Original message - > Is there any way to tell if an arg value was defaulted vs. set on > command line? > I guess if you need to care about the difference, you shouldn't set a default. -- regards, kushal -- http://mail.python.org/mailman/listinfo/python-list

RE: newbie question (for loop)

2011-03-15 Thread Prasad, Ramit
In addition, "list" is a reserved word in python and while you can rebind it, it usually not recommended. Unless IPython is different? Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 5423 -Original M

calling 64 bit routines from 32 bit matlab on Mac OS X

2011-03-15 Thread Danny Shevitz
Howdy, I have run into an issue that I am not sure how to deal with, and would appreciate any insight anyone could offer. I am running on Mac OS X 10.5 and have a reasonably large tool chain including python, PyQt, Numpy... If I do a "which python", I get "Mach-O executable i386". I need to call

Re: C++ object in PyObject*?

2011-03-15 Thread Stefan Behnel
Richard, 15.03.2011 16:16: I am wondering, what is the best way to write a Python module as an interface to a C++ class? Cython. http://cython.org Here are a couple of tutorials for your use case: http://docs.cython.org/src/userguide/wrapping_CPlusPlus.html http://docs.cython.org/src/tutori

Re: Python script xml-rpc to C# xml-rpc script

2011-03-15 Thread Adam Tauno Williams
On Tue, 2011-03-15 at 08:00 -0700, Ymtrader wrote: > If anyone is fluent in python as well as C# using the cook computing > xml-rpc.net library I could really use some help. I have been trying > to write a C# program to access upcdatabase.com without much luck. Yes, I've used both. > have a w

C++ object in PyObject*?

2011-03-15 Thread Richard
I am wondering, what is the best way to write a Python module as an interface to a C++ class? I don't want the C++ object representing the class to be declared as a global, because then if multiple instances in Python would be created, they would be using the same C++ object instance, correct? So

Python script xml-rpc to C# xml-rpc script

2011-03-15 Thread Ymtrader
If anyone is fluent in python as well as C# using the cook computing xml-rpc.net library I could really use some help. I have been trying to write a C# program to access upcdatabase.com without much luck. I have a working python script. Would anyone be willing to show me the C# equivalent to th

argparse, tell if arg was defaulted

2011-03-15 Thread Neal Becker
Is there any way to tell if an arg value was defaulted vs. set on command line? -- http://mail.python.org/mailman/listinfo/python-list

Re: Get Path of current Script

2011-03-15 Thread Mario Rol
On Mar 14, 10:25 am, Alexander Schatten wrote: > Hi, > > could someone help me with a small problem? I wrote a Python script > that does some RegEx... transformations. Now, this script loads some > configuration data from a file located in the same directory: > > open ('config.txt', 'r'). > > Howe

Re: Good literature about python twisted

2011-03-15 Thread Daniel Mahoney
On Tue, 15 Mar 2011 04:34:52 -0700, gelonida wrote: > Hi, > > Just wanted to learn more about python twisted and wanted to buy the > O'Reilly book. > > However I noticed, that the book is from 2005. > > > Is this book still worth it or is there anything better to learn about > twisted. > > I

Re: alphanumeric list

2011-03-15 Thread yqyq22
On Mar 15, 11:02 am, Laurent Claessens wrote: > Le 15/03/2011 09:10, yqyq22 a crit : > > > Hi all, > > I would like to put an alphanumeric string like this one > > EE472A86441AF2E629DE360 in a list, then iterate inside the entire > > string lenght and change each digit with a random digit. > > Do

Py2exe problem with pyqt+matplotlib

2011-03-15 Thread Massi
I everyone, I'm trying to write a setup file for py2exe (0.6.9) to convert my script into a windows (on win 7) executable. In my script (python2.6) I use PyQt and matplotlib. Here is the setup.py file: from distutils.core import setup import py2exe import matplotlib as mpl import glob, shutil mp

Good literature about python twisted

2011-03-15 Thread gelonida
Hi, Just wanted to learn more about python twisted and wanted to buy the O'Reilly book. However I noticed, that the book is from 2005. Is this book still worth it or is there anything better to learn about twisted. I though about buying a paper book in order to be able to read in in the train.

Exe. error

2011-03-15 Thread Şansal Birbaş
Hi, I created an executable version of my application succesfully. It is just a basic database related app. So it has a database and an icon file in the same directory called "data". When I try to add an entry to my database using the .exe file, it gives an error such as "unable to open databas

Re: organizing many python scripts, in a large corporate environment.

2011-03-15 Thread eryksun ()
On Tuesday, March 15, 2011 12:44:48 AM UTC-4, bukzor wrote: > When looking at google code search, this kind of code is > rampant (below). Is everyone really happy with this? > > sys.path.insert(0, > os.path.dirname(os.path.dirname( > os.path.dirname(os.path.abspath(__file__)

Re: alphanumeric list

2011-03-15 Thread Ulrich Eckhardt
yqyq22 wrote: > Hi, to be honest i'm a newbye so i don't know where to start, i began > in this way but i don't know how to proceeed. > list = (EE472A86441AF2E629DE360) "list" is a builtin type, so you shouldn't use it as name for other things. The thing on the right-hand side of the assignment is

Re: alphanumeric list

2011-03-15 Thread Laurent Claessens
Le 15/03/2011 09:10, yqyq22 a écrit : Hi all, I would like to put an alphanumeric string like this one EE472A86441AF2E629DE360 in a list, then iterate inside the entire string lenght and change each digit with a random digit. Do u have some suggestion? thanks a lot This can be a way to begin :

Re: A Question on URLLIB

2011-03-15 Thread joy99
On Mar 15, 1:49 pm, David Marek wrote: > You are doing fine so far :-) > > However, urllib is quite low level module. Do you know > mechanizehttp://wwwsearch.sourceforge.net/mechanize/? I have used it in my > crawler. If you want to crawl a specific site for known data then > Scrapyhttp://scrapy.

Re: alphanumeric list

2011-03-15 Thread Ben Finney
yqyq22 writes: > On Mar 15, 9:20 am, Chris Rebert wrote: > > Can you show us your attempt? > > Hi, to be honest i'm a newbye so i don't know where to start Work through the entire Python tutorial, in sequence http://docs.python.org/tutorial/>. Not merely read: work through it, reading the expla

Re: silent install python.msi

2011-03-15 Thread Cornelius Kölbel
Hi Tim, thanks a lot. Exactly what I needed. Couldn't find such a page from python 2.6. Kind regards Cornelius Am 15.03.2011 09:55, schrieb Tim Golden: > On 15/03/2011 08:30, Cornelius Kölbel wrote: >> I am using the python.msi (at the moment 2.6) in a project and want to >> deploy the python pa

Re: alphanumeric list

2011-03-15 Thread Ulrich Eckhardt
yqyq22 wrote: > I would like to put an alphanumeric string like this one > EE472A86441AF2E629DE360 in a list, then iterate inside the entire > string lenght and change each digit with a random digit. What does "change each digit with a random digit"? Do you want to swap two random elements of the

exe file sends error

2011-03-15 Thread Şansal Birbaş
Hi, I needed to create executable of my python application. Everthing was ok , but my exe file gives an error such as "unable to open database file", When I try to add an entry to my database. My icon file is in tha same directory(data) as my database file and there is no problem about that. He

Re: Guido rethinking removal of cmp from sort method

2011-03-15 Thread Paul Rubin
Stefan Behnel writes: > the question that remains is: are the few remaining cases worth being > supported directly, thus complicating the internal source code of the > Python runtime? The other cases were supported perfectly well already, and the support was removed. That's just ludicrous in my

Re: Guido rethinking removal of cmp from sort method

2011-03-15 Thread Stefan Behnel
Paul Rubin, 15.03.2011 09:00: Ian Kelly writes: I would think that you can sort them with key as long as none of the sequences are equal (which would result in an infinite loop using either method). Why not this? Yes you can do something like that, but look how ugly it is compared with using

Re: python script to find Installed programs in Uninstall folder in registry

2011-03-15 Thread Tim Golden
On 15/03/2011 03:42, KishoreRP wrote: I am working on creating a python script to find Installed programs in Uninstall folder in registry, the script works perfectly fine on 32 bit machines but errors out with a wmi error on 64 bit machines. You don't say what the error is (and your snippet doe

Re: silent install python.msi

2011-03-15 Thread Tim Golden
On 15/03/2011 08:30, Cornelius Kölbel wrote: I am using the python.msi (at the moment 2.6) in a project and want to deploy the python package smoothly and nearly automatically. So my question is, if the python.msi provides some parameters, to pass the information like which components to install

Re: How to schedule execution of code?

2011-03-15 Thread Tim Golden
On 15/03/2011 07:16, Virgil Stokes wrote: Suppose that I have some Python code (vers. 2.6) that has been converted into an *.exe file and can be executed on a Windows (Vista or 7) platform. What can one do to have this *.exe executed at a set of specific times each day? Well, once you've got an

Re: alphanumeric list

2011-03-15 Thread yqyq22
On Mar 15, 9:20 am, Chris Rebert wrote: > On Tue, Mar 15, 2011 at 1:10 AM, yqyq22 wrote: > > Hi all, > > I would like to put an alphanumeric string like this one > > EE472A86441AF2E629DE360 in a list, then iterate inside the entire > > string lenght and change each digit with a random digit. > >

Re: A Question on URLLIB

2011-03-15 Thread David Marek
You are doing fine so far :-) However, urllib is quite low level module. Do you know mechanize http://wwwsearch.sourceforge.net/mechanize/ ? I have used it in my crawler. If you want to crawl a specific site for known data then Scrapy http://scrapy.org/ could be useful too. David Marek dav...@atr

Py_Initialize() fails on windows when SDL.h is included.

2011-03-15 Thread Nathan Coulson
I began porting one of my projects from linux (no problems under linux) to windows, but I am getting the following problem when attempting to run it (This was within gdb) warning: Fatal Python error: warning: Py_Initialize: can't initialize sys standard streams warning: I narrowed it down the

silent install python.msi

2011-03-15 Thread Cornelius Kölbel
Hello list, I am using the python.msi (at the moment 2.6) in a project and want to deploy the python package smoothly and nearly automatically. So my question is, if the python.msi provides some parameters, to pass the information like which components to install and the install path, without pop

Re: alphanumeric list

2011-03-15 Thread Chris Rebert
On Tue, Mar 15, 2011 at 1:10 AM, yqyq22 wrote: > Hi all, > I would like to put an alphanumeric string like this one > EE472A86441AF2E629DE360 in a list, then iterate inside the entire > string lenght and change each digit with a random digit. > Do u have some suggestion? thanks a lot Can you show

Re: newbie question (for loop)

2011-03-15 Thread Chris Rebert
On Tue, Mar 15, 2011 at 1:01 AM, Sachin Kumar Sharma wrote: > I am getting error on the following syntax while running in Ipython and > spyder and I failed to figure out why > > for  i  in  range(len(list)) >      ^ > SyntaxError: invalid syntax You forgot the

alphanumeric list

2011-03-15 Thread yqyq22
Hi all, I would like to put an alphanumeric string like this one EE472A86441AF2E629DE360 in a list, then iterate inside the entire string lenght and change each digit with a random digit. Do u have some suggestion? thanks a lot -- http://mail.python.org/mailman/listinfo/python-list

newbie question (for loop)

2011-03-15 Thread Sachin Kumar Sharma
BB, I am getting error on the following syntax while running in Ipython and spyder and I failed to figure out why for i in range(len(list)) Error for i in range(len(list)) ^ SyntaxError: invalid syntax where list is a list defined as a collection

Re: Guido rethinking removal of cmp from sort method

2011-03-15 Thread Paul Rubin
Ian Kelly writes: > I would think that you can sort them with key as long as none of the > sequences are equal (which would result in an infinite loop using > either method). Why not this? Yes you can do something like that, but look how ugly it is compared with using cmp. -- http://mail.python

Re: How to schedule execution of code?

2011-03-15 Thread low kian seong
On Tue, Mar 15, 2011 at 3:16 PM, Virgil Stokes wrote: > Suppose that I have some Python code (vers. 2.6) that has been converted > into an *.exe file and can be executed on a Windows (Vista or 7) platform. > What can one do to have this *.exe executed at a set of specific times each > day? In add

How to schedule execution of code?

2011-03-15 Thread Virgil Stokes
Suppose that I have some Python code (vers. 2.6) that has been converted into an *.exe file and can be executed on a Windows (Vista or 7) platform. What can one do to have this *.exe executed at a set of specific times each day? In addition, if a day is missed (e.g. computer on which it resides