This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug python/13199] New: sys.argv[0] is not available


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]