0

I run a simple piece of code using python which I would like to open another program in pypy (as this is much faster).

I would also like to be able to pass in a dictionary into the pypy program.

I can get the file to open using...

subprocess.Popen(['c:\pypy-2.0-beta1\pypy.exe', os.path.expanduser('Main.py')])

but I have no idea how to pass in a dictionary or how to open a specific function within the pypy program.

user1696811
  • 941
  • 4
  • 10
  • 20
  • this would be the same as starting any other program using subprocess. You'll need some sort of IPC mechanism. – cha0site Jan 31 '13 at 16:48
  • what is an IPC mechanism? – user1696811 Jan 31 '13 at 16:54
  • IPC is InterProcess Communication. It basically a complicated way of saying "some way for process to pass information". Files, sockets, and pipes are examples of IPC mechanisms. – cha0site Jan 31 '13 at 16:55

1 Answers1

1

I suggest you look into execnet (http://pypi.python.org/pypi/execnet), it's a pretty cool library to do this kind of stuff.

fijal
  • 3,190
  • 18
  • 21