you're reading...

Changing working directory from inside Python interpreter

From http://likesalmon.net/change-current-working-directory-from-inside-the-python-interpreter/

>>> import os
>>> os.getcwd() # Returns the current working directory; usually the directory you were in when you started the interpreter
>>> os.chdir('/path/to/directory') # Change the current working directory to 'path/to/directory'. Also accepts bash commands like '..' and '/'


No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s


Exploring and venting about quantitative issues

The Stone and the Shell

Using large digital libraries to advance literary history

Hi. I'm Hilary Mason.

Zoom out, zoom in, zoom out.

Introduction to Data Science, Columbia University

Blog to document and reflect on Columbia Data Science Class

statMethods blog

A Quick-R Companion

the Tarzan

[R] + applied economics.

4D Pie Charts

Scientific computing, data viz and general geekery, with examples in R and MATLAB.