最近因为项目设计,有部分使用Python脚本,因此代码中需要调用python方法. 1.首先,在c#中调用python必须安装IronPython,在 http://ironpython.codeplex.com/ 中下载 2.对应用程序添加IronPython.dll和Microsoft.Scripting.dll 的引用 3.调用python: using System; using System.Collections.Generic; using System.Linq; using
近期在做一个漏洞展示平台,攻击实现部分使用python实现.c语言实现部分使用libcli库做一个类似telnet的东东,回调函数run的时候调用python模块. 针对c调用python,做个了小demo python模块:demo.py def print_arg(str): print str def add(a,b): print 'a=', a print 'b=', b return a + b class Class_A: def __init__(self): print "in