vb调用python脚本,从vb.net执行python脚本

本文探讨了如何在VB.NET代码中执行Python脚本以创建GUI。作者提出了使用Shell命令的方式,并询问是否存在更合适的方法来处理错误。解决方案建议保持代码整洁,直接在Python中使用TKInter或wxPython等GUI库,或者根据具体开发需求考虑使用ArcGIS或GDAL的.NET API完成全部开发。
摘要由CSDN通过智能技术生成

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

解决方案

You could call python from within .NET but if the only reason you want to do that is because you want to design a GUI fro your Python, why not keep things 'cleaner' and do it all in Python? You can use TKInter or wxPython to name but two GUI APIs. The latt

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值