f = open("morse_table.txt")

morse_table = f.read()
morse_table = dict([(morse[0:1], morse[2:len(morse)]) for morse in morse_table.split("\n")])

f.close()

@@ -1,13 +1,147 @@
-f = open(
+import inspect, os%0Acommon_dir = os.path.dirname(inspect.getfile(inspect.currentframe())) # script directory%0A%0Af = open(os.path.join(common_dir, 
 %22mor
@@ -154,16 +154,17 @@
 le.txt%22)
+)
 %0A%0Amorse_

Make morse parser not assume that the current working directory is common/