Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing & Converting Python Libraries #9

Open
notzoom opened this issue Jan 14, 2018 · 5 comments
Open

Importing & Converting Python Libraries #9

notzoom opened this issue Jan 14, 2018 · 5 comments

Comments

@notzoom
Copy link

notzoom commented Jan 14, 2018

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 ?

@uxmal
Copy link
Owner

uxmal commented Jan 17, 2018

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?

@notzoom
Copy link
Author

notzoom commented Feb 8, 2018

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

@thinklikeanarchitect
Copy link

It would be an amazing feature.

@sairam4123
Copy link

Yeah, this would be an amazing feature.

@GeorgeS2019
Copy link

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

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants