getClient() fixed.
[goodfet] / client / goodfet
index a42a2c8..ed3b9e8 100755 (executable)
@@ -8,10 +8,9 @@
 import sys, os, readline, code, binascii;
 import rlcompleter;
 
+from GoodFET import GoodFET, getClient;
 from GoodFETConsole import GoodFETConsole;
-from GoodFETCC import GoodFETCC;
-from GoodFETMSP430 import GoodFETMSP430;
-from GoodFET import GoodFET;
+#from GoodFET import *;
 
 from intelhex import IntelHex;
 
@@ -24,13 +23,9 @@ if(len(sys.argv)==1):
 
 driver=sys.argv[1];
 print "Using driver %s" % driver;
-client=eval("%s()" % driver);
-console=GoodFETConsole(client);
-
-while 1:
-    sys.stdout.write("gf% ");
-    sys.stdout.flush();
-    cmd=sys.stdin.readline();
-    console.handle(cmd);
+#client=eval("%s()" % driver);
+client=getClient(driver);
+console=client.getConsole();
+console.run();
 
 sys.exit(0);