Pedro <pgacv2+pythonb...@gmail.com> added the comment:

My first inclination would be no. An argv value of [''] means "zero 
command-line arguments" (not even a filename), which implies the following as 
far as I know:
1. Python was called as an executable rather than a library, because you can't 
pass command-line arguments to a library
2. No arguments were passed to the executable
3. You are running from inside the REPL

All three are false in an embedded context.

A not-much-better-but-maybe-worth-considering question might also be: should 
scripts be able to tell whether they are being run from an embedded 
interpreter? If so, do they have any other way of doing so if an initialization 
is forced for argv?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32573>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to