Code Monkey home page Code Monkey logo

ipyapp's Introduction

IPyApp

This package currently serves as a proof of concept for bundling IPython notebook into a standalone executable application.

There are basically two components to bundling this. The first is to take Python and IPython and any other python libraries, and bundle them into a platform executable.

Then wrap this executable in a node-webkit app to provide the web UI to the notebook server.

Current this POC is limited to Mac OS using Py2App.

However node-webkit is cross platform, so as long as an executable can be created (ie py2exe), then this general approach should be cross platform.

Another platform specific issue to figure out, is where the default notebook directory should be. Currently in the POC, it creates ~/Library/ipyapp-notebooks/.

How to create the bundle

A built version - with just IPython can be downloaded from here.

First, create a virtualenv and install IPython, py2app and any packages you want included.

Then cd into the py2app directory and build the executable

rm -r build dist; python setup.py py2app --packages IPython

Include any additional --packages

This will create a nb.app executable in the dist folder. Copy this into the app.nw folder.

Next download the node-webkit binary

Right click on the node-webkit.app binary that you downloaded and choose "Show Package Contents"

Copy the provided Info.plist file into the Contents folder of the package, and copy the app.nw folder into the Contents/Resources folder of the package.

You should now be able to launch the app by double clicking.

The layout of the app should look something like:

IPyApp.app
└── Contents
    ├── Frameworks
    │   ├── crash_inspector
    │   ├── node-webkit\ Framework.framework
    │   │   ├── Libraries
    │   │   ├── Resources
    │   │   ├── node-webkit\ Framework
    │   │   ├── node-webkit\ Framework.TOC
    │   │   └── node-webkit\ Framework.tmp
    │   ├── node-webkit\ Helper\ EH.app
    │   │   └── Contents
    │   ├── node-webkit\ Helper\ NP.app
    │   │   └── Contents
    │   └── node-webkit\ Helper.app
    │       └── Contents
    ├── Info.plist
    ├── MacOS
    │   └── node-webkit
    ├── PkgInfo
    └── Resources
        ├── app.nw
        │   ├── app.icns
        │   ├── IPythonConsole.png
        │   ├── nb.app
        │   ├── node_modules
        │   ├── package.json
        │   ├── start.html
        │   └── test.js
        └── nw.icns

Similar projects:

ipyapp's People

Contributors

ptone avatar

Watchers

James Cloos avatar Narava avatar

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.