Python Forum
Thread Rating:
  • 5 Vote(s) - 2.6 Average
  • 1
  • 2
  • 3
  • 4
  • 5
t_games, Take Two
#14
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']
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
t_games, Take Two - by ichabod801 - Jan-08-2019, 09:29 PM
RE: t_games, Take Two - by metulburr - Jan-09-2019, 12:42 AM
RE: t_games, Take Two - by ichabod801 - Jan-09-2019, 02:08 AM
RE: t_games, Take Two - by ichabod801 - Jan-09-2019, 02:14 AM
RE: t_games, Take Two - by Trinx - Jan-12-2019, 04:39 PM
RE: t_games, Take Two - by ichabod801 - Jan-12-2019, 05:56 PM
RE: t_games, Take Two - by Trinx - Jan-12-2019, 10:16 PM
RE: t_games, Take Two - by ichabod801 - Jan-12-2019, 11:02 PM
RE: t_games, Take Two - by Trinx - Jan-13-2019, 08:09 PM
RE: t_games, Take Two - by ichabod801 - Jan-13-2019, 09:18 PM
RE: t_games, Take Two - by Trinx - Jan-15-2019, 02:03 AM
RE: t_games, Take Two - by ichabod801 - Jan-16-2019, 03:46 AM
RE: t_games, Take Two - by Trinx - Jan-16-2019, 05:40 PM
RE: t_games, Take Two - by ichabod801 - Jan-16-2019, 05:56 PM
RE: t_games, Take Two - by ichabod801 - Jan-16-2019, 06:01 PM
RE: t_games, Take Two - by metulburr - Jan-16-2019, 06:13 PM
RE: t_games, Take Two - by Trinx - Jan-16-2019, 06:15 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Star New t_games Release ichabod801 0 2,239 Mar-19-2019, 08:27 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020