[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] QUrl Failed!
From: Baz Walter <bazwal () ftml ! net>
Date: 2016-03-15 0:16:19
Message-ID: 56E75453.2010002 () ftml ! net
[Download RAW message or body]
On 14/03/16 22:41, Miguel Alejandro Fernandez wrote:
> python 3.4 PyQt5.5.1
>
> working in a proyect see next error:
>
> path = 'file:///F:/WD SmartWare.swstor/QT/proyectos/ninja/ninja-ide-2.3/ninja_ide/tools/runner.py'
>
> url = QUrl(path)
>
> print(url.path())# first char "/" not removed
>
> "/F:/WD SmartWare.swstor/QT/proyectos/ninja/ninja-ide-2.3/ninja_ide/tools/runner.py"
>
> print(url.toLocalFile())
> "F:/WD SmartWare.swstor/QT/proyectos/ninja/ninja-ide-2.3/ninja_ide/tools/runner.py"
I don't see any errors.
The first is interpreted as a url with an empty network location, so the
path starts immediately after the second forward slash.
Compare with Python:
>>> from urllib.parse import urlparse
>>> urlparse(path).path
'/F:/WD
SmartWare.swstor/QT/proyectos/ninja/ninja-ide-2.3/ninja_ide/tools/runner.py'
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic