Re: os.tmpfile() vs. tempfile.TemporaryFile()

2010-11-11 Thread danmcle...@yahoo.com
On Nov 11, 11:32 am, John Nagle wrote: >    Is there any reason to prefer "tempfile.TemporaryFile()" > over "os.tmpfile()"?  Both create a nameless temporary file > that will be deleted on close. > >                                 John Nagle tempfile.TemporaryFile has more options, e.g. file pre

Re: A matter of queues, tasks and multiprocessing

2010-11-10 Thread danmcle...@yahoo.com
If you are using Python 2.6 or greater, look into the multiprocessing module. It may contain 90% of what you need. -- http://mail.python.org/mailman/listinfo/python-list

Re: What is the best way to handle a missing newline in the following case

2010-11-05 Thread danmcle...@yahoo.com
> The problem is when I get to the last line. When the program sees '\n' > after the 9, everything works fine. However, when there isn't a '\n', > the program doesn't process the last line. > > What would be the best approach to handle the case of the possible > missing '\n' at the end of the file?

Re: Getting Local MAC Address

2010-04-02 Thread danmcle...@yahoo.com
On Apr 2, 2:52 pm, "danmcle...@yahoo.com" wrote: > On Apr 2, 2:14 pm, Booter wrote: > > > Hello all, > > > I am new to python ans was wondering if there was a way to get the mac > > address from the local NIC? > > > Thanks for your help. &

Re: Getting Local MAC Address

2010-04-02 Thread danmcle...@yahoo.com
On Apr 2, 2:52 pm, "danmcle...@yahoo.com" wrote: > On Apr 2, 2:14 pm, Booter wrote: > > > Hello all, > > > I am new to python ans was wondering if there was a way to get the mac > > address from the local NIC? > > > Thanks for your help. &

Re: Getting Local MAC Address

2010-04-02 Thread danmcle...@yahoo.com
On Apr 2, 2:14 pm, Booter wrote: > Hello all, > > I am new to python ans was wondering if there was a way to get the mac > address from the local NIC? > > Thanks for your help. > > Gerad for windows parse p.stdout.read(): import subprocess p = subprocess.Popen('ipconfig', shell = True, stdout =

Re: How to run python without python

2010-04-02 Thread danmcle...@yahoo.com
On Apr 2, 11:23 am, Chris Rebert wrote: > On Fri, Apr 2, 2010 at 10:09 AM, danmcle...@yahoo.com > > wrote: > > On Apr 1, 5:54 pm, Chris Rebert wrote: > >> On Thu, Apr 1, 2010 at 4:46 PM, Krister Svanlund > >> wrote: > >> > On Fri, Apr 2, 2010 a

Re: How to run python without python

2010-04-02 Thread danmcle...@yahoo.com
On Apr 2, 11:09 am, "danmcle...@yahoo.com" wrote: > On Apr 1, 5:54 pm, Chris Rebert wrote: > > > > > On Thu, Apr 1, 2010 at 4:46 PM, Krister Svanlund > > > wrote: > > > On Fri, Apr 2, 2010 at 1:36 AM, Spencer wrote: > > >> Is there a

Re: How to run python without python

2010-04-02 Thread danmcle...@yahoo.com
On Apr 1, 5:54 pm, Chris Rebert wrote: > On Thu, Apr 1, 2010 at 4:46 PM, Krister Svanlund > > wrote: > > On Fri, Apr 2, 2010 at 1:36 AM, Spencer wrote: > >> Is there a way to developing a script on linux and give it > >> to someone on microsoft, so that they could run it on microsoft > >> withou

Re: How to execute a script from another script and other script does not do busy wait.

2010-01-07 Thread danmcle...@yahoo.com
On Jan 7, 9:18 am, Jorgen Grahn wrote: > On Thu, 2010-01-07, Rajat wrote: > > I want to run a python script( aka script2) from another python script > > (aka script1). While script1 executes script2 it waits for script2 to > > complete and in doing so it also does some other useful work.(does not

Re: Python 2.4.3 array memory leak

2009-05-07 Thread danmcle...@yahoo.com
On May 7, 4:41 pm, Terry Reedy wrote: > danmcle...@yahoo.com wrote: > > I am using the array module to instantiate many arrays in my > > application. It seems like there is a memory leak in there somewhere. > > Can anyone confim this and let me know what, if anything, I can

Re: Python 2.4.3 array memory leak

2009-05-07 Thread danmcle...@yahoo.com
On May 7, 3:58 pm, "danmcle...@yahoo.com" wrote: > On May 7, 3:47 pm, "danmcle...@yahoo.com" > wrote: > > > > > On May 7, 3:31 pm, "danmcle...@yahoo.com" > > wrote: > > > > I am using the array module to instantiate many ar

Re: Python 2.4.3 array memory leak

2009-05-07 Thread danmcle...@yahoo.com
On May 7, 3:47 pm, "danmcle...@yahoo.com" wrote: > On May 7, 3:31 pm, "danmcle...@yahoo.com" > wrote: > > > > > I am using the array module to instantiate many arrays in my > > application. It seems like there is a memory leak in there somewhere.

Re: Python 2.4.3 array memory leak

2009-05-07 Thread danmcle...@yahoo.com
On May 7, 3:31 pm, "danmcle...@yahoo.com" wrote: > I am using the array module to instantiate many arrays in my > application. It seems like there is a memory leak in there somewhere. > Can anyone confim this and let me know what, if anything, I can do > about it? I am usi

Python 2.4.3 array memory leak

2009-05-07 Thread danmcle...@yahoo.com
I am using the array module to instantiate many arrays in my application. It seems like there is a memory leak in there somewhere. Can anyone confim this and let me know what, if anything, I can do about it? I am using Fedora Core 5 Linux: import commands import array import itertools import sys