[Tutor] Re: [wxPython] really stange behaviour
Robin Dunn
robin@alldunn.com
Mon, 5 Nov 2001 08:42:00 -0800
> Take a look at this:
> ===
> >>> import os
> >>> user = os.getenv('USER')
> >>> print user
> dida
> >>> group = os.system('set -- `groups $USER`; echo $3')
> staff
> >>> print group
> 0
> ===
>
> How did this happened? The reason i create this is for managing
> users. I run python in my environment. How can i take the
> (os.system...) value?
1. This has nothing to do with wxPython.
2. What did you expect? (See the docs for os.system)
3. You probably wanted os.popen.
--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!