Git Product home page Git Product logo

idf_py_exe_tool's Introduction

IDF wrapper tool (idf.py.exe)

This tools helps invoke idf.py in Windows CMD shell.

In Windows CMD shell, python scripts can be executed directly (by typing their name) if .py extension is associated with Python. The issue with such association is that it is incompatible with virtual environments. That is, if .py extension is associated with a global (or user-specific) copy of python.exe, then the virtual environment will not be used when running the script. Python Launcher solves this issue, but it is installed by default only with Python 3.6 and newer. In addition to that, the user may choose not to install Python Launcher (for example, to keep .py files associated with an editor).

Hence, idf.py.exe is introduced. It is a simple program which forwards the command line arguments to idf.py. That is,

idf.py args...

has the same effect as:

python.exe %IDF_PATH%\tools\idf.py args...

python.exe location is determined using the default search rules, which include searching the directories in %PATH%. Standard I/O streams are forwarded between idf.py.exe and python.exe processes. The exit code of idf.py.exe is the same as the exit code of python.exe process.

For compatibility with idf_tools.py, a flag to obtain the version of idf.py.exe is provided: idf.py.exe -v or idf.py.exe --version. Note that this flag only works when idf.py.exe is started by the full name (with .exe extension). Running idf.py -v results in same behavior as python idf.py -v, that is -v argument is propagated to the Python script.

Building

On Linux/Mac, install mingw-w64 toolchain (i686-w64-mingw32-gcc). Then build idf.py.exe using CMake:

mkdir -p build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=../toolchain-i686-w64-mingw32.cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build .

On Windows, it is also possible to build using Visual Studio, with CMake support installed.

idf_py_exe_tool's People

Contributors

dmitry1945 avatar igrr 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.