IronPython Error On Process.WaitforExit() Arguments
I am trying to run an external macro using IronPython. sometimes I am bugged by the error :
WaitForExit() takes at least 1 argument (0 given)
what argument should I insert?
here says nothing is needed
I do :
from System.Diagnostics import Process Process.Start(r"C:\python.exe", 'python.py') Process.WaitForExit()
WaitForExit is an instance method that needs to know which process you are waiting on. The code needs to be more along the lines of
from System.Diagnostics import Process process = Process.Start(r"C:\python.exe", 'python.py') process.WaitForExit()
Assuming a default IronPython installation the following sample shows that the main script actually waits in a more self-contained way (no dependency on installed CPython):
from System.Diagnostics import Process ipy = r"C:\Program Files\IronPython 2.7\ipy.exe" process = Process.Start(ipy, '-c "import time; time.sleep(10)"') process.WaitForExit()
- → What are the pluses/minuses of different ways to configure GPIOs on the Beaglebone Black?
- → Django, code inside <script> tag doesn't work in a template
- → React - Django webpack config with dynamic 'output'
- → GAE Python app - Does URL matter for SEO?
- → Put a Rendered Django Template in Json along with some other items
- → session disappears when request is sent from fetch
- → Python Shopify API output formatted datetime string in django template
- → Shopify app: adding a new shipping address via webhook
- → Shopify + Python library: how to create new shipping address
- → shopify python api: how do add new assets to published theme?
- → Access 'HTTP_X_SHOPIFY_SHOP_API_CALL_LIMIT' with Python Shopify Module