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
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
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
Hi,
Would someone please tell me what is going on here??!! Why does the
following code work
>>> a=r"Mem"
>>> 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=r"MemT"
>>
> 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