Hierosoft / pycodetool

Code conversion tools, mostly just for removing dependencies so far. Eliminates various issues and .NET calls such as introduced by icsharpcode snippet converter C# to Python translation. NOTE: Should be rewritten to use SLY.
GNU General Public License v2.0
1 stars 1 forks source link

pycodetool

(formerly PythonCodeTranslators)

Process code using Python. Search and process various languages using context (such as scope, comments, quotes, and escaping).

Features

Python parsing

Commands

Installing the module provides the following commands:

This package is used by:

Python.NET to standard Python

(framework_to_standard_python)

Note that GUI conversion is not tested or supported, but you can try it the manually implement whatever is missing (or use IronPython as necessary and not use pycodetool).

STEP 1

For now, you must use SharpDevelop 4.4.

  1. Open the project in SharpDevelop (4.4 is tested). If you can't open the project, merely create a new project and add all of the C# files first.
  2. Click "Project" (in the Menu bar at the top), "Convert", "From C# to Python"

See also C# to Haxe converters:

(Haxe can now output Python)

See also C# to Python converters:

Discussions about C# to Python conversion:

Non-working:

STEP 2

This step (and this project) is only necessary if you have some sort of IronPython code (such as created using SharpDevelop's C# to Python converter).

python_remove_dotnet.py removes non-standard Python as follows:

Changes

See changelog.md.

Known Issues

Developer Notes

Documentation

Tools

Testing

Use nose such as via python3 -m nose in the repo directory (requires the nose package such as via python3 -m pip install --user nose).