Re: file extension while saving Python files

2011-11-08 Thread Magnus Lyckå

On 2011-11-08 11:05, vaira muthu wrote:

In Python IDE, ...


Which Python IDE?

There are dozens:
http://wiki.python.org/moin/IntegratedDevelopmentEnvironments

--
http://mail.python.org/mailman/listinfo/python-list


Re: Resolve circular reference

2011-01-13 Thread Magnus Lyckå

On 2011-01-07 03:24, moerchendiser2k3 wrote:

Everything works fine, the problem starts when I start to make a
circular reference in Python.


I didn't quite grok your example, but concerning CPython GC  circular 
references...


 import gc
 class X:
... def __del__(self):
... print 'Deleted', self
...
 a = X()
 del a
Deleted __main__.X instance at 0x00CCCF80
 a=X()
 b=X()
 a.b=b
 b.a=a
 del a
 gc.collect()
0
 del b
 gc.collect()
4

--
http://mail.python.org/mailman/listinfo/python-list


Re: How to read ansic file into a pre-defined class?

2011-01-13 Thread Magnus Lyckå

On 2011-01-08 04:24, Ying Zu wrote:

How to read ansic file into a pre-defined class?

I have a series of files written in the following format,

...

You might like to take a look at the json module if you aren't locked to 
the exact format you suggested.


http://json.org/
http://docs.python.org/library/json.html#module-json


--
http://mail.python.org/mailman/listinfo/python-list