On Aug 24, 2019, at 00:25, Michael Hooreman <[email protected]> wrote:
> 
> In fact, I should add more than the python executable in prog: it must 
> contain -m and the package « classpath »

But that’s not a valid prog. If you try to execute the program “python -m spam” 
with arguments “eggs” and “cheese” (whether with exec, or something higher 
level like the shell, or Python’s subprocess module), you’re just going to get 
an error because there’s nothing named “python -m spam” on the PATH.

If you’re really trying to reproduce what the user typed (modulo any quoting 
and escaping, which you can only guess at because the shell doesn’t preserve 
the distinction between “spam 'my arg'” and “spam my\ arg”, etc.), the prog is 
“python”, and the args are [“python”, “-m”, “spam”, “eggs”, “cheese”].

I’d ask again why you’re not using a setuptools entrypoint script here.
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/4DIBTTVBB6CWUKTPAEHGOLRZ5TEV2TCF/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to