ImportError for urllib2

duckstab

Child of Noble Family
Joined
May 5, 2008
Messages
1,477
Location
New York, NY
I want to experiment with adding some online capabilities to my personal mod, which is built on top of BAT 4.1. After digging around in the Python code I found urllib2.pyc among the system python code so I figured I'd start there. I tried to import it from BugConfig.py but didn't get very far:
Code:
load_module BugTypes
load_module xmllib
..\WARLORDS\ASSETS\PYTHON\SYSTEM\xmllib.py:9: DeprecationWarning: The xmllib module is obsolete.  Use xml.sax instead.
load_module urllib2
urllib2 import failed
Traceback (most recent call last):
  File "<string>", line 1, in ?
  File "<string>", line 52, in load_module
  File "CvEventInterface", line 17, in ?
  File "<string>", line 52, in load_module
  File "BugEventManager", line 102, in ?
  File "<string>", line 52, in load_module
  File "CvEventManager", line 12, in ?
  File "<string>", line 52, in load_module
  File "CvScreensInterface", line 3, in ?
  File "<string>", line 52, in load_module
  File "CvMainInterface", line 11, in ?
  File "<string>", line 52, in load_module
  File "BugDll", line 39, in ?
  File "<string>", line 52, in load_module
  File "BugOptions", line 109, in ?
  File "<string>", line 52, in load_module
  File "BugConfig", line 62, in ?
ImportError: No module named urllib2
load_module CvAppInterface
I guess this might just be a path error but the odd thing is that xmllib is being successfully loaded (albeit with a warning message), and it's sitting there in the same directory as urllib2.

Any ideas?
 
Top Bottom