things to do upon having a new windows installation
python -m pip install -U pip setuptoolspython -m venv ., activate it using .\Scripts\activate.bat and start developmentTODO: manage gitignores and folder structure.
NOTE: pip and venv installation are detailed in Python's wiki: Installing Packages.
NOTE: venv doesn't work with python2.7, we'll need to fallback to virtualenv, use pip2 install virtualenv for that, then initialize the evn with python2 -m virtualenv . and activate with .\Scripts\activate, and of course we will need to register pip2 and python2 ... check alias setup below for that.
NOTE: deactivate using .\Scripts\deactivate
pip install https://pypi.python.org/packages/source/c/cogapp/cogapp-2.5.tar.gz.python -m cogapp .\PATH\TO\FILE.py, for more about the arguments and usagepip install pdfminerpython app/convertor/main.py C:\FULL\PATH\TO\PDF\FILE.pdfReference Stackoverflow question.
In My Documents create the file cmd_aliases.cmd with the following content.
@echo off
DOSKEY ls=dir $*
:: TODO: replace C:\Python27 with the default installation directory for python2
DOSKEY python2=C:\Python27\python.exe $*
DOSKEY pip2=C:\Python27\Scripts\pip2.exe $*
For more examples check the reference
Setup the following reg: in regedit.exe, navigate to HKEY_CURRENT_USER -> Software -> Microsoft -> Command Processor, then add a string reg, named AutoRun and valued %USERPROFILE%\Documents\cmd_aliases.cmd
If one would always open cmd to run a project, and may continue working from cmd, it may be a hassle to do that manually each time.
In a new my_super_init.bat file, add start cmd.exe /k "more-batch-commands-here" that will open the cmd and give you control after commands finish, OR add start cmd.exe /c "more-batch-commands-here" that will terminate the cmd after the cmd is done.
Reference SO question
@echo off
:: this is a file template for cmd_aliases mentioned in the main tutorial
:: originally captured from the reference SO question http://stackoverflow.com/questions/20530996/aliases-in-windows-command-prompt
:: Temporary system path at cmd startup (examples)
::set PATH=%PATH%;"C:\Program Files\Sublime Text 2\"
:: Add to path by command (examples)
::DOSKEY add_python26=set PATH=%PATH%;"C:\Python26\"
::DOSKEY add_python33=set PATH=%PATH%;"C:\Python33\"
:: Commands
DOSKEY ls=dir $*
:: TODO: replace C:\Python27 with the default installation directory for python2
DOSKEY python2=C:\Python27\python.exe $*
DOSKEY pip2=C:\Python27\Scripts\pip2.exe $*
:: (examples)
::DOSKEY ls=dir /B
::DOSKEY sublime=sublime_text $*
::sublime_text.exe is name of the executable. By adding a temporary entry to system path, we don't have to write the whole directory anymore.
::DOSKEY gsp="C:\Program Files (x86)\Sketchpad5\GSP505en.exe"
::DOSKEY alias=notepad %USERPROFILE%\Dropbox\alias.cmd
:: Common directories (examples)
::DOSKEY dropbox=cd "%USERPROFILE%\Dropbox\$*"
::DOSKEY research=cd %USERPROFILE%\Dropbox\Research\