diff --git a/Python.System.sln b/Python.System.sln deleted file mode 100644 index 68eab8b..0000000 --- a/Python.System.sln +++ /dev/null @@ -1,37 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.5.33627.172 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Python.System", "Python.System\Python.System.csproj", "{CAAA3827-188E-49E5-9293-5708EEC891BF}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Python.SystemDemo", "Python.SystemDemo\Python.SystemDemo.csproj", "{86746963-6158-4728-B19A-AC6D78C8486F}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Python.SystemTests", "Python.SystemTests\Python.SystemTests.csproj", "{5D183A65-E961-4B9F-9365-1BA794005A64}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {CAAA3827-188E-49E5-9293-5708EEC891BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CAAA3827-188E-49E5-9293-5708EEC891BF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CAAA3827-188E-49E5-9293-5708EEC891BF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CAAA3827-188E-49E5-9293-5708EEC891BF}.Release|Any CPU.Build.0 = Release|Any CPU - {86746963-6158-4728-B19A-AC6D78C8486F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {86746963-6158-4728-B19A-AC6D78C8486F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {86746963-6158-4728-B19A-AC6D78C8486F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {86746963-6158-4728-B19A-AC6D78C8486F}.Release|Any CPU.Build.0 = Release|Any CPU - {5D183A65-E961-4B9F-9365-1BA794005A64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5D183A65-E961-4B9F-9365-1BA794005A64}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5D183A65-E961-4B9F-9365-1BA794005A64}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5D183A65-E961-4B9F-9365-1BA794005A64}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {19598AB3-02E0-4316-A003-BDCAC338A7DA} - EndGlobalSection -EndGlobal diff --git a/README.md b/README.md index b2b9eec..83a9b5b 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -# Python.System +# System.Python -[![GitHub stars](https://img.shields.io/github/stars/heartacker/Python.System?style=for-the-badge)](https://github.com/heartacker/Python.System) -[![Nuget](https://img.shields.io/nuget/v/Python.System?style=for-the-badge)](https://www.nuget.org/packages/Python.System) -![Nuget](https://img.shields.io/nuget/dt/Python.System?style=for-the-badge) -[![GitHub release](https://img.shields.io/github/v/release/heartacker/Python.System?style=for-the-badge)](https://github.com/heartacker/Python.System/releases) +[![GitHub stars](https://img.shields.io/github/stars/heartacker/System.Py?style=for-the-badge)](https://github.com/heartacker/System.Py) +[![Nuget](https://img.shields.io/nuget/v/System.Py?style=for-the-badge)](https://www.nuget.org/packages/System.Py) +![Nuget](https://img.shields.io/nuget/dt/System.Py?style=for-the-badge) +[![GitHub release](https://img.shields.io/github/v/release/heartacker/System.Py?style=for-the-badge)](https://github.com/heartacker/System.Py/releases) **write c# script like python** @@ -20,11 +20,11 @@ We aim to implement the **built-in function of python in `C#`** and **direct use -🔗 [ **C#** ](./Python.System.Demo.csx) +🔗 [ **C#** ](./System.Py.Demo.csx) ```csharp -#r "nuget: Python.System, *" -using static Python.System; +#r "nuget: System.Py, *" +using static System.Py; var addr = 0x12345678; var addrr = hex(addr); @@ -49,10 +49,10 @@ print(c, sep:"\t"); -🔗 [ **Python** ](./Python.System.Compare.py) +🔗 [ **Python** ](./System.Py.Compare.py) ```python -#r +#r "nuget: System.Py, *" addr = 0x12345678 @@ -123,11 +123,11 @@ print(c, sep="\t") ```shell ~$ dotnet-script -> #r "nuget: Python.System, *" -> using static Python.System; +> #r "nuget: System.Py, *" +> using static System.Py; > hex(1024) "0x400" -> print("Hello Scripy") -Hello Scripy +> print("Hello System.Py") +Hello System.Py ``` \ No newline at end of file diff --git a/Python.System.Compare.py b/System.Py.Compare.py similarity index 87% rename from Python.System.Compare.py rename to System.Py.Compare.py index 72071e2..531e436 100644 --- a/Python.System.Compare.py +++ b/System.Py.Compare.py @@ -1,4 +1,4 @@ -#r "nuget: Python.System, *" +#r "nuget: System.Py, *" addr = 0x12345678 diff --git a/Python.System.Demo.csx b/System.Py.Demo.csx similarity index 81% rename from Python.System.Demo.csx rename to System.Py.Demo.csx index 8c6af67..eb59391 100644 --- a/Python.System.Demo.csx +++ b/System.Py.Demo.csx @@ -1,5 +1,5 @@ -#r "nuget: Python.System, *" -using static Python.System; +#r "nuget: System.Py, *" +using static System.Py; var addr = 0x12345678; var addrr = hex(addr); diff --git a/Python.System.Demo.dib b/System.Py.Demo.dib similarity index 88% rename from Python.System.Demo.dib rename to System.Py.Demo.dib index 5006eb4..bec02a1 100644 --- a/Python.System.Demo.dib +++ b/System.Py.Demo.dib @@ -4,11 +4,11 @@ #!csharp -#r "nuget: Python.System, *" +#r "nuget: System.Py, *" #!csharp -using static Python.System; +using static System.Py; var addr = 0x12345678; var addrr = hex(addr); diff --git a/System.Py.sln b/System.Py.sln new file mode 100644 index 0000000..da84ed6 --- /dev/null +++ b/System.Py.sln @@ -0,0 +1,37 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.5.33627.172 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Py", "System.Py\System.Py.csproj", "{48C41B40-E55F-418B-B218-0FE7687A06A6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.PyTests", "System.PyTests\System.PyTests.csproj", "{6F141EAD-2C3F-440E-A8A3-94BE075C2587}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.PyDemo", "System.PyDemo\System.PyDemo.csproj", "{F591BA7D-7209-4EF6-BB1C-BDC11A333D0E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {48C41B40-E55F-418B-B218-0FE7687A06A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {48C41B40-E55F-418B-B218-0FE7687A06A6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {48C41B40-E55F-418B-B218-0FE7687A06A6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {48C41B40-E55F-418B-B218-0FE7687A06A6}.Release|Any CPU.Build.0 = Release|Any CPU + {6F141EAD-2C3F-440E-A8A3-94BE075C2587}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6F141EAD-2C3F-440E-A8A3-94BE075C2587}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6F141EAD-2C3F-440E-A8A3-94BE075C2587}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6F141EAD-2C3F-440E-A8A3-94BE075C2587}.Release|Any CPU.Build.0 = Release|Any CPU + {F591BA7D-7209-4EF6-BB1C-BDC11A333D0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F591BA7D-7209-4EF6-BB1C-BDC11A333D0E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F591BA7D-7209-4EF6-BB1C-BDC11A333D0E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F591BA7D-7209-4EF6-BB1C-BDC11A333D0E}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {19598AB3-02E0-4316-A003-BDCAC338A7DA} + EndGlobalSection +EndGlobal diff --git a/Python.System/ObsoleteAttr.cs b/System.Py/ObsoleteAttr.cs similarity index 95% rename from Python.System/ObsoleteAttr.cs rename to System.Py/ObsoleteAttr.cs index c9ec807..4ea0b3b 100644 --- a/Python.System/ObsoleteAttr.cs +++ b/System.Py/ObsoleteAttr.cs @@ -1,6 +1,6 @@ using System; -namespace Python.Attr +namespace Internal.Py.Attributes { [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | diff --git a/Python.System/System.cs b/System.Py/Py.cs similarity index 98% rename from Python.System/System.cs rename to System.Py/Py.cs index 28790a2..f23810f 100644 --- a/Python.System/System.cs +++ b/System.Py/Py.cs @@ -19,10 +19,10 @@ #if false using ObsoleteAttribute = System.ObsoleteAttribute; #else -using ObsoleteAttribute = Python.Attr.ObsoleteAttribute; +using ObsoleteAttribute = Internal.Py.Attributes.ObsoleteAttribute; #endif -namespace Python +namespace System { /// /// A: @@ -136,7 +136,7 @@ namespace Python /// _ /// __import__() /// - public static class System + public static class Py { #region abs diff --git a/Python.System/S.System.png b/System.Py/S.System.png similarity index 100% rename from Python.System/S.System.png rename to System.Py/S.System.png diff --git a/Python.System/Python.System.csproj b/System.Py/System.Py.csproj similarity index 92% rename from Python.System/Python.System.csproj rename to System.Py/System.Py.csproj index 8bcc6c7..efa2c88 100644 --- a/Python.System/Python.System.csproj +++ b/System.Py/System.Py.csproj @@ -12,12 +12,12 @@ MIT S.System.png - https://github.com/heartacker/Static.System.git + https://github.com/heartacker/System.Python.git git static;python;function;script; 初始化版本。添加 hex,bin,print 函数 0.0.0.2 - 1.0.3 + 1.0.4 diff --git a/Python.SystemDemo/SystemDemo.cs b/System.PyDemo/Python.Demo.cs similarity index 92% rename from Python.SystemDemo/SystemDemo.cs rename to System.PyDemo/Python.Demo.cs index c0b44aa..6372de9 100644 --- a/Python.SystemDemo/SystemDemo.cs +++ b/System.PyDemo/Python.Demo.cs @@ -1,4 +1,4 @@ -using static Python.System; +using static System.Py; using System.Collections.Generic; using System.Linq; using System.Text; diff --git a/Python.SystemDemo/Python.SystemDemo.csproj b/System.PyDemo/System.PyDemo.csproj similarity index 81% rename from Python.SystemDemo/Python.SystemDemo.csproj rename to System.PyDemo/System.PyDemo.csproj index 630602d..6d35ebe 100644 --- a/Python.SystemDemo/Python.SystemDemo.csproj +++ b/System.PyDemo/System.PyDemo.csproj @@ -12,7 +12,7 @@ - + diff --git a/Python.SystemTests/SystemTests.cs b/System.PyTests/PyTests.cs similarity index 93% rename from Python.SystemTests/SystemTests.cs rename to System.PyTests/PyTests.cs index b64a164..be7667d 100644 --- a/Python.SystemTests/SystemTests.cs +++ b/System.PyTests/PyTests.cs @@ -5,12 +5,12 @@ using System.Text; using System.Threading.Tasks; -using static Python.System; +using static System.Py; -namespace Python.Tests +namespace System.Tests { [TestClass()] - public class SystemTests + public class PyTests { [TestMethod()] [DataRow(10, "0xA")] diff --git a/Python.SystemTests/Python.SystemTests.csproj b/System.PyTests/System.PyTests.csproj similarity index 84% rename from Python.SystemTests/Python.SystemTests.csproj rename to System.PyTests/System.PyTests.csproj index ab52d65..75c4be0 100644 --- a/Python.SystemTests/Python.SystemTests.csproj +++ b/System.PyTests/System.PyTests.csproj @@ -1,4 +1,4 @@ - + net7.0 @@ -17,7 +17,7 @@ - + diff --git a/Python.SystemTests/Usings.cs b/System.PyTests/Usings.cs similarity index 100% rename from Python.SystemTests/Usings.cs rename to System.PyTests/Usings.cs