Roleof, do you think you could stop sending HTML messages and use
plaintext instead? I usually skip over your posts because your font
is so small and hard to read that I don't even bother.
If you send plain-text messages (which is the norm on programming
mailing lists) then you leave it up to the
On Fri, 10 Sep 2010 05:34:49 am Igor Choromanski wrote:
> Hi,
>
> After much research, I've come up with a list of what I think might
> be the best way of putting together a Python based social
> network/cms, but have some questions about how some of these
> components fit together.
This does not
smtp_ssl does not work for python 2.5.
can not even connect. not mention about starttls.
On 2010/9/10 19:39, Evert Rol wrote:
Do things work when you use SSL or TLS (through SMTP_SSL or using starttls,
respectively)? Perhaps Vista is more strict in checking for this when
connecting through a
On 9/10/2010 2:48 PM, Roelof Wobben wrote:
Date: Fri, 10 Sep 2010 20:23:09 +0200
From: f...@libero.it
To: tutor@python.org
Subject: Re: [Tutor] exceptions problem
On 10/09/2010 18.12, Roelof Wobben wrote:
> ...
> def readposint():
> x = raw_input("Please enter a positive integer :"
> I could not connect with gmail smtp server in Vista 32( worked ok in XP 32).
> Both vista and xp have same anti-virus software.
>
smtplib.SMTP("smtp.gmail.com",587)
>
> Traceback (most recent call last):
> File "", line 1, in
>smtplib.SMTP("smtp.gmail.com",587)
> File "C:\Program F
> My script to call a web service authenticates.
Sorry, but where is the (full) script? I missed an attachment or (preferably)
a link.
> I would like to be
> able to trap an exception if the authentication fails. The script
> loops over a list of dates and I don't want it to retry for every
On 09/11/10 07:36, Rance Hall wrote:
> I'm using the following function style I found on the net to create
> menus for a command line python script:
>
> It works well, but the first item is the list is item 0. This is
> normal in most computing situations, but because this index is part of
> the
Yeah, just add 1 to it. When printing just do index+1 and when inputting the
user's choice, subtract 1 and use it as the array index.
Sent from my iPhone
On Sep 10, 2010, at 4:36 PM, Rance Hall wrote:
> I'm using the following function style I found on the net to create
> menus for a command
I'm using the following function style I found on the net to create
menus for a command line python script:
def mainmenu():
# the main menu
todolist()
mainmenuoptions = ['Clients','Jobs','Billing','Quotes','To Do
Items','Employee','Exit']
mainmenucalls = [clientsmenu, jobsmenu, bil
On Fri, Sep 10, 2010 at 3:12 PM, Luke Paireepinart
wrote:
> In general, you shouldn't even hint at the possibility of there being a bug
> in the code unless you have test cases and a patch handy. Especially
> something as widely used as hashlib. It gives An air of arrogance about your
> post,
In general, you shouldn't even hint at the possibility of there being a bug in
the code unless you have test cases and a patch handy. Especially something as
widely used as hashlib. It gives An air of arrogance about your post, whether
you intend it or not.
I think your issue got resolved alrea
> On 9/10/2010 5:22 AM, lists wrote:
>>>
>>> you could try random.shuffle and save a lot of time, it takes a mutable
>>> sequence (like a list) and shuffles it
>>
>> Hey there,
>>
>> For the few exercises I've been doing, I think the author has been
>> attempting to make the reader do things 'the
On 9/10/2010 5:22 AM, lists wrote:
you could try random.shuffle and save a lot of time, it takes a mutable
sequence (like a list) and shuffles it
Hey there,
For the few exercises I've been doing, I think the author has been
attempting to make the reader do things 'the difficult way' so that
th
On 9/10/2010 5:22 AM, lists wrote:
you could try random.shuffle and save a lot of time, it takes a mutable
sequence (like a list) and shuffles it
Hey there,
For the few exercises I've been doing, I think the author has been
attempting to make the reader do things 'the difficult way' so that
th
On 2:59 PM, Rance Hall wrote:
Im wanting to use the builtin hashlib functions to encrypt passwords
before storing them in a database.
According to documentation on the python.org site it should be as simple as
import hashlib
hashname = hashlib.sha234 (or whatever other hash method you want
Hello,
My script to call a web service authenticates. I would like to be
able to trap an exception if the authentication fails. The script
loops over a list of dates and I don't want it to retry for every
element in the list. This could take a long time and be very annoying
when, after the long
Date: Fri, 10 Sep 2010 20:23:09 +0200
From: f...@libero.it
To: tutor@python.org
Subject: Re: [Tutor] exceptions problem
On 10/09/2010 18.12, Roelof Wobben wrote:
> ...
> def readposint():
> x = raw_input("Please enter a positive integer :")
> try:
> if not (x == i
On Fri, Sep 10, 2010 at 04:42:35PM +0200, Peter Otten wrote:
> Michael Powe wrote:
> > On Fri, Sep 10, 2010 at 03:56:51PM +0200, Peter Otten wrote:
> >> Michael Powe wrote:
> >> > I can't work out how to suppress stacktrace printing when exceptions
> >> > are thrown.
> >> WRONG:
> >>
> >> >>>
Rance Hall wrote:
> Im wanting to use the builtin hashlib functions to encrypt passwords
> before storing them in a database.
>
> According to documentation on the python.org site it should be as simple
> as
>
> import hashlib
>
> hashname = hashlib.sha234 (or whatever other hash method you wa
On 10/09/2010 18.12, Roelof Wobben wrote:
...
def readposint():
x = raw_input("Please enter a positive integer :")
try:
if not (x == int(x) and x< 0): raise(ValueError)
except:
print x , "is not a positive integer.Try again."
I could not connect with gmail smtp server in Vista 32( worked ok in
XP 32). Both vista and xp have same anti-virus software.
smtplib.SMTP("smtp.gmail.com",587)
Traceback (most recent call last):
File "", line 1, in
smtplib.SMTP("smtp.gmail.com",587)
File "C:\Program Files\Python25\
Im wanting to use the builtin hashlib functions to encrypt passwords
before storing them in a database.
According to documentation on the python.org site it should be as simple as
import hashlib
hashname = hashlib.sha234 (or whatever other hash method you want
like md5 or whatever)
hashname.up
From: rwob...@hotmail.com
To: tutor@python.org
Date: Fri, 10 Sep 2010 16:12:08 +
Subject: Re: [Tutor] exceptions problem
Date: Fri, 10 Sep 2010 18:07:13 +0200
From: f...@libero.it
To: tutor@python.org
Subject: Re: [Tutor] exceptions problem
Oops, I sent this to Roelof... Ok, I mus
Date: Fri, 10 Sep 2010 18:07:13 +0200
From: f...@libero.it
To: tutor@python.org
Subject: Re: [Tutor] exceptions problem
Oops, I sent this to Roelof... Ok, I must amend it anyway...
On 10/09/2010 17.13, Roelof Wobben wrote:
> ...
> def readposint():
> x = raw_input("Please enter a pos
Oops, I sent this to Roelof... Ok, I must amend it anyway...
On 10/09/2010 17.13, Roelof Wobben wrote:
...
def readposint():
x = raw_input("Please enter a positive integer :")
try:
x = int(x) and x> 0
except:
print x , "is not a positive i
On 2:59 PM, Roelof Wobben wrote:
Now I thought this would work:def readposint():
x = raw_input("Please enter a positive integer :")
try:
x = int(x) and x> 0
except:
print x , "is not a positive integer. Try again."
return False
return Truey = rea
Hello,
I have this problem :
Write a function named readposint that prompts the user for a positive integer
and then checks the input to confirm that it meets the requirements. A sample
session might look like this:
>>> num = readposint()
Please enter a positive integer: yes
yes is not
Michael Powe wrote:
> On Fri, Sep 10, 2010 at 03:56:51PM +0200, Peter Otten wrote:
>> Michael Powe wrote:
>>
>> > I can't work out how to suppress stacktrace printing when exceptions
>> > are thrown.
>>
>> [snip rant]
>>
>> It might have been a good idea to read a tutorial like
>>
>> http://do
I am reading the decorator section within Expert Python Programming and I am
very confused in the first example, of a method that was done before
decorators. It reads:
class WhatFor(object):
def it(cls):
print 'work with %s' % cls
it = classmethod(it)
def uncommon():
pr
On Fri, Sep 10, 2010 at 03:50:57PM +0200, Evert Rol wrote:
> This is a bit of a guess, but as far as I know, you can catch exceptions like
> that.
> Try:
> try:
> data = opener.open(url)
> except urllib2.URLError as msg:
> print msg
> sys.exit(1)
> If you're using an older versio
>>> I can't work out how to suppress stacktrace printing when exceptions
>>> are thrown.
>>
>> [snip rant]
>>
>> It might have been a good idea to read a tutorial like
>>
>> http://docs.python.org/tutorial/errors.html#handling-exceptions
>
>> or ask before you got annoyed enough to write that r
On Fri, Sep 10, 2010 at 03:56:51PM +0200, Peter Otten wrote:
> Michael Powe wrote:
>
> > I can't work out how to suppress stacktrace printing when exceptions
> > are thrown.
>
> [snip rant]
>
> It might have been a good idea to read a tutorial like
>
> http://docs.python.org/tutorial/errors.htm
Hi Jan,
Here's a screendump of my program: http://nl.tinypic.com/r/2qtlojc/7 . This
might make my description a little bit clearer. The beautiful sunset will in
reality be a dull, handwritten form. ;-)
Regarding the iterator pattern, I was referring to this:
http://www.suttoncourtenay.org.uk/d
Michael Powe wrote:
> I can't work out how to suppress stacktrace printing when exceptions
> are thrown.
[snip rant]
It might have been a good idea to read a tutorial like
http://docs.python.org/tutorial/errors.html#handling-exceptions
or ask before you got annoyed enough to write that rant ;)
> I can't work out how to suppress stacktrace printing when exceptions
> are thrown.
>
> I want the thrown exception to pass a message on the console, just
> like Java does when I catch an exception and print e.getMessage().
>
> I tried some of the examples of controlling traceback through the
>
Am 10.09.2010 11:23, schrieb Albert-Jan Roskam:
Hi,
I've made a small data entry program where a picture of a hand-written,
scanned form is shown next to several text entries. The design has been
largely 'bottom up', although of course I started with a rough sketch. I
started with the following
Hello,
I can't work out how to suppress stacktrace printing when exceptions
are thrown.
I want the thrown exception to pass a message on the console, just
like Java does when I catch an exception and print e.getMessage().
I tried some of the examples of controlling traceback through the
tracebac
On 10 September 2010 13:14, Roelof Wobben wrote:
> Hello ,
>
> So my book teach me the wrong principle.
> But can everything programmed on Eafp.
>
> If you dont know if something is a list, a tuple or a string, you can get a
> lot of nested try except think.
>
> Roelof
>
Hi Roelof,
I don't thi
Hello ,
So my book teach me the wrong principle.
But can everything programmed on Eafp.
If you dont know if something is a list, a tuple or a string, you can get a lot
of nested try except think.
Roelof
Subject: Re: [Tutor] recursive problem
From: rabidpoob...@gmail.com
Date:
Ooops, I forgot to send to the list too!
-- Forwarded message --
From: lists
Date: Fri, Sep 10, 2010 at 10:22 AM
Subject: Re: [Tutor] Random list exercise
To: Christopher King
> you could try random.shuffle and save a lot of time, it takes a mutable
> sequence (like a list) and
Hi,
I've made a small data entry program where a picture of a hand-written, scanned
form is shown next to several text entries. The design has been largely 'bottom
up', although of course I started with a rough sketch. I started with the
following classes: Menu (responsible for the widget creat
41 matches
Mail list logo