With the previous implementation, `mmap` was importing the demo
script, not the standard `mmap` library module. From the docs [1]:
The directory containing the script being run is placed at the
beginning of the search path, ahead of the standard library
path. This means that scripts in that directory will be loaded
instead of modules of the same name in the library directory.
I'm not sure when this changed in Python, since the demo script
presumably worked with an earlier version.
[1]: http://docs.python.org/tutorial/modules.html#the-module-search-path
#set the paths so python can find the comedi module
-import sys, os, string, struct, time, mmap, array
-sys.path.append('./build/lib.linux-i586-2.1')
+import sys, os, string, struct, time, array
+
+sys.path.append(sys.path.pop(0))
+import mmap
+sys.path.append('./build/lib.linux-i586-2.1')
import comedi as c
#open a comedi device