For a file located /home/rrg29876/villy/air.out
, all is well when I run the following code in Windows:
#Open a FileDialog to pull in supported data
formats = ("R Output Files (*.out);;"
"Rc Output Files (*.out);;"
"A Average Files (*.avg);;"
"A Timestep Files (*.tim)")
fileName, filtr = QFileDialog.getOpenFileName(self,
"Select A Data File to Open", self.defdir, formats)
self.defdir = path.split(fileName)[0]
print "self.defdir: ",self.defdir
print "fileName: ", fileName
print "filtr: ", filtr
But in Linux I get:
self.defdir: /home/rrg29876/vill
fileName: home/rrg29876/villy/D
filtr: Rc Output
and then I cannot do anything in my program because the filename and filtr are wrong..
Can anyone help explain this truncation to me and/or suggest ways to fix/get around this?