简体   繁体   中英

shared object in C# to be used in python script

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

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM