Skip to main content

Automatically reload solidpython file on change.

Project description

Solidpython Reloader

Automatically reload and recompile a solidpython project on file changes.

This tool is imitates Djangos runserver behaviour. Actually it depends on Django and uses the Reloader class that powers runserver.

Installation

  • If you already haven't done so for solidpython, optionally create a virtualenv
  • pip install solidpython-reloader

Usage

This package installs a script named sp-reloader into your PATH. You can use this to start a new project: sp-reloader startproject myproject

This creates a new project directory named myproject.

$ ls myproject/
myproject.py  myproject.scad  run.py

myproject.py is the file where your solidpython logic will reside in. myproject.scad will contain the translated openscad code. Right now, it is still empty. run.py is the reloader for your project. If you want to start working on your project, execute it:

$ python run.py 
INFO:root:Solidpython reloader started.

This starts the reloader, opens openscad and should render the sample code in myproject.py.

Now you are ready to model! Every time you save myproject.py or any other .py file in the project directory, the scad file will be updated and rendered again.

Customization

Out of the box, the run.py script observes changes in all .py and .svg files in the current directory. You can add other files, file types or whole directories by adding additional reloader.watch_dir() directives in run.py. You should add them after the existing lines near the end of the file.

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

solidpython_reloader-0.1.4.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

solidpython_reloader-0.1.4-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file solidpython_reloader-0.1.4.tar.gz.

File metadata

  • Download URL: solidpython_reloader-0.1.4.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3

File hashes

Hashes for solidpython_reloader-0.1.4.tar.gz
Algorithm Hash digest
SHA256 909409fb8868e0aca4ad753923288ec6d47cba5d55de0e6c4157cf6ad4c17681
MD5 79ea532b75497c6334cb17ac14555f58
BLAKE2b-256 383d6a0220d4f883240994b8dc261dca46aa16dc9a7d369e00d4541cb0beec1b

See more details on using hashes here.

File details

Details for the file solidpython_reloader-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: solidpython_reloader-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3

File hashes

Hashes for solidpython_reloader-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b54665cebb40e4e17959cf2db7443dfaa2f72e8519b947a772894d1437a2c02c
MD5 a5856d92931e6c15ef4eead2bdb08490
BLAKE2b-256 0c3ec67630729405225be0b90aff135f28c09f64ae7741b11cad130f5476d528

See more details on using hashes here.

Supported by

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