From: Syver E. <syv...@on...> - 2002-01-24 10:19:50
|
Ganesan R <rga...@my...> writes: Here's a quick hack os.popen, it only works for reading at the time, but would be easy to fix I believe. def popen(path, mode='r'): r = java.lang.Runtime.getRuntime() p = r.exec(path) if mode == 'w': return org.python.core.PyFile(p.getInputStream()) elif mode == 'r': return org.python.core.PyFile(p.getOutputStream()) else: raise OSError(0, "Invalid mode", mode) -- Vennlig hilsen Syver Enstad |