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

ScreenCalc is a Python 3 package template.

Project description

ScreenCalc

A simple screen size calculator to convert screen measurement units at various
densities
Build Status
Coverage Status
PyPI Version
PyPI Downloads

Getting Started

Install:

$ pip install ScreenCalc

Use it:

$ sc 100px@hdpi 100dp ...
100.0px@240dpi
+-----------+---------+----------+---------+---------+----------+------+
| density   |      dp |       px |      sp |      mm |       in |   pt |
|-----------+---------+----------+---------+---------+----------+------|
| ldpi      | 66.6667 |  50      | 66.6667 | 10.5833 | 0.416667 |   30 |
| mdpi      | 66.6667 |  66.6667 | 66.6667 | 10.5833 | 0.416667 |   30 |
| tvdpi     | 66.6667 |  88.75   | 66.6667 | 10.5833 | 0.416667 |   30 |
| hdpi      | 66.6667 | 100      | 66.6667 | 10.5833 | 0.416667 |   30 |
| xhdpi     | 66.6667 | 133.333  | 66.6667 | 10.5833 | 0.416667 |   30 |
| xxhdpi    | 66.6667 | 200      | 66.6667 | 10.5833 | 0.416667 |   30 |
| xxxhdpi   | 66.6667 | 266.667  | 66.6667 | 10.5833 | 0.416667 |   30 |
+-----------+---------+----------+---------+---------+----------+------+

...
Known measurement units are: dp, px, sp, mm, in, and pt. Screen
density can be one of the named values (ldpi, mdpi, tvdpi, hdpi,
xhdpi, xxhdpi, or xxxhdpi), or a decimal value (e.g. 100).

Changelog

0.1.0 (2015/04/10)

  • Fix pt unit conversions
  • Add unit tests

0.0.1 (2015/04/09)

  • Initial (mostly) functional release

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 ScreenCalc, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size ScreenCalc-0.1.0-py2-none-any.whl (8.3 kB) File type Wheel Python version 2.7 Upload date Hashes View hashes
Filename, size ScreenCalc-0.1.0.tar.gz (6.4 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