Git Product home page Git Product logo

pyqt4_cljs's Introduction

ClojureScript in PyQt4 Testbed

Embedding CLJS output into a PyInstaller generated executable.

Overview

This is an experiment in extending ClojureScript's reach into the desktop space. This is specifically in support of an existing Python project I'm writing, but but should be extendable to arbitrary ClojureScript applications.

Setup

This requires Python 2.7 with the PyQt4 module installed. On Windows I recommend Anaconda Python. Python must be on your path for the batch scripts to work.

This thing also uses Leiningen to manage Clojure dependencies and perform ClojureScript builds. Lein must be on your path for the batch scripts to work. I also have LEIN_JAVA_CMD defined and java bin on my path.

The run.cmd batch script does a single ClojureScript build without advanced compilation, then runs the Python app from source. During development I just run lein cljsbuild auto in one shell window and manually run python .\testbed\app.py in another.

The build.cmd batch script requires PyInstaller version >= v3.0. Note: at this time PyInstaller 3 is not in the conda package archives. You will need to install using pip or with a manual installer.

Building will compile ClojureScript with advanced optimizations and then bundle everything into a single executable in a dist folder.

Testing

The tests for the ClojureScript code are written using devcards and you can see them live update by running lein figwheel test, opening the "testcards/cards.html" file in a web browser (Chrome recommended), and editing "src/pyqt4_testbed/test/core.cljs".

License

Copyright © 2016 Edward Blake

Distributed under the BSD simplified 3-clause license

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.