> 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?
__
[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.
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
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 pointe
[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 m
>> 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
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
http://mail.python.org/mailman/listinfo/tutor
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.
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 l
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 ElementT
"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.
__
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.
"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
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.
_
Brian van den Broek wrote:
>Hi all,
>
>I've been too busy with life to do much Python of late. So, I am a bit
>rusty. :-(
>
>I've got some code that does what it needs to but I think I might be
>overlooking a much smoother way to get what I need.
>
>The code takes a list of strings and returns a
> > 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 Jonas,
Yes, but don't t
"Noufal Ibrahim" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Greetings all,
Greetings,
> the reader learns stuff). Another example that comes to mind is the
> tcltutor program to learn TCL. It contains an instruction window, a
> code window and an output window. The user is to
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
Hi:
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 mock_listener():
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?
>
> H
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 s
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
[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 l
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(
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 feedbac
[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 ta
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:
27 matches
Mail list logo