John Reese wrote:
> Morning. I've been running into an error message pertaining to SSL
> that I don't understand, and I was hoping someone had some insight.
> Gmail provides POP access over SSL on port 587, so I tried to use
> poplib.POP_SSL, with the following results:
[...]
> socket.sslerror: (1
Hello James,
"James Dennett" <[EMAIL PROTECTED]> schreef in bericht
news:[EMAIL PROTECTED]
> J.Bijsterbosch wrote:
>
[ snip ]
> >>and didn't remember Windows uses path names which need special
> >>treatment.
> >
> > Hmm, what you call special treatment comes from pythons deep
underlying C
> > and
I've just started digging into how python works..
I found that other mudules are clearly declared like one file per a
module..
But the only os.path doesn't have their own file..
ye I know is has actually depending on os like in my case posixpath..
What I'd love to know is..
when I call import os.
"Martin v. Löwis" <[EMAIL PROTECTED]> writes:
> [EMAIL PROTECTED]:~/doc$ telnet pop.gmail.com 587
> Trying 64.233.185.111...
> Connected to pop.gmail.com.
> Escape character is '^]'.
> 220 mx.gmail.com ESMTP 13sm5173422wrl
>
> This rather looks like an unencrypted SMTP connection to me. Indeed,
>
kimes wrote:
> I've just started digging into how python works..
> I found that other mudules are clearly declared like one file per a
> module..
>
> But the only os.path doesn't have their own file..
> ye I know is has actually depending on os like in my case posixpath..
>
> What I'd love to kno
kimes wrote:
> But the only os.path doesn't have their own file..
> ye I know is has actually depending on os like in my case posixpath..
>
> What I'd love to know is..
> when I call import os.path..
> how happened under the hood?
At first os - module, or package, it doesn't matter here - is imp
Here might be an interesting puzzle for people who like sorting
algorithms ( and no I'm not a student anymore and the problem is not a
students 'homework' but a particular question associated with a
computer algebra system in Python I'm currently developing in my
sparetime ).
For motivation lets d
John Reese wrote:
> Morning. I've been running into an error message pertaining to SSL
> that I don't understand, and I was hoping someone had some insight.
> Gmail provides POP access over SSL on port 587, so I tried to use
> poplib.POP_SSL, with the following results:
[snip]
> Any suggestions
John Reese wrote:
> Morning. I've been running into an error message pertaining to SSL
> that I don't understand, and I was hoping someone had some insight.
> Gmail provides POP access over SSL on port 587, so I tried to use
> poplib.POP_SSL, with the following results:
GMail uses port 995.
--
h
Steven D'Aprano wrote:
> On Sat, 16 Jul 2005 16:42:58 -0400, Peter Hansen wrote:
>>Come on, Steven. Don't tell us you didn't have access to a Python
>>interpreter to check before you posted:
>
> Er, as I wrote in my post:
>
> "Steven
> who is still using Python 2.3, and probably will be for qui
On Jul 15, 2005, at 11:19 PM, William Lodge wrote:
> Finally, does anybody know of any Web sites having examples of
> database apps
> in Python?
You might want to look at Dabo, which is a database application
framework for Python. In about 30 seconds you can create an application
that
I'm trying to understand the use of tuples in function argument lists.
I did this:
>>> def tester(a, (b,c)):
... print a, b, c
...
>>> tester(1, 2)
Traceback (most recent call last):
File "", line 1, in ?
File "", line 1, in tester
TypeError: unpack non-sequence
That was obvious result.
look at 'path' module too
http://www.jorendorff.com/articles/python/path/
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano wrote:
> I'm trying to understand the use of tuples in function argument lists.
>
> I did this:
>
def tester(a, (b,c)):
>
> ... print a, b, c
> ...
>
tester(1, 2)
>
> Traceback (most recent call last):
> File "", line 1, in ?
> File "", line 1, in tester
> Type
>>> # Fibonacci series:
... # the sum of two elements defines the next
... a, b = 0, 1
>>> while b < 10:
... print b
... a, b = b, a+b
...
1
1
2
3
5
8
>>> a, b = 0, 1
>>> while b < 10:
print b
a = b
b = a+b
1
2
4
8
Why a, b = b, a+b isn't a =
Joon wrote:
>
> >>> # Fibonacci series:
> ... # the sum of two elements defines the next
> ... a, b = 0, 1
> >>> while b < 10:
> ... print b
> ... a, b = b, a+b
> ...
> 1
> 1
> 2
> 3
> 5
> 8
>
> >>> a, b = 0, 1
> >>> while b < 10:
> print b
> a = b
> b = a+b
>
Joon wrote:
> >>> a, b = 0, 1
> >>> while b < 10:
> print b
> a = b
> b = a+b
>
>
> 1
> 2
> 4
> 8
>
> Why a, b = b, a+b isn't a = b; b = a+b ?
Because you changed a before you added it to b.
Let's call your existing a and b "a0" and "b0", and the next a and b
"a1" and "b1".
The case is that Python in attribution commands solves first the right
side, so he atributes the vars.
So the a+b expression is executed first.
Joon escreveu:
> >>> # Fibonacci series:
> ... # the sum of two elements defines the next
> ... a, b = 0, 1
> >>> while b < 10:
> ... print b
> ..
Yes, i see.
Thank you very much for the fast help!
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Cantankerous Old Git <[EMAIL PROTECTED]> wrote:
>[EMAIL PROTECTED] wrote:
>> In general, it is good idea to use expect kind of tool to deal with
>> interactive programs like ssh. You may try using pexpect
>> (http://pexpect.sourceforge.net).
>>
>
>I tried tha once
In article <[EMAIL PROTECTED]>,
Sybren Stuvel <[EMAIL PROTECTED]> wrote:
>tuxlover enlightened us with:
>> No, the replies from Grant's and Sybren's do answer my question.
>
>It would be a lot more polite to actually thank the people helping
>you.
.
If you are going to go with Python, don't include Access in the mix at all.
If you want a small light-weight, serverless database back-end, you would be
better to go with SQLite. Its cross platform and well proven. I think
Firebird will give you that too, though I have never used it.
Most peop
Hi, I'm trying and updating an .ini file with ConfigParser but each time
I call 'write', it appends the whole options another time to the file.
For example :
Here's the inital ini file
[section1]
foodir: %(dir)s/whatever
dir: foo
Here's my code :
filename = ...
config = ConfigParser.ConfigParser(
cantabile wrote:
> Hi, I'm trying and updating an .ini file with ConfigParser but each time
> I call 'write', it appends the whole options another time to the file.
> For example :
> Here's the inital ini file
>
> [section1]
> foodir: %(dir)s/whatever
> dir: foo
>
> Here's my code :
> filename =
Robert Kern a écrit :
> cantabile wrote:
>
>> Hi, I'm trying and updating an .ini file with ConfigParser but each time
>> I call 'write', it appends the whole options another time to the file.
>> For example :
>> Here's the inital ini file
>>
>> [section1]
>> foodir: %(dir)s/whatever
>> dir: foo
>
Thanks for all you guys help..
But Peter,
You said 'At first os - module, or package, it doesn't matter here - is
imported.'
I'm still confused about that..
When I just call import os.path without calling import os..
In that case, you mean 'import os' is called implicitly?
Why? and How?
how pyt
On Sun, 17 Jul 2005 11:05:06 +0100, Stephen Illingworth <[EMAIL PROTECTED]>
wrote:
> John Reese wrote:
>> Morning. I've been running into an error message pertaining to SSL
>> that I don't understand, and I was hoping someone had some insight.
>> Gmail provides POP access over SSL on port 587, so
Kay Schluehr wrote:
> Here might be an interesting puzzle for people who like sorting
> algorithms ( and no I'm not a student anymore and the problem is not a
> students 'homework' but a particular question associated with a
> computer algebra system in Python I'm currently developing in my
> spare
* Brian Quinlan <[EMAIL PROTECTED]> [2005-07-15 02:08]:
>
> You can find the first problem here:
> http://www.sweetapp.com/pycontest/contest1
I have one question about the problem. Is the cost we are to minimize
the cost of arriving in the target city at all, or the cost of arriving
at the targe
Bengt Richter wrote:
> Thanks for the nudge. Actually, I know about generator expressions, but
> at some point I must have misinterpreted some bug in my code to mean
> that join in particular didn't like generator expression arguments,
> and wanted lists.
I suspect this is bug 905389 [1]:
>>> de
I am doing some research for a Python framework to build web applications.
I have discarted Zope because from what I've read, the learning curve is
too steep, and it takes more time to build applications in general with
Zope.
I have kept the following:
- PyWork - http://pywork.sourceforge.ne
Admin enlightened us with:
> But I'd like to know your opinion on what you think is best. The
> Python framework I'll use will be to build an e-commerce
> application looking like Amazon.com
I'm greatly in favour of Cheetah. Also see
http://www.unrealtower.org/mycheetah. I need to put up way mor
On Sun, 17 Jul 2005 19:15:49 -0300, Sybren Stuvel
<[EMAIL PROTECTED]> wrote:
> http://www.unrealtower.org/mycheetah
"Error 404 while looking up your page AND when looking for a suitable
404
page. Sorry!
No such file /var/www/www.unrealtower.org/compiled/error404.py"
I can't
John Hazen wrote:
> * Brian Quinlan <[EMAIL PROTECTED]> [2005-07-15 02:08]:
>
>>You can find the first problem here:
>>http://www.sweetapp.com/pycontest/contest1
>
>
> I have one question about the problem. Is the cost we are to minimize
> the cost of arriving in the target city at all, or the
I really like Karrigell ( http://karrigell.sourceforge.net ).
It is, IMHO, the most pythonic framework because all you need to know
is the python language.
You don't need to learn any template or special language, you only use
plain and regular python.
It also gives you a lot of freedom when choosi
Kay Schluehr gmx.net> writes:
> Now lets drop the assumption that a and b commute. More general: let be
> M a set of expressions and X a subset of M where each element of X
> commutes with each element of M: how can a product with factors in M be
> evaluated/simplified under the condition of addi
[George Sakkis]
> It's only obvious in the sense that _after_ you see this idiom, you can go
> back to the docs and
> realize it's not doing something special; OTOH if you haven't seen it, it's
> not at all the obvious
> solution to "how do I get the first 256 characters". So IMO it should be
>
I have found that sys.stdin.fileno() and sys.stdout.fileno() always
return -1 when executed from within a win32 service written using the
win32 extensions for Python.
Anyone have experience with this or know why?
--
http://mail.python.org/mailman/listinfo/python-list
> Variant of Paul's example:
>
> a = ((1,2), (3, 4), (5, 6), (7, 8), (9, 10))
> zip(*a)
>
> or
>
> [list(t) for t in zip(*a)] if you need lists instead of tuples.
[Peter Hansen]
> (I believe this is something Guido considers an "abuse of *args", but I
> just consider it an elegant use of zip() co
http://cheetahtemplate.org/
Admin wrote:
> On Sun, 17 Jul 2005 19:15:49 -0300, Sybren Stuvel
> <[EMAIL PROTECTED]> wrote:
>
>> http://www.unrealtower.org/mycheetah
>
> "Error 404 while looking up your page AND when looking for a suitable 404
> page. Sorry!
> No such file /var/www/www.unrealt
[Richard]
> I know I can use a 'for' loop and create two new lists
> using 'newList1.append(x)', etc. Is there an efficient way
> to create these two new lists without using a slow for loop?
If trying to optimize before writing and timing code, then at least
validate your assumptions. In Python,
Thanks for the replies, I'll post here when/if I get it finally
working.
So, now I know how to extract the links for the big page, and extract
the text from the individual page. Really what I need to find out is
how run the script on each individual page automatically, and get the
output in comm
I believe the type "list" is implemented as an array of pointers.
Thus, random access is an O(1) operation while insertion/deletion is an
O(n) operation. That said, I have the following questions:
1. Am I correct in saying the above?
2. Implementing list as an array is part of language specifica
I believe the type "list" is implemented as an array of pointers.
Thus, random access is an O(1) operation while insertion/deletion is an
O(n) operation. That said, I have the following questions:
1. Am I correct in saying the above?
2. Implementing list as an array is part of language specifica
"sj" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>I believe the type "list" is implemented as an array of pointers.
A Python list is sematically/behaviorally defined as a mutable extensible
sequence of references to Python objects. For the CPython reference
implementation, the
On 15/07/05, Terry Hancock <[EMAIL PROTECTED]> wrote:
> On Thursday 14 July 2005 07:00 am, Michael Hoffman wrote:
> > Devan L wrote:
> > > Use raw_input instead. It returns a string of whatever was typed. Input
> > > expects a valid python expression.
> >
> > Who actually uses this? It's equivalent
Diez B.Roggisch wrote:
> Kay Schluehr gmx.net> writes:
>
> > Now lets drop the assumption that a and b commute. More general: let be
> > M a set of expressions and X a subset of M where each element of X
> > commutes with each element of M: how can a product with factors in M be
> > evaluated/simp
I use input() all the time. I know many people say it ain't safe, but
whose going to use it to crash their own comp? Only an insane person would,
or a criminal trying to cover his/her tracks.
Sorry if I waded into the debate, but this debate originated from one of
my posts.
Nathan Pinno
Ron Adam wrote:
> Kay Schluehr wrote:
> > Here might be an interesting puzzle for people who like sorting
> > algorithms ( and no I'm not a student anymore and the problem is not a
> > students 'homework' but a particular question associated with a
> > computer algebra system in Python I'm curren
[sj]
> I believe the type "list" is implemented as an array of pointers.
Yes.
> Thus, random access is an O(1) operation while insertion/deletion is an
> O(n) operation.
Yes.
> 2. Implementing list as an array is part of language specification or
> implementation-dependent?
Implementation de
Raymond Hettinger wrote:
>>Variant of Paul's example:
>>
>>a = ((1,2), (3, 4), (5, 6), (7, 8), (9, 10))
>>zip(*a)
>>
>>or
>>
>>[list(t) for t in zip(*a)] if you need lists instead of tuples.
>
>
>
> [Peter Hansen]
>
>>(I believe this is something Guido considers an "abuse of *args", but I
>>jus
51 matches
Mail list logo