A Divendres 06 Febrer 2009 14:48:39, Grzegorz Adam Hankiewicz va escriure: > Hello. > > I'm implementing a drag and drop application where the user drags > files from the explorer and drops them on a label. The label processes > the files and loads them. > > Under MacOSX this is working all well, but under Windows I am getting > paths like u"/C:/Documents and Settings/blah blah". Certainly the > leading slash is not welcome. How come it got into there and how > should I remove it? > > I know I can remove the first slash under Windows (I've just done it > and works ok), but I would prefer to not have platform specific code. > Is there any Qt normalization path which will return something I can > pass to open() without having to parse it first? > _______________________________________________ > PyQt mailing list [email protected] > http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Hi, Even it is not a Qt method, you can do it with os.path.normcase(). Ciao. _______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
