pytocs icon indicating copy to clipboard operation
pytocs copied to clipboard

Importing & Converting Python Libraries

Open notzoom opened this issue 8 years ago • 5 comments

This has been done by 2 major transpilers before and it would be tremendously useful.

Pytocs would look what libraries are imported and visit their source and if they are not tied to any OS functionality, they would be converted and imported in C sharp.

What is your view ?

notzoom avatar Jan 14 '18 17:01 notzoom

It is an intriguing option. With a command-line switch, you could ask pytocs to resolve not only the project you're currently working in, but also any (or maybe all?) of the Python libraries the current Python project is dependent on.

I'm relatively new to Python, and am unfamiliar with the mechanisms by which Python discovers the location of external libraries. I assume looking on the PYTHONPATH is an approach; an explicit command line is another.

Once the rewriting is of the library is done, it would be nice if the discovered classes + function definitions were quickly available should this be done again, to avoid redundant work. Do you have any suggestions on how this might be done?

uxmal avatar Jan 17 '18 06:01 uxmal

@uxmal Sorry - I forgot about your last question. You can try to see how https://github.com/QQuick/Transcrypt does that.

notzoom avatar Feb 08 '18 19:02 notzoom

It would be an amazing feature.

karadagi avatar Jan 05 '19 05:01 karadagi

Yeah, this would be an amazing feature.

sairam4123 avatar Sep 28 '20 03:09 sairam4123

If possible, aim to achieve easy to read parallel between the Python and the output csharp code as in Transcrypt

image

GeorgeS2019 avatar Jan 30 '21 11:01 GeorgeS2019