On Oct 23, 7:44 pm, aaabb...@hotmail.com wrote:
> exp:
> os.system('ls -al')
> #I like to catch return value after this command. 0 or 1,2,3
> does python support to get "$?"?
> then I can use something like:
> If $?==0:
>
>
> TIA
> david
So for what I do is:
r_n
exp:
os.system('ls -al')
#I like to catch return value after this command. 0 or 1,2,3
does python support to get "$?"?
then I can use something like:
If $?==0:
TIA
david
--
http://mail.python.org/mailman/listinfo/python-list
On 10月15日, 上午12时04分, Chris Rebert wrote:
> On Fri, Oct 14, 2011 at 11:20 PM, wrote:
> > Test.py
> > #!/usr/bin/python
> > from my_lib import test
> > class my_class(my_function.name):
>
> Why are you subclassing my_function.name and not just my_function?
try to inherit or change "name" attribute
Test.py
#!/usr/bin/python
from my_lib import my_function
class my_class(my_function.name):
def __initial__(self, name);
pass
def test():
print "this is a test"
If __name__ == '__maim__':
my_class.main()
---
my_lib.py
class