summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--digital/asserv/tools/inter_asserv.py7
-rw-r--r--digital/asserv/tools/step.py1
-rw-r--r--digital/asserv/tools/test_goto.py1
-rw-r--r--digital/asserv/tools/write_eeprom.py1
-rw-r--r--digital/avr/modules/host/test/test_mex.py5
-rw-r--r--digital/avr/modules/path/test/test_path.py5
-rw-r--r--digital/avr/modules/twi/test/test_twi_host.py5
-rw-r--r--digital/io/tools/test_simu.py3
-rw-r--r--host/inter/inter_node.py7
-rw-r--r--host/inter/test/test_drawable.py4
-rw-r--r--host/mex/test/test.py4
-rw-r--r--host/proto/test/asserv.py3
12 files changed, 11 insertions, 35 deletions
diff --git a/digital/asserv/tools/inter_asserv.py b/digital/asserv/tools/inter_asserv.py
index d6b2ea34..ad7edf0e 100644
--- a/digital/asserv/tools/inter_asserv.py
+++ b/digital/asserv/tools/inter_asserv.py
@@ -22,20 +22,16 @@
#
# }}}
"""Inter, communicating with the asserv board."""
-import sys
-sys.path.append (sys.path[0] + '/../../../host')
+import math
from asserv import Asserv
import asserv.init
import proto.popen_io
import serial
-import math
-
from inter.inter import Inter
from Tkinter import *
-
class InterAsserv (Inter):
"""Inter, communicating with the asserv board."""
@@ -118,6 +114,7 @@ class InterAsserv (Inter):
self.a.free ()
if __name__ == '__main__':
+ import sys
app = InterAsserv (sys.argv[1:])
try:
app.mainloop ()
diff --git a/digital/asserv/tools/step.py b/digital/asserv/tools/step.py
index a4538855..04a50961 100644
--- a/digital/asserv/tools/step.py
+++ b/digital/asserv/tools/step.py
@@ -1,5 +1,4 @@
import sys
-sys.path.append (sys.path[0] + '/../../../host')
from asserv import Asserv
import proto.popen_io
diff --git a/digital/asserv/tools/test_goto.py b/digital/asserv/tools/test_goto.py
index 097cff69..050779a9 100644
--- a/digital/asserv/tools/test_goto.py
+++ b/digital/asserv/tools/test_goto.py
@@ -1,5 +1,4 @@
import sys
-sys.path.append (sys.path[0] + '/../../../host')
from asserv import Asserv
import asserv.init
diff --git a/digital/asserv/tools/write_eeprom.py b/digital/asserv/tools/write_eeprom.py
index 78e5cafb..c66e3f25 100644
--- a/digital/asserv/tools/write_eeprom.py
+++ b/digital/asserv/tools/write_eeprom.py
@@ -1,5 +1,4 @@
import sys
-sys.path.append (sys.path[0] + '/../../../host')
from asserv import Asserv
import asserv.init
diff --git a/digital/avr/modules/host/test/test_mex.py b/digital/avr/modules/host/test/test_mex.py
index 64fc3a74..fcf658ae 100644
--- a/digital/avr/modules/host/test/test_mex.py
+++ b/digital/avr/modules/host/test/test_mex.py
@@ -1,11 +1,8 @@
-import sys
-sys.path.append (sys.path[0] + '/../../../../../host')
+import os, signal
from mex.hub import Hub
from mex.msg import Msg
-import os, signal
-
def log (x):
print x
diff --git a/digital/avr/modules/path/test/test_path.py b/digital/avr/modules/path/test/test_path.py
index ff9b425c..328f6333 100644
--- a/digital/avr/modules/path/test/test_path.py
+++ b/digital/avr/modules/path/test/test_path.py
@@ -22,12 +22,11 @@
#
# }}}
"""Graphic interface for test_path."""
-import sys
-sys.path.append ('../../../../../host')
+import re
+
from Tkinter import *
from inter.drawable import *
from subprocess import Popen, PIPE
-import re
class Obstacle:
def __init__ (self, pos, radius):
diff --git a/digital/avr/modules/twi/test/test_twi_host.py b/digital/avr/modules/twi/test/test_twi_host.py
index 5af0e669..94cd9628 100644
--- a/digital/avr/modules/twi/test/test_twi_host.py
+++ b/digital/avr/modules/twi/test/test_twi_host.py
@@ -1,13 +1,10 @@
-import sys
-sys.path.append (sys.path[0] + '/../../../../../host')
+import os, signal, time
from mex.hub import Hub
from mex.msg import Msg
from mex.node import Node
from utils.forked import Forked
-import os, signal, time
-
def log (x):
print x
diff --git a/digital/io/tools/test_simu.py b/digital/io/tools/test_simu.py
index 73e0259c..e0df9487 100644
--- a/digital/io/tools/test_simu.py
+++ b/digital/io/tools/test_simu.py
@@ -1,6 +1,3 @@
-import sys
-sys.path.append (sys.path[0] + '/../../../host')
-sys.path.append (sys.path[0] + '/../../asserv/tools')
import math
import mex.hub
diff --git a/host/inter/inter_node.py b/host/inter/inter_node.py
index 12aaee6e..329c9977 100644
--- a/host/inter/inter_node.py
+++ b/host/inter/inter_node.py
@@ -22,9 +22,8 @@
#
# }}}
"""Inter, coupled with a mex Node."""
-if __name__ == '__main__':
- import sys
- sys.path.append (sys.path[0] + '/..')
+from math import pi
+import time
from inter import Inter, Obstacle
from dist_sensor import DistSensor
@@ -32,8 +31,6 @@ from path import Path
from Tkinter import *
from mex.node import Node
from mex.msg import Msg
-from math import pi
-import time
class InterNode (Inter):
"""Inter, coupled with a mex Node."""
diff --git a/host/inter/test/test_drawable.py b/host/inter/test/test_drawable.py
index 6f86dd2d..ed5ba2b9 100644
--- a/host/inter/test/test_drawable.py
+++ b/host/inter/test/test_drawable.py
@@ -1,8 +1,6 @@
-import sys
-sys.path.append (sys.path[0] + '/../..')
+from math import pi
from inter.drawable import *
-from math import pi
class Test (Drawable):
diff --git a/host/mex/test/test.py b/host/mex/test/test.py
index 4be24f49..c1a8e0ab 100644
--- a/host/mex/test/test.py
+++ b/host/mex/test/test.py
@@ -1,11 +1,9 @@
-import sys
-sys.path.append (sys.path[0] + '/../..')
+import select
from mex.hub import Hub
from mex.node import Node
from mex.msg import Msg
from utils.forked import Forked
-import select
def log (x):
print x
diff --git a/host/proto/test/asserv.py b/host/proto/test/asserv.py
index 1628c27d..2fc1edbf 100644
--- a/host/proto/test/asserv.py
+++ b/host/proto/test/asserv.py
@@ -1,9 +1,8 @@
import sys
-sys.path.append (sys.path[0] + '/../..')
+import time, select, os
import proto
from proto.popen_io import PopenIO
-import time, select, os
# Pass program name as argument.
io = PopenIO (sys.argv[1:])