[IronPython] os.system

Michael Foord fuzzyman at voidspace.org.uk
Thu Jul 24 01:23:02 CEST 2008


Dino Viehland wrote:
>
> They’re in the nt module – usually w/ CPython the os module, which is 
> written in Python, loads the appropriate module (nt/unix/etc…) and 
> delegates to that. In IronPython 2.0 nt now implements both popen* and 
> system. In 1.x we only support popen* and not system.
>

To clarify Dino's response slightly - if you make sure that the Python 
standard library is on your path then yhou can 'import os' in Python.

Michael

> *From:* users-bounces at lists.ironpython.com 
> [mailto:users-bounces at lists.ironpython.com] *On Behalf Of *John Case 
> (Excell Data Corporation)
> *Sent:* Wednesday, July 23, 2008 4:12 PM
> *To:* Users at lists.ironpython.com
> *Subject:* [IronPython] os.system
>
> Hello:
>
> With IronPython, what do I use instead of os.system(‘dir’), or 
> os.popen(‘dir’) to achieve the same result?
>
> Thank you very much!
>
> John Case
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>   


-- 
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/
http://www.trypython.org/
http://www.ironpython.info/
http://www.theotherdelia.co.uk/
http://www.resolverhacks.net/




More information about the Ironpython-users mailing list