This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug python/13199] New: sys.argv[0] is not available
- From: "teawater at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Mon, 19 Sep 2011 09:02:31 +0000
- Subject: [Bug python/13199] New: sys.argv[0] is not available
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=13199
Bug #: 13199
Summary: sys.argv[0] is not available
Product: gdb
Version: HEAD
Status: NEW
Severity: critical
Priority: P2
Component: python
AssignedTo: unassigned@sourceware.org
ReportedBy: teawater@gmail.com
Classification: Unclassified
(gdb) python print sys.argv()
Traceback (most recent call last):
File "<string>", line 1, in <module>
AttributeError: 'module' object has no attribute 'argv'
Error while executing Python code.
It will make python-tk cannot work with python, for example:
(gdb) shell cat 2.py
#!/usr/bin/python
import gdb;
import Tkinter
root = Tkinter.Tk()
root.mainloop()
(gdb) source 2.py
Traceback (most recent call last):
File "2.py", line 6, in <module>
root = Tkinter.Tk()
File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1683, in __init__
baseName = os.path.basename(sys.argv[0])
AttributeError: 'module' object has no attribute 'argv'
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.