Re: [Tutor] Capture keyboard input even without python in focus

2006-04-01 Thread francois schnell
Hello,On windows OS I'm using the nice pyhook module:The pyHook library wraps the low-level mouse and keyboard hooks in the Windows Hooking API for use in Python applications. See tutorial here:http://www.cs.unc.edu/~parente/tech/tr08.shtmlfrancois On 01/04/06, Ars [EMAIL PROTECTED] wrote:

Re: [Tutor] BeautifulSoup - getting cells without new line characters

2006-04-01 Thread Kent Johnson
[EMAIL PROTECTED] wrote: Kent Johnson writes: [EMAIL PROTECTED] wrote: List of states: http://en.wikipedia.org/wiki/U.S._state : soup = BeautifulSoup(html) : # Get the second table (list of states). : table = soup.first('table').findNext('table') : print table ... tr tdWY/td

[Tutor] Python, VB math simple problem

2006-04-01 Thread Mr X
Hi looking for help with what should be a fairly simple Python problem, relating to VB inter-operability. Got a great response from a fellow named Matt at [EMAIL PROTECTED], pointed me in some good directions - some areas, concerns still foggy on, the below thread is included any

Re: [Tutor] BeautifulSoup - getting cells without new line characters

2006-04-01 Thread jonasmg
Kent Johnson writes: [EMAIL PROTECTED] wrote: Kent Johnson writes: [EMAIL PROTECTED] wrote: List of states: http://en.wikipedia.org/wiki/U.S._state : soup = BeautifulSoup(html) : # Get the second table (list of states). : table = soup.first('table').findNext('table') : print

Re: [Tutor] BeautifulSoup - getting cells without new line characters

2006-04-01 Thread Kent Johnson
[EMAIL PROTECTED] wrote: Yes, ok. But so, it is only possible get data from a row (rows[0]) cells=rows[0]('td') And I want get data from all rows. I have trying with several 'for' setences but i can not. Can you show us what you tried? Have you read a Python tutorial? It seems like

Re: [Tutor] Python, VB math simple problem

2006-04-01 Thread Kent Johnson
Mr X wrote: Hi looking for help with what should be a fairly simple Python problem, relating to VB inter-operability. Got a great response from a fellow named Matt at [EMAIL PROTECTED], pointed me in some good directions - some areas, concerns still foggy on, the below thread is

Re: [Tutor] i need help please read (fwd)

2006-04-01 Thread Alan Gauld
Tom, I'm still struggling, but based on what Danny Yoo deduced I'll assume you are talking anbout a dialog box or window of some sort rather than drawing a graphical box? ok ill tell you want im doing i want to make a box using python that if you put the box over a number on the computer

Re: [Tutor] BeautifulSoup - getting cells without new line characters

2006-04-01 Thread jonasmg
Kent Johnson writes: [EMAIL PROTECTED] wrote: Yes, ok. But so, it is only possible get data from a row (rows[0]) cells=rows[0]('td') And I want get data from all rows. I have trying with several 'for' setences but i can not. Can you show us what you tried? Have you read a

Re: [Tutor] Doctest, object references and the use of ellipses

