Code Monkey home page Code Monkey logo

portapy's Introduction

PortaPy

PortaPy is a module for running python from node.

To install it, simply run

npm install -g portapy

Global installation gives you access to the normal python command, as if it were installed normally.

C:\Users\Cobra>python
Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:05:16) [MSC v.1915 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>exit()

portapy's People

Contributors

broakes avatar

Watchers

Valerie avatar  avatar

portapy's Issues

synchronize python version with a property inside of package.json

when portapy is installed, create a key for what version it is, if it doesn't exist. if it does, use that version.

have a command, pvm, that allows you to change which version you are using locally, or be able to change it in package.json, and reinstall portapy, so it'll automagically be that version.

fix language statistics

github thinks this is a python package, because its mostly python files, in lines of code. This is cause by pip.py.

solutions

  • add python files to vendored
    • github uses linguist for tracking vendored files/dirs. hit that readme for the docs on it
  • download file like pip.py during the install process, so they dont need to be tracked. this would additionally help, as you could always get the most up to date/correct pip version for they python you downloaded.

The first solution is a one liner, so if you cant be arsed, just do that and make an issue to download realtime later. otherwise, solution 2 will take some lift, and will add maintenance cost, if the external URLs ever change, thats more stuff we have to keep track of.

hit me with a native executable on import

for example, when i do

const python = require('portapy').binary;
// python === '/some/path/to/python'

important to keep it not the root level object, in case later we want to add like

const python = require('portapy').exec;
const output = await python('print(\'hello from python!\')')
// output === "hello from python"

or version checking

const python = require('portapy').version;
// python === '2.7.13';

point is to keep options open

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.