Skip to main content

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.

Source Distribution

qrc_pathlib-1.0.2.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

qrc_pathlib-1.0.2-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file qrc_pathlib-1.0.2.tar.gz.

File metadata

  • Download URL: qrc_pathlib-1.0.2.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for qrc_pathlib-1.0.2.tar.gz
Algorithm Hash digest
SHA256 7ab2457b5cda10eda43692f92103c871320bc0260b5c27f38530318a35b6d432
MD5 73be8bab0da32b873671ab4cf42fa1f7
BLAKE2b-256 2ee3642c4aedfb4eb81c1b72c27e76f6219e6120b95f61efa2adfa6a05eed849

See more details on using hashes here.

File details

Details for the file qrc_pathlib-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for qrc_pathlib-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ffb8b23ea0aeb824d3f05223cea2461a069e39fdbcae243fa01ce32d1df838e4
MD5 706a76e52349d968aaeb9719f32aa884
BLAKE2b-256 7f0a7e7c8e48caf8f2a09c2eb8aa6832fd5a787f7ee20280e3e19232d3415b62

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page