skjerns / skjerns-utils

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

skjerns-utils

This repository includes three packages: cpu_usage sTimer and ospath.

Additionally it has some custom files like startup.py for iPython or a bat file to create an icon for Spyder

Installation

pip install git+https://github.com/skjerns/skjerns-utils

Utils

ospath

This package can be used instead of os.path and will unify all backslashes (windows) to unix slashes. This way we can e.g. use paths as keys in dictionaries across platforms.

usage:

import ospath
windowspath = '.\\images\\image1.jpg'
unified = os.path.join(windowspath)
print(unified) # './images/image1.jpg'

Details: ospath

sDill

A simple wrapper to use picke/dill with strings instead of file-objects

usage:

import sdill as pickle
pickle.load('picklefile.pkl')

Details: sDill

sTimer

A simple stoptimer

usage:

import stimer
stimer.start()
stimer.stop()
# elapsed: 0.00 seconds

Details: sTimer

CopyAbsPythonPath

Starting this executable once will add an item to the context menu to copy the path of any file in a pythonic way, that means with all backslashes turned into slashes. If you don't trust this file, just delete it.

About

License:GNU General Public License v3.0


Languages

Language:Python 95.9%Language:Batchfile 3.0%Language:C++ 1.1%