What I am suggesting is open the system command line, navigate to the t_games folder in the system command line, and try
python play.py
.
Without the full error traceback, I can't diagnose the problem you are having with os.chdir. It is working for me, however:
Output:
>>> import t_games
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named t_games
>>> import os
>>> os.chdir('Documents')
>>> import t_games
>>> dir(t_games)
['Interface', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__', 'board', 'cards', 'dice', 'full_credits', 'game', 'interface', 'options', 'other_cmd', 'play', 'player', 'test', 'utility']
You can also use the sys module to modify the pythonpath:
Output:
>>> import t_games
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named t_games
>>> import sys
>>> sys.path.insert(0, 'C:\\Users\\Craig\\Documents')
>>> import t_games
>>> dir(t_games)
['Interface', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__', 'board', 'cards', 'dice', 'full_credits', 'game', 'interface', 'options', 'other_cmd', 'play', 'player', 'test', 'utility']