2006-04-01 Thread Kent Johnson
Don Taylor wrote: Hi: I am trying to use Doctest and am having trouble using the ellipsis feature when trying to match an object reference. What version of Python are you using? The ELLIPSIS comment was added in Python 2.4. Kent Here is the code: def add_change_listener(self,

Re: [Tutor] Doctest, object references and the use of ellipses

2006-04-01 Thread Don Taylor
Kent Johnson wrote: Don Taylor wrote: Hi: I am trying to use Doctest and am having trouble using the ellipsis feature when trying to match an object reference. What version of Python are you using? The ELLIPSIS comment was added in Python 2.4. I am using 2.4.2 Don.

Re: [Tutor] Apple Remote Mouse

2006-04-01 Thread Alan Gauld
Johnston Jiaa [EMAIL PROTECTED] wrote in message I recently bought a Macbook Pro from Apple. I'm jealous already... As it comes with a remote, I thought it would be great to use it as a mouse when not in Front Row. ... Is there any way to manipulate the cursor position on the screen using

Re: [Tutor] Python tutor

2006-04-01 Thread Don Taylor
Noufal Ibrahim wrote: Greetings all, Are there any programs for python that offer an interactive tutorial? Something on the lines of the builtin emacs tutorial (which is While it is not really what you had in mind, I have just discovered the Python Challenge - and it is a lot of fun.

Re: [Tutor] how to get the content of an XML elements.

2006-04-01 Thread Alan Gauld
Keo Sophon [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Is there anyway to get the content of an XML elements. I am using xml.dom. For true XML I think ElemTree (by Fred Lundh?) is the best approach. Try a Google search. Kent uses it as I recall. Alan G.

Re: [Tutor] how to get the content of an XML elements.

2006-04-01 Thread Kent Johnson
Alan Gauld wrote: Keo Sophon [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Is there anyway to get the content of an XML elements. I am using xml.dom. For true XML I think ElemTree (by Fred Lundh?) is the best approach. Try a Google search. Yes, it's ElementTree though.

Re: [Tutor] Python tutor

2006-04-01 Thread Don Taylor
Alan Gauld wrote: I tried at one stage producing JavaScripted versions of the code in my tutor where you could step through the code with the active line being highlighted in colour - like a debugger. But after struggling for ages to get one short example to work it seemed too much like

Re: [Tutor] BeautifulSoup - getting cells without new line characters

2006-04-01 Thread jonasmg
Danny Yoo writes: Have you read a Python tutorial? It seems like some of the things you are struggling with might be addressed in general Python material. You consider a thing about me. If I ask something it is because I cannot find the solution. I do not it by whim. Hello

Re: [Tutor] BeautifulSoup - getting cells without new line characters

2006-04-01 Thread jonasmg
And the solution to get the state and capital columns (where there are anchors): for row in table('tr'): for cell in row.fetch('a')[0:2]: print cell.string ___ Tutor maillist - Tutor@python.org

Re: [Tutor] Python tutor

2006-04-01 Thread Alan Gauld
I tried at one stage producing JavaScripted versions of the code in my I found this site the other day and I thought that it would not be too difficult to generalize this technique into a simple tool for authoring tutorials. http://www.jorendorff.com/toys/ Yes, this is similar to

Re: [Tutor] Doctest, object references and the use of ellipses

2006-04-01 Thread Tim Peters
[Don Taylor] I am trying to use Doctest and am having trouble using the ellipsis feature when trying to match an object reference. Here is the code: def add_change_listener(self, listener): ''' Returns list of listeners just for testing. def

[Tutor] Apple Remote Mouse

2006-04-01 Thread Johnston Jiaa
Hey Alan,I'm fairly new to programming and this is my first Apple computer. It arrives on Monday, I've been waiting for ages. Amazon took forever shipping it out. Anyway, this will ultimately be a true learning experience -- I'll tell you how it turns out! Many thanks for giving me these pointers,

Re: [Tutor] Doctest, object references and the use of ellipses

2006-04-01 Thread Don Taylor
Tim Peters wrote: That should work, provided there aren't differences in whitespace that are invisible to us in this medium. For example, if, in your source file, there's actually a (one or more) trailing space on your line of expected output, then it would _not_ match the actual output.

Re: [Tutor] Doctest, object references and the use of ellipses

2006-04-01 Thread Tim Peters
[Tim Peters] That should work, provided there aren't differences in whitespace that are invisible to us in this medium. For example, if, in your source file, there's actually a (one or more) trailing space on your line of expected output, then it would _not_ match the actual output. Try

Re: [Tutor] BeautifulSoup - getting cells without new line characters

2006-04-01 Thread Danny Yoo
And the solution to get the state and capital columns (where there are anchors): for row in table('tr'): for cell in row.fetch('a')[0:2]: print cell.string Hi Jonas, That's good to hear! So does everything work for you then? ___