Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Extension for pathlib that implements Path and PurePath for Qt Resources System.

Project description

https://travis-ci.org/GreatFruitOmsk/qrc_pathlib.svg?branch=master

qrc_pathlib

Qt Resource System allows to store files inside binaries and read them by using Qt’s file system abstraction (QFile, QDir etc).

This package extends pathlib introduced in Python 3.4 by implementing Path and PurePath for QRS:

from qrc_pathlib import QrcPath

QrcPath(':my_resource.svg').read_bytes()

with QrcPath(':hello.txt').open() as f:
    print(f.read())

Since QRS is read-only all methods that are supposed to modify files raise PermissionError. Other inapplicable methods such as stat will raise NotImplementedError.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for qrc-pathlib, version 1.0.2
Filename, size File type Python version Upload date Hashes
Filename, size qrc_pathlib-1.0.2-py3-none-any.whl (6.4 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size qrc_pathlib-1.0.2.tar.gz (5.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page