Powershell usage for python learning
- 1 minOverview:
Powershell commands I used when learning Python.
Commands:
👶
cd ~\Documents\Github\Learn-py-hard-way
# cd ~: go back home
ls
cd ex1
cd ..
# move up in the tree/path
👶
ni $(1..52 | %{"ex$_\ex$_.py"}) -f
52 exercises in total. Create 52 empty .py files in 52 folds for each exercise. \
ni = New-Item
-f = -Force
👶
ii ex1\ex1.py
Open ex1.py in defualt software (sublime).
ii = Invoke-Item
👶
python -m pydoc sys
Get Python help file for sys.
-m: module
👶
echo "A text file with some text" > ex1\ex1.txt
type ex1\ex1.txt
Create a text file with some text in it.
echo
: Sends the specified objects to the next command in the pipeline.
type
/more
: print out the file