Why is "sys.argv" not available in Sublime API?
python, sublimetext2
Solution
Because sublime plugins are not scripts. There is no command line, so there are no command line arguments to parse.
Python, in Sublime, is embedded, and for embedded python code to have `sys.argv` set, Sublime would have to set the arguments explicitly. See Intro to embedding Python.
If you feel strongly about this, you'd have to make a case with the Sublime Text 2 developer to add a `PySys_SetArgvEx(argc, argv, updatepath)` call after `Py_Initialize()`.
Problem
This question was already asked on Sublime Forum, but it seems no one can answer it. Maybe you can? I've got the same issue on Windows 7 and 8, Sublime 2.0.1 x86 version: ``` Traceback (most recent call last): File "./sublime_plugin.py", line 362, in run_ File "./myTestPlugin.py", line 8, in run AttributeError: 'module' object has no attribute 'argv' ```