Skip to content

Commit

Permalink
Build absolute path for terminal directory
Browse files Browse the repository at this point in the history
This way the terminals can be loaded even if dcpu16.py is started
from another directory.
  • Loading branch information
sebastianw committed Apr 9, 2012
1 parent 57f3418 commit 8078670
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/terminalplugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import importlib
import sys
import time
import os

START_ADDRESS = 0x8000
MIN_DISPLAY_HZ = 60
Expand Down Expand Up @@ -60,7 +61,7 @@ def __init__(self, args):
return
BasePlugin.__init__(self)
self.time = None
sys.path.append("./terminals/")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "terminals")))
try:
terminal = importlib.import_module(args.term + "_terminal")
except ImportError:
Expand Down

0 comments on commit 8078670

Please sign in to comment.