classification
Title: sys.argv[0] is the python file, not ""
Type: Stage:
Components: Documentation Versions: Python 3.5
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Wei, docs@python, random832
Priority: normal Keywords:

Created on 2016-01-09 04:38 by Wei, last changed 2016-01-09 04:52 by Wei. This issue is now closed.

Messages (2)
msg257795 - (view) Author: YoungBoy (Wei) Date: 2016-01-09 04:38
python tutorial 2.1.1
You can access this list by executing import sys. The length of the list is at least one; when no script and no arguments are given, sys.argv[0] is an empty string. 

but, when i try it, the sys.argv[0]is the filename,not empty string.
msg257796 - (view) Author: (random832) Date: 2016-01-09 04:46
By "when no script [is] given", it is referring to the use in the interactive interpreter, not in a python file.
History
Date User Action Args
2016-01-09 04:52:59Weisetstatus: open -> closed
resolution: not a bug
2016-01-09 04:46:58random832setnosy: + random832
messages: + msg257796
2016-01-09 04:38:16Weicreate