Message94173
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. |
|
Date |
User |
Action |
Args |
2009-10-17 11:14:50 | markon | set | recipients:
+ markon, kuiper |
2009-10-17 11:14:50 | markon | set | messageid: <1255778090.32.0.308260191777.issue7158@psf.upfronthosting.co.za> |
2009-10-17 11:14:47 | markon | link | issue7158 messages |
2009-10-17 11:14:46 | markon | create | |
|