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

Support embeddable Python #2509

Closed
abergmeier-dsfishlabs opened this issue Feb 8, 2017 · 5 comments
Closed

Support embeddable Python #2509

abergmeier-dsfishlabs opened this issue Feb 8, 2017 · 5 comments

Comments

@abergmeier-dsfishlabs
Copy link
Contributor

Description of the problem / feature request / question:

Starting with Python 3.5, on Windows there is an embeddable Python variant, which is as isolated as possible. It does not however allow modifying by environment variables (e.g. PYTHONPATH). There are alternating control files for that variant, which are currently not supported.

Environment info

  • Operating System: Windows
@abergmeier-dsfishlabs
Copy link
Contributor Author

@meteorcloudy Not sure who other than you (for Windows) is invested in Python.

@abergmeier-dsfishlabs
Copy link
Contributor Author

See this discussion about how to communicate with Python embeddable: https://bugs.python.org/issue29503

@abergmeier-dsfishlabs
Copy link
Contributor Author

abergmeier-dsfishlabs commented Feb 8, 2017

So the way to replace PYTHONPATH for embeddable would probably be to use:

args = [python_program, "-c", """\
import importlib
import sys
path=%s.rsplit(os.sep, 1)
sys.path.append(path[0])
sys.path.extend(python_path_list)
importlib.import_module(path[1])
""" % main_filename] + args

Would you guys consider taking patches for that?

@abergmeier
Copy link
Contributor

I think it would perhaps also be a good idea to set -e when calling Python.

@dslomov dslomov modified the milestones: 0.7, 0.6 Jul 24, 2017
@abergmeier-dsfishlabs
Copy link
Contributor Author

Closing since I will close account.

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

No branches or pull requests

4 participants