Re: identifying live hosts on a network

2009-05-19 Thread Matias Surdi
hunteroakes...@gmail.com escribió: HI I am new to python and am having trouble coming up with a script that idenifies all the live hosts on my network. thanks Hunter I've done this in the past with the great help of nmap: # nmap -sP 192.168.0.0/23 this will find hosts "alive" from 192.168.0.

Re: How to see the code definiton in the shell ?

2009-05-13 Thread Matias Surdi
Mohan Parthasarathy escribió: Hi, I am new to Python. I tried searching this but could not find an answer. In the interactive shell, I write a new function and I want to be able to see all the code that I wrote at a later time. Just typing the function name only shows >>> allmethods How

Re: best set of modules for web automation without javascript

2009-02-13 Thread Matias Surdi
You should give a look to Selenium. It's great. http://www.openqa.org News123 wrote: Hi, I'd like to do some web automation with python 2.5 - https: - a cookiejar - some forms to be filled in what is the best set of modules. As far as I understood, there is httplib, but it seems (if I un

Re: Now what!?

2008-05-10 Thread Matias Surdi
Diez B. Roggisch escribió: notbob schrieb: Grrr I'm following A Byte of Python and into the while loops chap. I cp/paste while.py to a file and give 777 perms. I mv while.py to while and run it (./while) as a standalone script. I get errors. Here is the script: while.py http://www.i

Re: I just killed GIL!!!

2008-04-17 Thread Matias Surdi
It's april 1st again??? sturlamolden escribió: > Hello Guys... > > I just had one moment of exceptional clarity, during which realized > how I could get the GIL out of my way... It's so simple, I cannot help > wondering why nobody has thought of it before. Duh! Now I am going to > sit and and ma

Remote mac address

2008-04-14 Thread Matias Surdi
Anyone knows how having the IP address of a host on the lan could I get the mac address of that hosr? p/d: Parsing the output of arp -a is not an option. Thanks a lot! -- http://mail.python.org/mailman/listinfo/python-list

Re: python ODF library?

2008-03-30 Thread Matias Surdi
Matias Surdi escribió: > Do yo know any good OpenDocumentFormat library for python? > > I'm starting a project on wich I'll have to programatically modify ODF > text documments, so, after reinventing the wheel, I'd like to know if > already something exists. &g

python ODF library?

2008-03-30 Thread Matias Surdi
Do yo know any good OpenDocumentFormat library for python? I'm starting a project on wich I'll have to programatically modify ODF text documments, so, after reinventing the wheel, I'd like to know if already something exists. Thanks a lot. -- http://mail.python.org/mailman/listinfo/python-lis

[EMAIL PROTECTED]

2008-02-19 Thread Matias Surdi
test -- http://mail.python.org/mailman/listinfo/python-list

[EMAIL PROTECTED]

2008-02-19 Thread Matias Surdi
test -- http://mail.python.org/mailman/listinfo/python-list

mmap and shared memory

2008-02-11 Thread Matias Surdi
Suppose I've a process P1, which generates itself a lot of data , for example 2Mb. Then, I've a process P2 which must access P1 shared memory and, probably, modify this data. To accomplish this, I've been digging around python's mmap module, but I can't figure how to use it without files. Could

Re: importing module conflict

2008-01-10 Thread Matias Surdi
Ben Finney escribió: > Matias Surdi <[EMAIL PROTECTED]> writes: > >> Suppose I've a module named "urllib" and from it I need to import >> the urllib module from the python standart library. > > What you want is the "absolute import" behav

importing module conflict

2008-01-10 Thread Matias Surdi
Hi, Suppose I've a module named "urllib" and from it I need to import the urllib module from the python standart library. ¿how can I do this? The problem I found is that when I do: import urrlib The imported module is itself, and not the one from the stdlib. Any idea? Thanks a lot. -- ht

Adding a HTTP header to a SOAPpy request

2008-01-03 Thread Matias Surdi
Hi, Could anybody tell me which is the easier way to do a SOAP call to a web service wich requires an http header to be present? I can't figure it out. Thanks a lot Some code I'm using: import SOAPpy s = SOAPpy.SOAPProxy("http://10.3.5.128:10560/SERVICES",namespace="http://ws.mysite.com";)

Instrospection question

2007-12-21 Thread Matias Surdi
I have the following code: -- import new class A: def a(self): print "Original" def other(cad): return cad + " modified" def replace_method(method): def b(self,*args,**kwargs): result = method(*args,**kwargs) return other(result)

Re: How does setup.py work?

2007-12-19 Thread Matias Surdi
dxm escribió: > I am a new comer to python. > I am wondering how setup.py works. > For example, I have a directory like this: > / >setup.py >mymodule.c > > where setup.py is: > > from distutils.core import setup, Extension > > mod = Extension('mymodule', sources = ['mymodule.c']) > > se

Getting al classes inside a package

2007-12-17 Thread Matias Surdi
How can I get all the clasess inside a package (including it subpackages) ? for example, I have a package with classes A and B and with a subpackage wichs has class C. How can I get a list (and a path) of the classes that exists under the root package ? Thanks a lot! -- http://mail.python.o

Re: Delete a file from a CGI

2007-06-02 Thread Matias Surdi
Steve Holden escribió: > Matias Surdi wrote: >> Thanks for your reply. >> >> This is the code that creates the file: >> lock_file = open(".lock","w") >> lock_file.write("test") >> lock_file.close() >> #Change p

Re: Delete a file from a CGI

2007-06-01 Thread Matias Surdi
r os.remove(".lock") I've seen that the script is running as "nobody", but, the file is rwx by everybody. I've also tryed changing the owner of the file to "nobody" also, but no luck anyway. Thanks a lot. Steve Holden wrote: > Matias Surdi wrote: &g

Delete a file from a CGI

2007-06-01 Thread Matias Surdi
HI! I want to delete a file from a CGI, but I always get a Permission denied error. I've tryed this after creating the file (from a normal script): os.chmod(".lock",stat.S_IMODE(stat.S_IRWXU | stat.S_IRWXO | stat.S_IRWXG)) os.chown(".lock",pwd.getpwnam("nobody")[2],pwd.getpwnam("nobody")[3]) bu