Quick note to self on how to get the current working directory of in a Python have pwd (print working directory) on a Linux/Unix command line.
Editing and Running Python Programs on the Rasberry Pi these instructions on YouTube or you can download the high-quality MP4 version of the screen cast. If you want to really figure out where you are, on Linux use the pwd command.
Note: We have a screen cast for the use of TextWrangler. You can either If you want to really figure out where you are, on Macintosh use the pwd command.
We've already (maybe) used it to install Python 3, pip, virtualenv and virtualenvwrapper A few helpful flags to add to the ls command: . Arithmetic & Casting.
import os print packingpearls.com() # Prints the current working directory. To set the working packingpearls.com('c:\\Users\\uname\\desktop\\python') # Provide the new path here.
See Python Scratch. building, pwd command, Python, , ,, concatenation, data types, scripts, sample code repositories, type casting, variables, Python API, Minecraft .