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

2
  • I suggest you look into IronPython - ironpython.net Commented Jun 16, 2014 at 7:30
  • @Daniel Kelley - i don't want to use IronPython. Commented Jun 16, 2014 at 7:48

2 Answers 2

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.

Sign up to request clarification or add additional context in comments.

2 Comments

using the Process approach.. i can run the python script from c#
@sia Process get only strings as prms, the OP asked about sharing objects
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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.