Mr.Lee's CSharp Helpers
Project description
pylhbr4csharp
pylhbr4csharp 是我在工作过程中陆续整理的一个 Python C# 工具包,里面就放在一个关于C#操作的类及相关函数。与其说是一个正式的开源项目,不如说是我自己的“代码杂物间”——只不过把它打包了一下,方便在不同项目之间复用。
由于是个人使用为主,很多设计可能带着比较强的个人习惯,也未必是最优解。如果您发现了问题或有更好的建议,非常欢迎指正。
安装
pip install pylhbr4csharp
🌺mycsharp模块
执行C#源码
使用示例:
from pylhbr4csharp.mycsharp import MyCSharp
if __name__ == '__main__':
code = """
using System;
namespace MyTest
{
public class SayHelp
{
public string SayHello(string name)
{
return "Hello " + name;
}
}
}
"""
dlls=["System.dll","mscorlib.dll"]
mycsharp=MyCSharp(code,dlls)
if mycsharp.compiler():
result=mycsharp.callMethod("SayHelp","SayHello",['李生',])
print(result)
else:
count,errMsg=mycsharp.getErrors()
print(count)
print(errMsg)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pylhb4csharp-1.0.0.tar.gz
(3.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pylhb4csharp-1.0.0.tar.gz.
File metadata
- Download URL: pylhb4csharp-1.0.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f10fe92ba94dcbb6f98b8359e550ba4fc5f7bf7985b67097efb86d41704868c
|
|
| MD5 |
49d29af0f2ee3d48a1bc57724ff8db51
|
|
| BLAKE2b-256 |
3511d71c35f866aa9ad52be86b1cbe447d1bcfd92debb846292a4bef2dbb0c49
|
File details
Details for the file pylhb4csharp-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pylhb4csharp-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ceb5a5e41dbfa6be03053d9c1e0c8b01d154ff6e6d6f30cb565fa87c8393af28
|
|
| MD5 |
48c2a1957b18af32778f3b408b59af84
|
|
| BLAKE2b-256 |
608b2ceb2766757f011487786b879268f5cdf14b47b988e41ab5a69bef714bf6
|