# Python sub process!?

**URL:** <https://forum.dynamobim.com/t/python-sub-process/43847>\
**Category:** Developers\
**Created:** [November 30, 2019, 5:17pm UTC](https://forum.dynamobim.com/t/python-sub-process/43847 "2019-11-30T17:17:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![saju\_autodesk](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/saju_autodesk/32/61838_2.png) [@saju\_autodesk](https://forum.dynamobim.com/u/saju_autodesk)\
**Post date:** [November 30, 2019, 5:17pm UTC](https://forum.dynamobim.com/t/python-sub-process/43847/1 "2019-11-30T17:17:13Z")

</div>

Hello everybody,  
Recently I came across sub process in python and decided to put hands on and i was able to run windows command promt from iron python inside dynamo that leds to few questions

1. Can we call python inside iron python as sub process and use the packages we weren’t able to use before and get the output back in iron python?

2. Have you ever tried such a thing? If so can you post it for my reference.

Actually I have a friend who is a data scientist I am looking forward to learn ML from him and bring it to dynamo via the process.

---

<div class="post-metadata">

**Author:** ![cgartland](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/cgartland/32/45378_2.png) [@cgartland](https://forum.dynamobim.com/u/cgartland)\
**Post date:** [December 1, 2019, 3:15am UTC](https://forum.dynamobim.com/t/python-sub-process/43847/2 "2019-12-01T03:15:35Z")

</div>

I’ve never tried this, but it might be crazy enough to work. See this entry in the [IronPython Cookbook](http://www.ironpython.info/index.php?title=Launching_Sub-Processes) for reference. You might be able to use the [pickle](https://docs.python.org/2.7/library/pickle.html) module to pass data between your IronPython node and your CPython script.

---

<div class="post-metadata">

**Author:** ![saju\_autodesk](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/saju_autodesk/32/61838_2.png) [@saju\_autodesk](https://forum.dynamobim.com/u/saju_autodesk)\
**Post date:** [December 3, 2019, 12:59pm UTC](https://forum.dynamobim.com/t/python-sub-process/43847/3 "2019-12-03T12:59:26Z")

</div>

@cgartland thanks for the input,starting from there I was able to call c-python with subprocess but, still have a long way to go checking it with std inputs ect…

here is a screen shot.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/f/dfc7159f8938fba38f5758024929ffa66736c235.png)

One important Question that makes me worried is that how do I make sure if the end user has the packages installed?

Is there a way to Pip install right from our python script instead of calling cmd.?

I tried calling command to pip install before starting to run actual code but doesnt work

`subprocess.call(['cmd','pip install networkx'])`
