Closed s-celles closed 3 years ago
Maybe we should add a console_script
entry_points
to setup.py
see http://stackoverflow.com/questions/774824/explain-python-entry-points
Here is a comparison between cmd
and "Git Shell" (MinGW
in fact)
The question is: does console_script actually build a wrapper .exe also for pre-existing scripts? All the examples I've seen require a module/function for which a wrapper is built.
I noticed a lot of exe files in this Script directory aside .py script files. An idea could be to have a look at some and look at the setup.py
file in their respective project
In my Windows 7 Python 2.7 installation command line python apps usually come with a batch file in the Scripts directory to get them started. e.g. scapy, spyder, editra, etc. So, using scapy as the example, addition of a simple gtabview.bat file in the "
@REM Use Python to run the gtabview script from the current directory, passing all parameters @python %~dp0\gtabview %*
Seems to execute gtabview from the Windows CMD line.
Do they simply call python? (I guess they assume python was set into the path).
I do use some wrapper scripts as well, but I instead use some abomination with a temporary script to discover the python installation path without python.exe requiring to be in path. I'd avoid /gladly/ to use that if that's the norm...
Hmm,
21 bat files installed in my Python Scripts directory. A couple used the format already mentioned. Others used a variation something like ...
@echo off
start "" "C:\Python27\pythonw.exe" "C:\Python27\Scripts\editra" %1 %2 %3 %4 %5 %6 %7 %8 %9
Starting either python.exe or pythonw.exe. Unfortunately, I'm no expert (in Windows Batch scripting or Python) so cannot suggest the 'preferred' solution. Author's choice maybe?
Great doc available here http://python-packaging.readthedocs.org/en/latest/command-line-scripts.html
@sprintae86: can you give it a shot?
I don't have a windows setup to test it right now (I generally have to ask a colleague).
Hello,
I'm using Anaconda Python 3 under Windows 7.
To run gtabview as script I need to do:
or
because
raises
tabview
encounters same problem.it will be nice if we could have
gtabview
directly executable under WindowsKind regards
PS:
C:\Anaconda3\Scripts
andC:\Anaconda3\
are inPATH
environment variableto