Re: [Tutor] pyhook for Linux

2007-06-24 Thread learner404
Hi,

You could also use the evdev driver:

http://groups.google.com/group/comp.lang.python/browse_thread/thread/2d7e3791381bdeb5/a03d438f64ec5ac8?lnk=gst&q=francois+schnell&rnum=2#a03d438f64ec5ac8

If you successfully use another way I'm interested by your feedback. Thanks.


On 6/23/07, Flaper87 <[EMAIL PROTECTED]> wrote:
> Hi!
>
> Does anyone knows an equivalence of pyhook for linux?
>
> I need to catch the events of the mose (even the simple movement, or when it
> focus an icon on Desktop), and the events of the keyboard.
>
> Thank's
>
> --
> Flavio Percoco Premoli, A.K.A. [Flaper87]
> http://www.flaper87.com
> Usuario Linux registrado #436538
> Geek by nature, Linux by choice, Debian of course.
> Key Fingerprint: CFC0 C67D FF73 463B 7E55  CF43 25D1 E75B E2DB 15C7
> ___
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>
>


-- 
Francois Schnell
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] SPE - Stani's Python Editor ?

2007-06-24 Thread Hiếu Hoàng
The SPE is pure Python, you can run it on 2.5 without change. I think
Fuzzyman makes a zip file that can be used for all versions. Just
wxPython need to be compiled against 2.5 specifically.

http://prdownload.berlios.de/python/SPE-0.8.3.c-wx2.6.1.0-no_setup.zip

should be what you need. The subversion version can now run on
wxPython 2.8 reliably, and he's moving up to wxPy 2.8.

SPE's site is now http://pythonide.blogspot.com
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] SPE - Stani's Python Editor ?

2007-06-24 Thread Alan Gauld
"Hi?u Hoàng" <[EMAIL PROTECTED]> wrote

> http://prdownload.berlios.de/python/SPE-0.8.3.c-wx2.6.1.0-no_setup.zip
>
> should be what you need. The subversion version can now run on
> wxPython 2.8 reliably, and he's moving up to wxPy 2.8.

I managed to get the standard download working with wxPy 2.8
just by moving one line of code in the init method of  Throbber
in Menu.py

So far that has worked fine...

Alan G.


___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] using shelve

2007-06-24 Thread chrispython
 
Sorry it took me so long to get back - from your posts and my experimentation I 
can see that when you access one item in the shelve dictionary, it only gets 
the one item, not all of them. I am going to use shelve, and only refactor or 
change if performance becomes an issue - which I don't see happening for a long 
time.
On Thursday, June 21, 2007, at 10:27PM, "John Fouhy" <[EMAIL PROTECTED]> wrote:
>On 22/06/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>> I created a shelf called 'myshelf' and put two objects in it, a string and a 
>> list. When I open the shelf I get:
>>
>> >>> d=shelve.open('/Users/development/Desktop/myshelf')
>> >>> d.keys()
>> ['dir1', 'dir2']
>> >>> d
>> {'dir2': '/Users/development/Desktop/RSSReaderApp/RSS.db', 'dir1': 
>> ['.DS_Store', '.localized', 'access the latest version', 'Python Quick 
>> Reference.webloc', 'rssdb', 'workspace']}
>>
>> It seems that when you use shelve.open(), it actually brings the entire 
>> shelf dictionary into memory, accessible through d.
>
>Well ... all that tells me is that when you ask python for a string
>representation of a shelf, it reads the entire thing.
>
>> What if you had 100 objects in myshelf, or 1000 or 100,000? Wouldn't it get 
>> bogged down?
>
>If you try to print out the whole thing, probably.  Let's try some test:
>
 import shelve
 d = shelve.open('test.shelf')
 for i in range(1000):
>...  d[str(i)] = 'x'*i
>...
 d.close()
>
>Morpork:~/tmp repton$ ls -l test.shelf
>-rw-r--r--   1 repton  repton   1M Jun 22 14:23 test.shelf
>
>First, we'll measure how long it takes python to open the shelf using
>shelve.open:
>
>Morpork:~/tmp repton$ python -m timeit -s 'import shelve' 'd =
>shelve.open("test.shelf")'
>1000 loops, best of 3: 1.95 msec per loop
>
>Now we'll measure how long it takes python to open a shelf and turn it
>into a string:
>
>Morpork:~/tmp repton$ python -m timeit -s 'import shelve' 'd =
>shelve.open("test.shelf")' 'str(d)'
>10 loops, best of 3: 51.5 msec per loop
>
>So, that's about a factor of 25 difference.
>
>HTH!
>
>-- 
>John.
>
>
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Tutor Digest, Vol 40, Issue 55

2007-06-24 Thread Tony Cappellini
Take a look at pyHook

>1. Re: Catch event's on my computer (Alan Gauld)
> From: "Alan Gauld" <[EMAIL PROTECTED]>
> Subject: Re: [Tutor] Catch event's on my computer
> To: tutor@python.org
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; format=flowed; charset="iso-8859-1";
> reply-type=original
>
> "Flaper87" <[EMAIL PROTECTED]> wrote
>
> > I mean, i need to catch every movement of the pointer, what its
> > position is
> > everything. I've read that i can do that using my native system API,
> > and
> > also pygame.
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] python port scanner

2007-06-24 Thread max .

hello i am looking into writing a simple python port scanner but i cant find
any good tutorials online if anyone can help or knows of any tutorials that
could help it would be great. this would be my first program like this so i
might need a little extra help


thanks
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] python port scanner

2007-06-24 Thread Alan Gauld
"max ." <[EMAIL PROTECTED]> wrote

> hello i am looking into writing a simple python port scanner but i 
> cant find
> any good tutorials online if anyone can help or knows of any 
> tutorials that
> could help it would be great.

Well you could start with my network programming topic in my tutor.

It covers the basics of sockets and ports. You don;t give any clues
as to how much you already know so its hard to give specific advice.

One thing you might find useful is the book "Python Network
Programming" published by Apress. It is a very complete book on
all aspects of network programming in Python, although not aimed
at beginners.

-- 
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld 


___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor