Does python has a command/option which can change working directory?

Question:

I have a client.py which import moudle from other places. So i want to change work directory using command "python client.py".

Asked By: 12 34

||

Answers:

I think this is what your looking for

import sys

sys.path.append('/path/to/application/app/folder')

#use '../' to jump back one folder

import file

Code comes from here

Answered By: Sheyteo
Categories: questions Tags:
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.