Luke Paireepinart, 14.02.2010 13:12:
> Also I think beautifulsoup is part of the Python standardlib now, isn't it?
No, it's not.
Stefan
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailma
"Wayne Watson" wrote
Thanks for the reminder on that. I haven't need the DOS box for 8
months. Just off on other non-programming efforts for the most part.
Things have picked up of late. I was beginning to think for awhile that
Win7 might have dropped it. I don't see any changes to it.
Its
"Luke Paireepinart" wrote
with BeautifulSoup were. Also I think beautifulsoup is part of the
Python
standardlib now, isn't it? Why do you think it is not maintained?
I think you may be getting confused with element tree which is part
of the standard lib? BS is still an add-on.
Alan G.
2010/2/14 Luke Paireepinart
> I see why you would want the error messages but why is the default error
> message not enough, that is why I am curious, and typically introspection on
> objects is not necessary (for example, people often want to convert a string
> into a variable name to store a va
Well ya I was kind of hoping to know about more tools and recommendations on
how to edit broken html . Their were tags that I wanted to replace using
beautifulSoup
however i saw that the replacewith function was not available for many of
the tags I
wanted to replace . Also BeautifulSoup does not h
Hi!
I am trying to teach myself how to program in Python using Zelle's
"Python Programming: An Introduction to Computer Science" (a very good
text). At the same time I have decided to start with Python 3 (3.1.1).
That means that I have to convert Zelle's example code to Python 3
(which genera
Hi!
I am trying to teach myself how to program in Python using Zelle's
"Python Programming: An Introduction to Computer Science" (a very good
text). At the same time I have decided to start with Python 3 (3.1.1).
That means that I have to convert Zelle's example code to Python 3
(which genera
pja wrote:
Hi!
I am trying to teach myself how to program in Python using Zelle's
"Python Programming: An Introduction to Computer Science" (a very good
text). At the same time I have decided to start with Python 3 (3.1.1).
That means that I have to convert Zelle's example code to Python 3
(
Amit Sethi, 15.02.2010 13:28:
> Well ya I was kind of hoping to know about more tools and recommendations on
> how to edit broken html.
You already found lxml, don't think you can do any better. Note that you
shouldn't "edit broken html" but "fix broken HTML and then edit correct
HTML". Writing ou
On Mon, Feb 15, 2010 at 6:07 AM, patrice laporte wrote:
> My own experience is that there is too much coder that forget the app they
> work on is aim to be used by "real human", not by C/C++/Python/put what ever
> you want here/ guru : if your app popups to the user a message that is just
> what
On Mon, Feb 15, 2010 at 7:28 AM, Amit Sethi wrote:
> Well ya I was kind of hoping to know about more tools and recommendations on
> how to edit broken html .
This page lists several alternatives: html5, lxml, elementtree:
http://www.crummy.com/software/BeautifulSoup/3.1-problems.html
> Their wer
On Mon, Feb 15, 2010 at 7:34 AM, pja wrote:
> 05 import math
> 06
> 07 def main():
> 08 print("This program finds the real solutions to a quadratic\n")
> 09
> 10 a, b, c = input("Please enter the coefficients (a, b, c): ")
> 11
> 12 '''
> 13 a = int(input("Please enter the first coefficient: "))
On Mon, Feb 15, 2010 at 6:09 AM, Peter Anderson <
peter.ander...@internode.on.net> wrote:
> Hi!
>
> I am trying to teach myself how to program in Python using Zelle's "Python
> Programming: An Introduction to Computer Science" (a very good text). At the
> same time I have decided to start with Pyt
patrice laporte wrote:
2010/2/14 Luke Paireepinart
I see why you would want the error messages but why is the default error
message not enough, that is why I am curious, and typically introspection on
objects is not necessary (for example, people often want to convert a string
into a variab
Christian,
You are a genius! There was one minor bug; the variable "in" needed to
be changed to something like "in_value" and it works perfectly.
Many thanks for that.
Regards,
Peter
--
*Peter Anderson*
There is nothing more difficult to take in hand, more perilous to
conduct, or more uncert
Peter Anderson wrote:
Hi!
I am trying to teach myself how to program in Python using Zelle's
"Python Programming: An Introduction to Computer Science" (a very good
text). At the same time I have decided to start with Python 3 (3.1.1).
That means that I have to convert Zelle's example code to
2010/2/15 Dave Angel
>
> This makes lots of sense. If the message doesn't make sense to the user,
> there's no point. But why then is your thread titled "Getting caller name"
> ? Why does the user care about the caller (function) name? When you
> started the thread, it seemed clear that your
Kent,
Thanks! That works well!
Regards,
Peter
--
*Peter Anderson*
There is nothing more difficult to take in hand, more perilous to
conduct, or more uncertain in its success, than to take the lead in the
introduction of a new order of things—Niccolo Machiavelli, /The Prince/,
ch. 6
_
Kent Johnson, 15.02.2010 14:05:
> On Mon, Feb 15, 2010 at 7:28 AM, Amit Sethi wrote:
>> Well ya I was kind of hoping to know about more tools and recommendations on
>> how to edit broken html .
>
> This page lists several alternatives: html5, lxml, elementtree:
> http://www.crummy.com/software/Bea
Hello All,
I am working with Python tutorial in wiki and one of the exercises is as
follows:
Ask the user for a string, and then for a number. Print out that string,
that many times. (For example, if the string is hello and the number is 3 you
should print out hellohellohello.)
Solution for this
On Mon, Feb 15, 2010 at 8:23 AM, Yaraslau Shanhin <
yaraslau.shan...@gmail.com> wrote:
> Hello All,
>
> I am working with Python tutorial in wiki and one of the exercises is as
> follows:
>
> Ask the user for a string, and then for a number. Print out that string,
> that many times. (For example,
Yaraslau Shanhin wrote:
Hello All,
I am working with Python tutorial in wiki and one of the exercises is as
follows:
Ask the user for a string, and then for a number. Print out that string,
that many times. (For example, if the string is hello and the number is 3 you
should print out hellohello
Yaraslau Shanhin wrote:
> Hello All,
Hello.
Suggestion for future questions - just include enough to identify the
problem. We don't need to know that this is from a tutorial or what the
exercise is. Also (at least I prefer) plain text without formatting or
color.
Sufficient therefore is:
Code:
text = str(input("Type in some text: "))
number = int(input("How many times should it be printed? "))
print (text * number)
Output:
Type in some text: some
How many times should it be printed? 5
Traceback (most recent call last):
File "test4.py", line 2, in
number = int(input("How ma
On 15 February 2010 15:15, Yaraslau Shanhin wrote:
> Code:
> text = str(input("Type in some text: "))
> number = int(input("How many times should it be printed? "))
> print (text * number)
> Output:
> Type in some text: some
> How many times should it be printed? 5
> Traceback (most recent call la
In the few cases I had where BeautifulSoup couldn't handle poorly formed
HTML, I've found that html5lib was able to get the job done. And of course,
lxml is great too, but has a bit more overhead installation-wis.
___
Tutor maillist - Tutor@python.org
T
2010/2/14 Steven D'Aprano
>
> > If the file do esn't exist, bing ! I got an exception "I/O Error n°2
> > : file doesn't exist".
>
> Are you sure? What version of Python are you using? I get a completely
> different error message:
>
>
Yes I'm not sure when I wrote : *I got an exception "I/O E
В 10:06 -0500 на 15.02.2010 (пн), bob gailer написа:
> Yaraslau Shanhin wrote:
>
> > Hello All,
>
> Hello.
>
> Suggestion for future questions - just include enough to identify the
> problem. We don't need to know that this is from a tutorial or what the
> exercise is. Also (at least I prefer
I've found there's quite a bit of discrepancy in top vs bottom posting.
It's hardly worth thinking about. I seem to navigate through top, bottom
or mixed. The real problem, IMHO, is very long posts from various people.
Marty
Ah ha! Sorry for the noise, I should really read the whole message
b
Here is an interesting solution that I developed using the EasyGUI
(http://easygui.sourceforge.net/) graphics library:
# 7.2_quadratic2easy.py
# A program that computes the real roots of a quadratic equation.
# Bad version using a simple if to avoid program crash
# This version uses the EasyGUI
Sorry about the previous post; I didn't check the code format before I
posted the reply and thus lost all the indentation. Here I go again,
hopefully with the correct indentation.
# 7.2_quadratic2easy.py
# A program that computes the real roots of a quadratic equation.
# Bad version using a si
I seem to be having a formatting problem between Thunderbird on my PC
and the mailing list; I am loosing all indentation. The Gmail account
settings on Thunderbird are for plain text and I set the e-mail
content to fixed width text so I'm not sure what's going wrong. I am
trying one last time sendi
Thanks for try but print without () does not work at all, at least in newer
version of python (3.1)
Anyway source of problem is now discovered: Komodo Edit tool, in Python
shell (IDLE) everything works fine. Perhaps anyone has any ideas why?
On Mon, Feb 15, 2010 at 10:02 PM, Grigor Kolev wrote:
33 matches
Mail list logo