Basic Question about Python WebServer File handling

2008-07-10 Thread Alok Kumar
Hi, I need to have a python webserver which can handle Get request from the clients and upload the *files* from 4 different directories. Can someone please point me what to exactly look for. Thanks you very much for this great help. Regards Alok Kumar -- http://mail.python.org/mailman/listinfo

Python HTTPS Bus Error

2008-07-08 Thread Alok Kumar
Hi, Can someone help me what to look for fixing Bus error. I must mention that I am working in embedded environment and it does have selective installation of python I am getting following error from client when it is trying to talk with server over *HTTPS*. HTTP works fine. *Alignment trap: py

ImportError: No module named _md5

2008-07-03 Thread Alok Kumar
I am trying to move from python 2.4 to python 2.5.2. After compiling the python 2.5.2, I found it is throwing "ImportError: No module named _md5". I found this topic on the mailing list, but no solution to fix it. Can someone help me out. It will be highly appreciated. Regards Alok -- http://mai

UTC datetime.fromtimestamp

2008-06-03 Thread Alok Kumar
Dear All, I have UTC datetime as datetime.fromtimestamp(ParseDateTimeUTC("2007-12-06 20:37:05")) How can I add a day into this. Your help will be highly appreciated. Regards Alok -- http://mail.python.org/mailman/listinfo/python-list

Re: Struct usages in Python

2008-05-28 Thread Alok Kumar
pe(Event()) > > True > > > > Whereas instances of new-style classes are of type their class: > > > > >>> class NewFooBar(object): pass > > ... > > >>> type(NewFooBar) == type(NewEvent) > > True > > >>> type(NewFooBar()) == type(NewEvent()) > > False > > > > However, in python 2.X (X > 2?), you can force all classes to of a > > certain type by setting the global variable '__metaclass__'. So: > > > > >>> type(Event) # Event is an old-style class > > > > >>> __metaclass__ = type > > >>> class Event: pass > > ... > > >>> type(Event) # Now Event is new-style! > > > > > > HTH > > > > -- > > Arnaud > -- > http://mail.python.org/mailman/listinfo/python-list > -- Regards Alok Kumar -- http://mail.python.org/mailman/listinfo/python-list

Re: multi dimensional dictionary

2008-05-28 Thread Alok Kumar
Thanks to all for their kind help and time. Alok On Wed, May 28, 2008 at 4:11 AM, Peter Otten <[EMAIL PROTECTED]> wrote: > Gary Herron wrote: > > > Alok Kumar wrote: > >> Dear All, > >> > >> I am using dictionary for filling my xpath parsed dat

Re: Struct usages in Python

2008-05-28 Thread Alok Kumar
or make some other type of object that is similar > to events, with maybe some of the same fields, you can still store them in > the list and it will play along with the rest of your code. > > -- > http://mail.python.org/mailman/listinfo/python-list > -- Regards Alok Kumar -- http://mail.python.org/mailman/listinfo/python-list

Re: Struct usages in Python

2008-05-28 Thread Alok Kumar
this is not allowed ?? * >> > > self.event = [Event()] > > - Casey > > -- > http://mail.python.org/mailman/listinfo/python-list > -- Regards Alok Kumar -- http://mail.python.org/mailman/listinfo/python-list

multi dimensional dictionary

2008-05-27 Thread Alok Kumar
Dear All, I am using dictionary for filling my xpath parsed data. I wanted to use in the following manner. mydict[index] ["key1"] ["key2"]#Can someone help me with right declaration. So that I can fill my XML xpath parsed data mydict[0] ["person"] ["setTime"] = "12:09:30" mydict[0] ["perso

Struct usages in Python

2008-05-27 Thread Alok Kumar
Dear All, This might be very basic question for python, but I have been struggling with it. Your help will be highly appreciated. I have a class like below: class Event(): def __init__(self, cameraEventType="", zone=99, setDay="",setTime ="", clrTime=""): self.cameraEventType = camera

libxml2 Installation for Python 2.4

2008-05-13 Thread Alok Kumar
Hi, Can someone point me how to install libxml2 for python. It works fine on my Redhat 4.0 linux Box, but when I am trying to run my script on ARM target , it throws import error for libxml2. I am using xpath in my script and in header trying to import libxml2. Thanks in advance. Alok -- http://

Python Minidom Help

2008-05-05 Thread Alok Kumar
3/site-packages/_xmlplus/dom/expatbuilder.py", line 922, in parse fp = open(file, 'rb') Can anyone please help? Regards Alok Kumar -- http://mail.python.org/mailman/listinfo/python-list

State machine Example in Python

2008-05-03 Thread Alok Kumar
Can someone please redirect me for a state machine example or design pattern used in Python. Regards Alok -- http://mail.python.org/mailman/listinfo/python-list

HTTP Error code Info

2008-05-02 Thread Alok Kumar
Hi I could get the HTTP error code using try: .. except: .. else: block. Is there any better way to get the HTTP Error code using urllib2 lib. Something like know the exact response number (200, 404 etc) without the above block. Regards Alok Kumar -- http://mail.python.org/mailman/listinfo