IOsipov / androguard

Automatically exported from code.google.com/p/androguard
Apache License 2.0
0 stars 0 forks source link

Ambiguous core/misc.py file #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
There are several "misc.py" instances in a default Python installation on 
Ubuntu 10.04

$ locate misc.py
(...)/androguard/core/misc.py
/usr/lib/python2.5/compiler/misc.py
/usr/lib/python2.6/compiler/misc.py
/usr/lib/python2.6/dist-packages/numpy/oldnumeric/misc.py
/usr/lib/python2.6/dist-packages/usbcreator/misc.py
/usr/share/pyshared/numpy/oldnumeric/misc.py
/usr/share/pyshared/usbcreator/misc.py

Therefore "import misc" will *not* import "core/misc.py" by default, as it is 
the latest in search order path.

Suggested fix:
1/ Rename "core/misc.py" to something more meaningful.
2/ Use sys.path.insert(1, ...) instead of sys.path.append(...)

Original issue reported on code.google.com by nicolas....@gmail.com on 5 Jun 2011 at 1:30

GoogleCodeExporter commented 9 years ago
A workaround (for the end-user) is to set the PYTHONPATH to ./core.

Original comment by aaforti...@gmail.com on 14 Jun 2011 at 2:15

GoogleCodeExporter commented 9 years ago
Hi,

fix bug in 
http://code.google.com/p/androguard/source/detail?r=26ecfb645135cc3be1c7006fadf5
ead3b8edb6ba

Original comment by anthony....@gmail.com on 16 Jun 2011 at 8:23

GoogleCodeExporter commented 9 years ago

Original comment by anthony....@gmail.com on 16 Jun 2011 at 8:25