Swig for Python 2.6

2008-12-14 Thread Doron Tal
Hi I'm trying to wrap a c library for use with Python 2.6. I'm using swig 1.3.36, and I get the following error: linux-python/log_wrap.c: In function '_PySwigObject_type': linux-python/log_wrap.c:1680: warning: missing initializer linux-python/log_wrap.c:1680: warning: (near initialization for '

execfile (exec?) create non consistent locals() state

2009-04-21 Thread Doron Tal
Hi, Recently I tried to execute a python file using execfile (exec performed just the same for that reason). I encountered the behavior below: """ $ cat execme.py a = 2 $ python Python 2.4.3 (#1, May 24 2008, 13:57:05) [GCC 4.1.2 20070626 (Red Hat 4.1.2-14)] on linux2 Type "help", "copyright", "c

Re: execfile (exec?) create non consistent locals() state

2009-04-21 Thread Doron Tal
On Tue, Apr 21, 2009 at 9:13 PM, Chris Rebert wrote: > On Tue, Apr 21, 2009 at 9:08 AM, Doron Tal > wrote: > > Hi, > > > > Recently I tried to execute a python file using execfile (exec performed > > just the same for that reason). > > I encountered the b

GIL state during import

2010-02-16 Thread Doron Tal
Is the GIL released during import statement execution when accessing the file? If not, is it a bug? If it is not a bug, or it is here to stay for any other reason, I think it should be mentioned in the documentation. --doron -- http://mail.python.org/mailman/listinfo/python-list

Re: GIL state during import

2010-02-17 Thread Doron Tal
On Wed, Feb 17, 2010 at 1:01 AM, Terry Reedy wrote: > On 2/16/2010 4:37 PM, Doron Tal wrote: > >> Is the GIL released during import statement execution when accessing the >> file? >> If not, is it a bug? >> If it is not a bug, or it is here to stay for any other r

Re: GIL state during import

2010-02-17 Thread Doron Tal
On Wed, Feb 17, 2010 at 11:59 AM, Dave Angel wrote: > Terry Reedy wrote: > > On 2/16/2010 >> 4:37 PM, Doron Tal wrote: >> >>> Is the GIL released during import statement execution when accessing the >>> file? >>> If not, is it a bug? >>>

Re: file transfer in python

2009-06-26 Thread Doron Tal
On Fri, Jun 26, 2009 at 2:38 PM, jayesh bhardwaj wrote: > i am trying to find something useful in python to transfer html files > from one terminal to other. Can this be done with some module or shall > i start coding my own module using low level socket interface. If u > know about some books on

Re: Gracefully exiting CLI application

2009-07-27 Thread Doron Tal
On Tue, Jul 28, 2009 at 12:52 AM, Jan Kaliszewski wrote: > As I wrote, you must use signals. Though sometimes it's a good idea > to combine these two techniques (i.e. signal handlers call sys.exit(), > then sys.exitfunc/or function registered with atexit does the actual > cleaning actions). Ano

inspect.stack() performance

2009-08-06 Thread Doron Tal
I use inspect.stack() to extract some info, such as file name, function name and line number, for the sake of logging (home brew logger). I tested to see how much time it takes to execute the command: Python 2.4.3 (#1, Jan 21 2009, 01:11:33) [GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2 Type "

Re: Most "active" coroutine library project?

2009-08-23 Thread Doron Tal
On Sun, Aug 23, 2009 at 6:02 PM, Phillip B Oldham wrote: > I've been taking a look at the multitude of coroutine libraries > available for Python, but from the looks of the projects they all seem > to be rather "quiet". I'd like to pick one up to use on a current > project but can't deduce which i