Marco Buccini <[email protected]> added the comment:
I think this is not a Python bug, since it concerns PyQt.
You're passing a QString object to os.path.split(), while the official
documentation wants you pass a Python string.
However, when I tried to run your example, newWF.py, and tried to open a
file from the menu, I got this:
controls.nch: 1024
Controls Window data shape: (511, 1024)
Data file: None
/home/marco/Programmi/Python-2.6.3/pyconfig.h
Traceback (most recent call last):
File "issue7158.py", line 277, in openDataFile
head,tail = os.path.split(filename)
File "/usr/lib/python2.5/posixpath.py", line 77, in split
i = p.rfind('/') + 1
AttributeError: 'QString' object has no attribute 'rfind'
Why does this happen?
`filename` is a QString object. (you can see why here:
http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qfiledialog.html#getOpenFileName
)
So how do you split your filename? I don't know.
I should close this bug.
----------
nosy: +markon
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue7158>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com