On Sunday 08 May 2005 13:41, [EMAIL PROTECTED] wrote:
> As you can see you can interact with kwrite from dcop.
> Unfortunately I don't have this module in my Python (2.3) nor I have
> been able to find it.
It's normally installed seperately from the main kde libraries - on gentoo
it's a package c
On Friday 29 April 2005 11:53, Ville Vainio wrote:
> > "Kent" == Kent Johnson <[EMAIL PROTECTED]> writes:
>
> Kent> if frequency.has_key(word):
> Kent> frequency[word] += 1
> Kent> else:
> Kent> frequency[word] = 1
>
> This is a good place to use 'get' method of dict:
>
> freque
On Tuesday 26 April 2005 00:34, raoul wrote:
> I can't figure this one out. Trying to be unnecessarily functional I
> suspect.
With list comprehensions:
Python 2.3.4 (#1, Mar 26 2005, 20:54:10)
[GCC 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)] on linux2
Type "help", "copyright"
On Monday 25 April 2005 14:34, Ivan Van Laningham wrote:
> Hi All--
>
> "R. C. James Harlow" wrote:
> > or just:
> >
> > for a,b,c in (tup1, tup2, tup3):
> > print a
> > print b
> > print c
>
> And this works in Python v
On Monday 25 April 2005 04:20, James Stroud wrote:
> for a,b,c in zip(tup1, tup2, tup3):
>print a
>print b
>print c
or just:
for a,b,c in (tup1, tup2, tup3):
print a
print b
print c
pgpJ0RNTnCUA3.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/
On Monday 25 April 2005 01:24, Harlin Seritt wrote:
> dat = urllib.urlopen(url, 'r').read()
Drop the 'r' - urlopen is posting the 'r' to the server, instead of doing what
you mean, opening the file read-only.
pgpmZ2zcMs1bO.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listi
On Sunday 24 April 2005 03:20, Richard Blackwood wrote:
> To All:
>
> Folks, I need your help. I have a friend who claims that if I write:
>
> foo = 5
>
> then foo is NOT a variable, necessarily.
This is a really amusingly recursive discussion. Your friend has a piece of
knowledge, "what a
On Thursday 21 April 2005 17:42, Maxim Kasimov wrote:
> > Have you tried the triple quote comment technique?
> how do use this here:
Simple.
> sql = '''
> some long query
> '''
Change this to:
sql = """
some long query
"""
since you shouldn't be using multiple quoting styles in one module, an
On Saturday 16 April 2005 03:43, runes wrote:
> type countlines.py | python countlines.py = Success
> type countlines.py | countlines.py = Failure
>
> Why doesn't the latter work?
Don't quote me on this, but I think it's because invoking countlines.py
involves running some sort of wrapper that d
On Saturday 16 April 2005 03:11, runes wrote:
> I trying to figure out a way to make a python script accept data output
> from another process under Windows XP, but I fail miserably. I have a
> vague memory having read this is not possible with Python under
> Windows...
>
> C:\> type countlines.py
On Thursday 14 April 2005 10:27, [EMAIL PROTECTED] wrote:
> Supercomputer and encryption and compression @ rate of 96%
Dear Sir or Madam,
I have received notification that you posted a compression algorithm on
the newsgroup comp.lang.python on or about 10:27:26 on the 04/14/2005. I am
writ
On Thursday 14 April 2005 22:21, R. C. James Harlow wrote:
> You have to do that before Fredrick's script works...
Damn - 'Fredrik's' - I accidentally decompressed his name.
pgpbUXNRRyNvA.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
On Thursday 14 April 2005 22:18, Tiziano Bettio wrote:
> Actually your script doesn't work on my python distribution...
Works fine here - did you decompress the first bit of the python executable?
You have to do that before Fredrick's script works...
pgpYFHzjRTUoB.pgp
Description: PGP signatur
On Tuesday 12 April 2005 09:51, Antoon Pardon wrote:
> It seems I have to include the following in
> my code:
>
> "Copyright (c) 2001, 2002 Python Software Foundation;
>All Rights Reserved"
>
> Do I understand correctly?
You are of course allowed to *add* your own copyright statement:
"Copy
On Monday 11 April 2005 11:01, Pierre-Frédéric Caillaud wrote:
> psycopg ... has a dictfetchall() method which is worth its weight in
> donuts !
It's very simple to write one for MySQLdb:
def dictfetchall(cursor):
'''Takes a MySQLdb cursor and returns the rows as dictionaries.'''
col_nam
15 matches
Mail list logo