Re-loading updated modules

2006-06-27 Thread fileexit
Hi, Shouldn't python recompile a module if there is a later version of the code (.py file)? While i am debuging, i always have to exit python and delete the pyc before every run, then start it again and import the modules. It seems that this is the only way for it to recompile the new code. What

Re: spliting on :

2006-03-06 Thread fileexit
yyy yyy yyy xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx of course you will get this result... inside the loop, when line=xxx.xxx.xxx.xxx:yyy line.split(:) will give a list [xxx.xxx.xxx.xxx, yyy], and element -1 will be yyy but when line=xxx.xxx.xxx.xxx line.split(:) will give a list

Regular expression gone mad

2006-02-20 Thread fileexit
Hi, Would someone please tell me what is going on here??!! Why does the following code work a=rMem pat = re.compile(a) m=pat.search(ProcMem, re.DOTALL) m _sre.SRE_Match object at 0xb7f7eaa0 m.group(0) 'Mem' But this one does not!!! (Search finds nothing) a=rMemT pat = re.compile(a)

How to run shell commands within python

2006-02-16 Thread fileexit
How can I execute shell commands from within python. Specifically, I am looking for something like the shell cat. But this also made me wonder how to execute shell commands anyway, just if i needed to do that in the future. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to run shell commands within python

2006-02-15 Thread fileexit
thanks... i was to hasty to post this question, i found a good answer here: http://groups.google.com/group/comp.lang.python/browse_thread/thread/ffdab847125f81b6 -- http://mail.python.org/mailman/listinfo/python-list