Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

execute python script from vb.net

How I could execute a python script from within the VB.NET code?

I would like to use VB.NET for building a GUI for my python script. This is to be able to create a GUI for the user of a script.

I found this example:

Shell(c:\Program Files\python 266\python.exe path\myPythonScript.py +
       " " + arg1 + " " + argN)

But I would like to know is there a more suitable way of executing python script?

I would also like to understand how I could handle errors in such setup.

Your help much appreciated!

Thanks,

meryloo

like image 528
meryloo Avatar asked Oct 31 '25 02:10

meryloo


1 Answers

In VB you can also use the command:

 shell( "d:\path\to\your\script.py arg1 arg2" )
like image 171
warrieka Avatar answered Nov 01 '25 17:11

warrieka