Python packet capture utility

2010-02-01 Thread VYAS ASHISH M-NTB837
Dear All I want to capture tcp packets in python. I need to do this on both Windows and Linux on python3.1 I came across the following: http://sourceforge.net/projects/pycap/ http://sourceforge.net/projects/pylibpcap/ http://code.google.com/p/pypcap/ http://oss.coresecurity.com/projects/pcapy.h

dtd validation on python 3.1 on Windows.

2010-01-08 Thread VYAS ASHISH M-NTB837
What is the best way to validate xmls against my dtd in python? I dont see minodom doing this. Sax has dtd validation, but does not complain on dtd violations. (it does access the dtd, if it does not find dtd it complains me.) I am using python 3.1 on Win32 machine. I was planning to try

RE: How to execute a script from another script and other script doesnotdo busy wait.

2010-01-07 Thread VYAS ASHISH M-NTB837
Did you try? Thanks Ashish. I've single CPU machine. I've a feeling that the thread created, which would run script2, would eat up all of the CPU if I do not use sleep() in script2. That way, script1 would still be waiting for script2 to finish. Thus, my program is no way different from the samp

RE: How to execute a script from another script and other script does notdo busy wait.

2010-01-07 Thread VYAS ASHISH M-NTB837
Use threads Regards, Ashish Vyas -Original Message- From: python-list-bounces+ntb837=motorola@python.org [mailto:python-list-bounces+ntb837=motorola@python.org] On Behalf Of Rajat Sent: Thursday, January 07, 2010 2:42 PM To: python-list@python.org Subject: How to execute a scrip

RE: lxml 2.2.4 on python3.1, Windows XP gives importerror

2010-01-06 Thread VYAS ASHISH M-NTB837
Processor is Intel Pentium 32 bit. import platform print (platform.architecture()) gives -> ('32bit', 'WindowsPE') Regards, Ashish Vyas -Original Message- From: Sridhar Ratnakumar [mailto:sridh...@activestate.com] Sent: Wednesday, January 06, 2010 10:15 PM T

RE: Convert month name to month number faster

2010-01-06 Thread VYAS ASHISH M-NTB837
How about using list.index() and storing month names in a list? You may want to measure performance your self and conclude. Regards, Ashish Vyas -Original Message- From: python-list-bounces+ntb837=motorola@python.org [mailto:python-list-bounces+ntb837=motorola@python.org] On Beh

RE: lxml 2.2.4 on python3.1, Windows XP gives importerror

2010-01-06 Thread VYAS ASHISH M-NTB837
Posting again as I did not get any response: Dear All I have Python 3.1 installed on Windows XP and Works nice. I downloaded lxml 2.2.4 (lxml-2.2.4.win32-py3.1.exe) from pypi. When I try: from lxml import etree I get: ImportError: DLL load failed: This application has failed to start because

lxml 2.2.4 on python3.1, Windows XP gives importerror

2010-01-05 Thread VYAS ASHISH M-NTB837
Dear All I have Python 3.1 installed on Windows XP and Works nice. I downloaded lxml 2.2.4 (lxml-2.2.4.win32-py3.1.exe) from pypi. When I try: from lxml import etree I get: ImportError: DLL load failed: This application has failed to start because the application configuration is incorrect. R

RE: How to run a repeating timer every n minutes?

2009-10-29 Thread VYAS ASHISH M-NTB837
Thanks a lot, this helps. -Original Message- From: python-list-bounces+ntb837=motorola@python.org [mailto:python-list-bounces+ntb837=motorola@python.org] On Behalf Of Frank Millman Sent: Thursday, October 29, 2009 5:19 PM To: python-list@python.org Subject: Re: How to run a repea

How to run a repeating timer every n minutes?

2009-10-29 Thread VYAS ASHISH M-NTB837
Dear All How do I write a code that gets executed 'every x' minutes? I know how to do it 'after x' minutes, I do the following: def doAtTimerFire(): """ The things I want to do 'after x' minutes go here. """ And then from main code, I do this: tmr = threading.Timer(timeInSeconds,

RE: Python 2.6 Global Variables

2009-10-29 Thread VYAS ASHISH M-NTB837
Dear all How do I write a code that gets executed 'every x' minutes? I know how to do it 'after x' minutes, I do the following: def doAtTimerFire(): """ The things I want to do 'after x' minutes go here. """ And then from main code, I do this: tmr = threading.Timer(timeInSeconds,

RE: AttributeError: 'SSLSocket' object has no attribute 'producer_fifo'

2009-10-22 Thread VYAS ASHISH M-NTB837
attr) AttributeError: 'SSLSocket' object has no attribute 'out_buffer' Someone please throw some light on this! Ashish From: VYAS ASHISH M-NTB837 Sent: Friday, October 23, 2009 11:35 AM To: python-list@python.org Subject: AttributeError: &

AttributeError: 'SSLSocket' object has no attribute 'producer_fifo'

2009-10-22 Thread VYAS ASHISH M-NTB837
I am getting the following error when I try to run my program to post and receive xmls to an https server. Traceback (most recent call last): File "C:\Python31\lib\threading.py", line 509, in _bootstrap_inner self.run() File "C:\Python31\lib\threading.py", line 462, in run self._tar

RE: Help with my program

2009-10-22 Thread VYAS ASHISH M-NTB837
So What is stopping you to do this? Make some methods getName, getHeight... and call classObj.getName() etc from other class. Ashish From: python-list-bounces+ntb837=motorola@python.org [mailto:python-list-bounces+ntb837=motorola@python.org] On Behalf

RE: deepcopy of class inherited from Thread

2009-10-12 Thread VYAS ASHISH M-NTB837
] On Behalf Of Mick Krippendorf Sent: Monday, October 12, 2009 10:52 PM To: python-list@python.org Subject: Re: deepcopy of class inherited from Thread VYAS ASHISH M-NTB837 schrieb: > I have an object which has a run() method. But I can call it only once. > Calling the start() again wil

RE: deepcopy of class inherited from Thread

2009-10-12 Thread VYAS ASHISH M-NTB837
: - deepcopy the object - call start() for the object you got from deepcopy - delete the object. Is there a simpler way to achieve this? Regards, Ashish Vyas -Original Message- From: Dave Angel [mailto:da...@ieee.org] Sent: Monday, October 12, 2009 7:14 PM To: VYAS ASHISH M-NTB837 Cc: python

deepcopy of class inherited from Thread

2009-10-12 Thread VYAS ASHISH M-NTB837
Dear All I am running this piece of code: from threading import Thread import copy class Ashish(Thread): def __init__(self, i): Thread.__init__(self) self.foo = i def run(self): print (self, self.foo) d= Ashish(4) e = copy.deepcopy(d) <--- Exception here...