3

I have created a windows app which runs a python script. I'm able to capture the output of the script in textbox. Now i need to pass a shared object to python script as an argument from my app. what type of shared object should i create so that python script can accept it and run it or in simple words how do i create shared object which can be used by python script.

thanks

sia
  • 1,872
  • 1
  • 23
  • 54

2 Answers2

1

Since python is running as another process. This is no way for python to access object in c# directly since process isolation.

A way of marshal and un-marshal should be included to communicate between processes.

There are many way to communicate between processes. Share memory, file, TCP and so on.

comphilip
  • 500
  • 5
  • 15
1

5.4. Extending Embedded Python will help you to access the application object. In this case both application and python running in single process.

tijo
  • 11
  • 1