I'm a little new to Python and am stuck in a deeply awkward situation. I'm working at a client site where I have no control over what is installed on their server and no ability to do any sort of upgrade. They're running what appears to be a very stripped down version of Python 2.1, which is causing some library issues. All I need to do is take a date string and convert it to an epoch time, which most documentation says will require the time.strptime function. Unfortunately, the following piece of code:
try:
strptime = time.strptime
except AttributeError:
print "nope you don't have it"
from strptime import c
Results in the following error:
ImportError: No module named strptime
Is there another way around this? Is there any way I can get the library I need from another install and just call it locally? I'm really stuck here.
Thanks,
Alex
try:
strptime = time.strptime
except AttributeError:
print "nope you don't have it"
from strptime import c
Results in the following error:
ImportError: No module named strptime
Is there another way around this? Is there any way I can get the library I need from another install and just call it locally? I'm really stuck here.
Thanks,
Alex