Coder Social home page Coder Social logo

hydridity / atom-python-run Goto Github PK

View Code? Open in Web Editor NEW

This project forked from foreshadow/atom-python-run

0.0 1.0 0.0 257 KB

A simple atom package. Press one key to run your python code in atom.

Home Page: https://atom.io/packages/atom-python-run

License: MIT License

Python 27.96% JavaScript 72.04%

atom-python-run's Introduction

atom-python-run package

GitHub issues GitHub stars GitHub forks GitHub license

Run your python (.py) source file using F5 or F6!

Contents

Prerequisite

  • Atom Text Editor (nightly or latest stable release)
  • Python 2 and/or 3
  • Add Python (and any other interpreters) to the PATH environment variable.

Method of use

  1. Open a source file.
  2. Hit F5 or F6 to run.
  • It will save the file in current editor immediately without a confirmation, be aware.

Features

  • Using python
    • Almost the same console with python IDLE, which provides syntax error and runtime error messages.
  • CodeBlocks debug console style
    • Shows return value and execution time
      • It is a rough time based on real time rather than CPU kernel / user time

Settings

  • Extension filter

    • Accepts all file extensions by default (empty value), you can change it into .py
      • or an array .py, .js, .something-else
  • Command

    • You can hack it using these variant, or
      • {file} = {dir}/{name}{ext}
    • Run with interactive mode, or
      • python -i {file}
    • Run with idle, and you may need the next setting.
      • pythonw C:\python27\Lib\idlelib\idle.pyw -r {file}
    • Pass arguments
      • python {file} these are arguments for file
    • Pause
      • Show elapsed time and pause cp
        • Exit immediately
        • You can disable the default cp wrapper if you don't want it.
  • Pipe to File

    • Redirect standard output to a file instead of the screen
      • Name the path and file to write to
        • /some/file/path/to/my-programs-output.txt
      • Create the file in the current working directory by omitting a path
        • my-programs-output.txt
  • Terminal

    • Left empty by default (uses the systems default terminal)
    • Choose the type of terminal you'd like to use instead
      • terminator, -x

Compatibility

  • Cross Platform Compatible

    • Runs on Windows, Mac OS X, and Linux
  • True Arbitrary Execution

    • Global python is the default interpreter
    • Execute using any interpreter
    • Pass options to the given interpreter
    • Pass arguments to the program to be executed
  • Python 2 and 3

    • Note: If you have problems executing, you can install a global version of latest python2.7.x (even if you have python3.x.x installed). Please report any python3 issues if you want to avoid installing a global python2 version.

Issues

  • Before newing an issue, check to see if someone else is experiencing any related issues.
  • Check to see if any issues that were closed resemble your issue and re-open it addressing that you're experiencing a similar issue.
  • Provide details about your issue, such as errors and/or logs.
  • Provide reproduction steps (we can't help you if we don't know how to reproduce the error!).

Logs

  • The atom-python-run plug-in fully supports logging.

    • Please post these logs along with any issue you're experiencing (we can't help you if we don't know what's happening!).
    • Note that there are 2 logs in case the latter fails. The first log is the console log and the second log is created by the cp main.py executable.
  • How to access Atoms Console Log

    • Windows/Linux
      • Ctrl + Shift + I
    • Mac OS X
      • Cmd + Alt + I
    • Click on the console tab
    • Copy and paste the console output along with your post.
  • How to access cp's built-in log

    • Windows
      1. Open file explorer
      2. Click the location bar (where the file path usually is)
      3. Type in %userprofile%\.atom\packages\atom-python-run
      4. Locate, Open, and Copy the contents of the cp.log file along with your post.
    • Mac OS X/Linux
      1. Open a terminal window.
      2. $ cat ~/.atom/packages/atom-python-run/cp.log
      3. Copy and paste the contents along with your post.
    • NOTE: If the cp.log file is missing, empty, or inaccurate, please note that this was case in your post.
  • Detailed issues are well presented issues. This will help us remedy the problem.

Development

  • New an issue if you have any idea of new features.

A screenshot of your package

This is a package for Atom

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.