Re: Python to use a non open source bug tracker?

2006-10-04 Thread Giovanni Bajo
Martin v. Löwis wrote: > It's significantly different from the Bitkeeper fiasco in two > important > ways: > 1. Bitkeeper is a source revisioning system, so it is similar to CVS >and Subversion. This project here is "just" the bug tracker, which >is of lesser importance. If we move to a d

Re: Best way to handle large lists?

2006-10-04 Thread durumdara
Hi ! > Thanks Jeremy. I am in the process of converting my stuff to use sets! I > wouldn't have thought it would have made that big a deal! I guess it is > live and learn. > If you have simplified records with big amount of data, you can trying dbhash. With this you don't get out from memory...

Re: What value should be passed to make a function use the default argument value?

2006-10-04 Thread Antoon Pardon
On 2006-10-03, LaundroMat <[EMAIL PROTECTED]> wrote: > Suppose I have this function: > > def f(var=1): > return var*2 > > What value do I have to pass to f() if I want it to evaluate var to 1? > I know that f() will return 2, but what if I absolutely want to pass a > value to f()? "None" doesn't se

Re: What kind of program is this

2006-10-04 Thread Fredrik Lundh
John Smith wrote: > what kind of program is this? http://en.wikipedia.org/wiki/JAPH -- http://mail.python.org/mailman/listinfo/python-list

Re: Roundup Issue Tracker release 1.1.3

2006-10-04 Thread Richard Jones
[EMAIL PROTECTED] wrote: > Richard Jones wrote: >> I'm proud to release version 1.1.3 of Roundup. >> five database back-ends (anydbm, sqlite, metakit, >> mysql and postgresql). > > That ORM is pretty impressive: > http://roundup.sourceforge.net/doc-1.0/design.html#roundup-database > [snip] > Is it

Re: What value should be passed to make a function use the default argument value?

2006-10-04 Thread LaundroMat
Rob De Almeida wrote: > LaundroMat wrote: > > Suppose I have this function: > > > > def f(var=1): > > return var*2 > > > > What value do I have to pass to f() if I want it to evaluate var to 1? > > I know that f() will return 2, but what if I absolutely want to pass a > > value to f()? "None" doe

hex sending

2006-10-04 Thread hiroc
s.send("abc") # send test string I need to send hex:"10 06 00 0f 02 bc d1" instead of "abc" hoW? -- http://mail.python.org/mailman/listinfo/python-list

Re: Need help with syntax on inheritance.

2006-10-04 Thread Peter Otten
SpreadTooThin wrote: > If you are deriving a new class from another class, > that you must (I assume) know the initializer of the other class. > > So in myClass > > import array > class myClass(arrary.array): >def __init__(self, now here I need to put array's constructor > parameters..., the

Re: was python implemented as a object oriented langage at the beginning ?

2006-10-04 Thread Bruno Desthuilliers
has wrote: > Python's type/class > distinction Which "type/class" distinction ? -- bruno desthuilliers python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in '[EMAIL PROTECTED]'.split('@')])" -- http://mail.python.org/mailman/listinfo/python-list

Re: hex sending

2006-10-04 Thread Fredrik Lundh
"hiroc" wrote: > s.send("abc") # send test string > > I need to send hex:"10 06 00 0f 02 bc d1" instead of "abc" do you want to send seven binary bytes, or pairs of hexadecimal characters separated by whitespace ? how do you map from "abc" to "10 06 00 0f 02 bc d1", by the way? what encoding is

Re: hex sending

2006-10-04 Thread hiroc
I want send pairs of hexadecimal characters, abc is only my test hex char is real Fredrik Lundh wrote: > "hiroc" wrote: > > > s.send("abc") # send test string > > > > I need to send hex:"10 06 00 0f 02 bc d1" instead of "abc" > > do you want to send seven binary bytes, or pairs of hexadecimal

Re: can't open chm files all of a sudden

2006-10-04 Thread John Machin
John Salerno wrote: > John Salerno wrote: > > Hi all. I apologize since this is only remotely Python related, but I > > hope someone might now the solution. > > > > I tried opening my Python chm docs just now, as well as the one for > > wxPython, and both are giving me an error dialog when I double

Python/Tkinter crash.

2006-10-04 Thread Hendrik van Rooyen
Hi, I get the following: [EMAIL PROTECTED]:~/Controller/lib> python display.py UpdateStringProc should not be invoked for type font Aborted and I am back at the bash prompt - this is most frustrating, as there is no friendly traceback to help me guess where its coming from. And what is worse, t

Re: Best way to handle large lists?

2006-10-04 Thread GHUM
> > Maybe the application should use sets instead of lists for these > > collections. > What would sets do for me over lists? searching for an element in a list is O(n) searching for an element in a set is O(1) (for reasonable distributed elements) Harald -- http://mail.python.org/mailman/lis

Re: Best way to handle large lists?

2006-10-04 Thread Hari Sekhon
So are you saying that using a dict means a faster search since you only need to look up one value? I would think that you would have to look through the keys and stop at the first key that matches since each key has to be uniq, so perhaps if it is nearer the front of the set of keys then perh

Re: tkinter to mpeg

2006-10-04 Thread Alexander Schliep
[EMAIL PROTECTED] (Cameron Laird) writes: > In article <[EMAIL PROTECTED]>, > Thomas Jollans <[EMAIL PROTECTED]> wrote: >>On Mon, 02 Oct 2006 09:18:13 -0700, "dug" <[EMAIL PROTECTED]> let this >>slip: >>> I have a small program that moves some shapes around a tkinter canvas. >>> Is there any way

Re: hex sending

2006-10-04 Thread Stoune
hiroc wrote: > I want send pairs of hexadecimal characters, abc is only my test hex > char is real > Possibly this code helps to you: import binascii binascii.hexlify('hello worlds') Output: '68656c6c6f20776f726c6473' -- http://mail.python.org/mailman/listinfo/python-list

Re: python html rendering

2006-10-04 Thread GHUM
Pierre, > Hi, Im looking for a way to display some python code > in html: with correct indentation, possibly syntax hiliting, dealing > correctly with multi-line comment, the usual way is to create your own web-framework If it is just "some" Python code and you have to do it "once", just look

Re: What value should be passed to make a function use the default argument value?

2006-10-04 Thread Paul Rubin
"LaundroMat" <[EMAIL PROTECTED]> writes: > def f(var=1): > return var*2 > > What value do I have to pass to f() if I want it to evaluate var to 1? > I know that f() will return 2, but what if I absolutely want to pass a > value to f()? "None" doesn't seem to work.. I don't understand your questio

Re: Best way to handle large lists?

2006-10-04 Thread Fredrik Lundh
Hari Sekhon wrote: > So are you saying that using a dict means a faster search since you only > need to look up one value? > > I would think that you would have to look through the keys and stop at > the first key that matches since each key has to be uniq, so perhaps if > it is nearer the front o

Equal to Anything

2006-10-04 Thread Simon Brunning
For the purposes of a little test utility that we use, I need an object that evaluates as equal to anything. (I realise that this is a bad idea in some ways, breaking the equals/hashcode invariant and so forth, but I'm hoping that I can get away with it in this case.) It seems a simple enough task

Re: switching to numpy and failing, a user story

2006-10-04 Thread sturlamolden
Travis E. Oliphant wrote: > Definitely not true. People in Singapore, Japan, Ghana, South Africa, > France, Germany, New Zealand, Australia, and many other countries are > using NumPy successfully. Gratefully, a few have contributed by buying > the book, but a lot more have downloaded and are s

Re: What kind of program is this

2006-10-04 Thread Wildemar Wildenburger
Fredrik Lundh wrote: > John Smith wrote: >> what kind of program is this? > > http://en.wikipedia.org/wiki/JAPH You computer guys crack me up! :D wildemar -- http://mail.python.org/mailman/listinfo/python-list

Re: What kind of program is this

2006-10-04 Thread skip
Fredrik> http://en.wikipedia.org/wiki/JAPH That's an interesting JAPH written with only punctuation... Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Python to use a non open source bug tracker?

2006-10-04 Thread Nick Craig-Wood
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > And i dunno what the case against Trac is (it looks a fine tool for my > small projects) but probably it's not good enough for python.org Trac is really good in my experience. http://trac.edgewall.org/ Python.org has already moved to svn so trac

Re: Equal to Anything

2006-10-04 Thread Duncan Booth
"Simon Brunning" <[EMAIL PROTECTED]> wrote: > I'm fairly sure that I know what is going on here - the left hand side > object is getting first stab at the equality test, and understandably, > it's saying "Nah". But is there anything that I can do about it? > Not in general, no. If you could, and

Re: python html rendering

2006-10-04 Thread Gerard Flanagan
Fredrik Lundh wrote: > Pierre Imbaud wrote: > > > I rather thought of some module built on python parser, generating html > > or xml, ideally customizable. > > see "colorizer.py" and "element_colorizer.py" in this directory: > > http://svn.effbot.python-hosting.com/stuff/sandbox/pythondoc >

Getting Pygopherd to work under Mac OS X

2006-10-04 Thread mattabat
Hello, Could someone *please* show us poor Mac users how to install and run Pygopherd successfully under Mac OS X? The latest version 2.0.4, as found at http://freshmeat.net/projects/pygopherd/ is my bane. I think I talked to John Goerzen, the maintainer, a while back but nothing came of it. I've t

Re: python html rendering

2006-10-04 Thread Duncan Booth
"GHUM" <[EMAIL PROTECTED]> wrote: >> Hi, Im looking for a way to display some python code >> in html: with correct indentation, possibly syntax hiliting, dealing >> correctly with multi-line comment, > > > the usual way is to create your own web-framework > Or you could use an existing web frame

Re: Manipulate PDFs

2006-10-04 Thread Paul Boddie
Cameron Laird wrote: > > http://www.easysw.com/htmldoc/ >. While we STRONGLY emphasize > free software in our installations, HTMLDOC has worked out great > for us. Easy Software has consistently provided good service. Well, HTMLDOC does appear to be available under the GPL, too: http://www.html

string: __iter__()?

2006-10-04 Thread mrquantum
Hello! Just for curiosity i'd like to know why strings don't support the iteration protocoll!? Is there some deeper reason for this? >>> hasattr('SomeString', '__iter__') False In Python 2.5 it's actually simple to obtain one: >>> myIter = (c for c in 'SomeString') >>> myIter.next() 'S' Thanks

Re: string: __iter__()?

2006-10-04 Thread Fredrik Lundh
mrquantum wrote: > Just for curiosity i'd like to know why strings don't support the > iteration protocoll!? really? iter("SomeString") works just fine for me. -- http://mail.python.org/mailman/listinfo/python-list

Re: py2app console

2006-10-04 Thread James Stroud
Dave Opstad wrote: > In article <[EMAIL PROTECTED]>, > James Stroud <[EMAIL PROTECTED]> wrote: > >> Does anyone know of the most straightforward way to get rid of the >> intensely annoying "console" window that py2app feels so compelled to >> create? > > I include this code in my apps: > >

Re: python html rendering

2006-10-04 Thread Paul Boddie
Pierre Imbaud wrote: > Hi, Im looking for a way to display some python code > in html: with correct indentation, possibly syntax hiliting, dealing > correctly with multi-line comment, and... generating valid html code if > the python code itself deals with html (hence manipulates tag litterals. > T

Re: string: __iter__()?

2006-10-04 Thread Paul Rubin
"mrquantum" <[EMAIL PROTECTED]> writes: > Just for curiosity i'd like to know why strings don't support the > iteration protocoll!? Is there some deeper reason for this? > > >>> hasattr('SomeString', '__iter__') > False It is a little but odd. But at least in 2.3.4: Python 2.3.4 (#1, Feb 2

Re: string: __iter__()?

2006-10-04 Thread mrquantum
Am Wed, 04 Oct 2006 12:03:41 +0200 schrieb Fredrik Lundh: > > really? iter("SomeString") works just fine for me. > Hmm, right! But then why doesn't dir('SomeString') show an __iter__ method? Seems to be implmented differently than with e.g. lists? Know why? -- http://mail.python.org/mailman/

Re: What value should be passed to make a function use the default argument value?

2006-10-04 Thread LaundroMat
Antoon Pardon wrote: > The problem is like the following. > > def f(var=1): > return var*2 > > def g(): > arg = None > try: > arg = Try_Processing() / 3 + 1 > except Nothing_To_Process: > pass > if arg is None: > return f() > else: > return f(arg) > > Now in this case y

Improving telnetlib

2006-10-04 Thread Matthew Warren
Hi, I use telnetlib in an app I am writing, and would like to add functionality to it to support interactive terminal sessions , IE: be able to 'vi' a file. Currently it seems telnetlib isnt quite sophisticated enoguh to support such a thing. The trouble is, I havent got a clue where to start

Re: Python to use a non open source bug tracker?

2006-10-04 Thread Richard Jones
Nick Craig-Wood wrote: > [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> And i dunno what the case against Trac is (it looks a fine tool for my >> small projects) but probably it's not good enough for python.org > > Trac is really good in my experience. Trac was considered. > A nice extra is

Re: What value should be passed to make a function use the default argument value?

2006-10-04 Thread Paul Rubin
Antoon Pardon <[EMAIL PROTECTED]> writes: > Now in this case you could start by assigning arg the value 1 and > eliminate the if test. However that only works if you know the > default value for the argument. What he seems to be asking for > is if there is an object, (let as call it Default), that

Re: string: __iter__()?

2006-10-04 Thread Peter Otten
mrquantum wrote: > Am Wed, 04 Oct 2006 12:03:41 +0200 schrieb Fredrik Lundh: >> really? iter("SomeString") works just fine for me. > But then why doesn't dir('SomeString') show an __iter__ method? Seems to > be implmented differently than with e.g. lists? The older pre-__iter__() iteration st

Re: What value should be passed to make a function use the default argument value?

2006-10-04 Thread Antoon Pardon
On 2006-10-04, Paul Rubin wrote: > "LaundroMat" <[EMAIL PROTECTED]> writes: >> def f(var=1): >> return var*2 >> >> What value do I have to pass to f() if I want it to evaluate var to 1? >> I know that f() will return 2, but what if I absolutely want to pass a >> value to f()? "None" doesn't seem

Re: What value should be passed to make a function use the default argument value?

2006-10-04 Thread Nick Craig-Wood
LaundroMat <[EMAIL PROTECTED]> wrote: > I have in fact a bunch of functions that all pass similar information > to one main function. That function takes (amongst others) a template > variable. If it's not being passed, it is set to a default value by the > function called upon. > > For the m

Re: What value should be passed to make a function use the default argument value?

2006-10-04 Thread Nick Craig-Wood
Antoon Pardon <[EMAIL PROTECTED]> wrote: > One possible way to do what I think you want is to code as follows: > > class Default (object): >pass I'd have written Default = object() > def f(var=Default): >if var is Default: > var = 1 >return var * 2 > But yes, defining a se

Re: string: __iter__()?

2006-10-04 Thread mrquantum
Am Wed, 04 Oct 2006 11:59:07 +0200 schrieb mrquantum: > Hello! > > Just for curiosity i'd like to know why strings don't support the > iteration protocoll!? Is there some deeper reason for this? > Sorry, was to hasty by saying "... don't support the iteration protocol'! Sure they do, as the ite

Re: What value should be passed to make a function use the default argument value?

2006-10-04 Thread Antoon Pardon
On 2006-10-04, Paul Rubin wrote: > Antoon Pardon <[EMAIL PROTECTED]> writes: >> Now in this case you could start by assigning arg the value 1 and >> eliminate the if test. However that only works if you know the >> default value for the argument. What he seems to be asking for >> is if there is an

Re: What value should be passed to make a function use the default argument value?

2006-10-04 Thread Antoon Pardon
On 2006-10-04, Nick Craig-Wood <[EMAIL PROTECTED]> wrote: > Antoon Pardon <[EMAIL PROTECTED]> wrote: >> One possible way to do what I think you want is to code as follows: >> >> class Default (object): >>pass > > I'd have written > > Default = object() > >> def f(var=Default): >>if var

Re: [IronPython] [ANN] IronPython Community Edition 1.0r2

2006-10-04 Thread Miguel de Icaza
Hello, > And here's the license and the summary of applied patches: > http://fepy.sourceforge.net/license.html > http://fepy.sourceforge.net/patches.html Do the patches include the various extensions that are being shipped? Am wondering if you could distribute a IPCE that contains all the docume

py2app semi-standalone semi-works

2006-10-04 Thread James Stroud
Hello All, I am trying to create a semi-standalone with the vendor python on OS X 10.4 (python 2.3.5). I tried to include some packages with both --packages from the command and the 'packages' option in setup.py. While the packages were nicely included in the application bundle in both cases (

Python crash when trying to generate an Excel worksheet with VBA macros

2006-10-04 Thread dan_roman
Hi, I developed a script with a nice interface in Tkinter that allows me to edit some formulas and to generate an Excel worksheet with VBA macros within it. The script runs perfectlly in Office 2000, but in Office 2003 crash at line: "wbc = workbook.VBProject.VBComponents.Add(1)" Please help me :-(

Re: What value should be passed to make a function use the default argument value?

2006-10-04 Thread Georg Brandl
Antoon Pardon wrote: > On 2006-10-04, Paul Rubin wrote: >> Antoon Pardon <[EMAIL PROTECTED]> writes: >>> Now in this case you could start by assigning arg the value 1 and >>> eliminate the if test. However that only works if you know the >>> default value for the argument. What he seems to be aski

Re: string: __iter__()?

2006-10-04 Thread mrquantum
Am Wed, 04 Oct 2006 12:24:48 +0200 schrieb Peter Otten: > > The older pre-__iter__() iteration style relying on __getitem__() still > works: > class A: > ... def __getitem__(self, index): > ... return [3,2,1][index] > ... for item in A(): > ... print item > ... > 3

Re: What value should be passed to make a function use the defaultargument value?

2006-10-04 Thread Fredrik Lundh
Georg Brandl wrote: >> But that can only work if you are the author of f. Take the >> following code: >> >> def myrepeat(obj, times = xxx): >> return itertools.repeat(obj, times) >> >> What value do I have to substitue for xxx, so that myrepeat >> will have the exact same function as itertoo

Re: What value should be passed to make a function use the default argument value?

2006-10-04 Thread Antoon Pardon
On 2006-10-04, Georg Brandl <[EMAIL PROTECTED]> wrote: > Antoon Pardon wrote: >> On 2006-10-04, Paul Rubin wrote: >>> Antoon Pardon <[EMAIL PROTECTED]> writes: Now in this case you could start by assigning arg the value 1 and eliminate the if test. However that only works if you know the

Re: Resuming a program's execution after correcting error

2006-10-04 Thread Sheldon
MRAB wrote: > Sheldon wrote: > > MRAB wrote: > > > Sheldon wrote: > > > > Hi. > > > > > > > > Does anyone know if one can resume a python script at the error point > > > > after the error is corrected? > > > > I have a large program that take forever if I have to restart from > > > > scratch every

Re: What value should be passed to make a function use the defaultargument value?

2006-10-04 Thread Antoon Pardon
On 2006-10-04, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Georg Brandl wrote: > >>> But that can only work if you are the author of f. Take the >>> following code: >>> >>> def myrepeat(obj, times = xxx): >>> return itertools.repeat(obj, times) >>> >>> What value do I have to substitue for xxx

Re: Python/Tkinter crash.

2006-10-04 Thread James Stroud
Hendrik van Rooyen wrote: > Hi, > > I get the following: > > [EMAIL PROTECTED]:~/Controller/lib> python display.py > UpdateStringProc should not be invoked for type font > Aborted > > and I am back at the bash prompt - this is most frustrating, as there is no > friendly traceback to help me gues

Re: What value should be passed to make a function use the default argument value?

2006-10-04 Thread Paul Rubin
Antoon Pardon <[EMAIL PROTECTED]> writes: > repeat(object[, times]) > Make an iterator that returns object over and over again. Runs > indefinitely unless the times argument is specified. ... > > My first impression from this, is that it is possible to call > this as follows: > repeat(No

Re: What value should be passed to make a function use the defaultargument value?

2006-10-04 Thread Paul Rubin
Antoon Pardon <[EMAIL PROTECTED]> writes: > I think it would become something like: > > def myrepeat(*args): > obj = args[0] > tail = args[1:] > newobj = Process(obj) > newargs = (newobj,) + tail > return itertools.repeat(*newargs) Too messy. Just write: def myrepeat(obj

Re: Python to use a non open source bug tracker?

2006-10-04 Thread Ramon Diaz-Uriarte
On 10/4/06, Richard Jones <[EMAIL PROTECTED]> wrote: > Nick Craig-Wood wrote: > > [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >> And i dunno what the case against Trac is (it looks a fine tool for my > >> small projects) but probably it's not good enough for python.org > > > > Trac is really g

replacing all 'rng's in a buffer with consecutive r[1], r[2]'s

2006-10-04 Thread m g william
I read a file into a buffer and subject it to re.sub() I can replace every occurrence of a pattern with a fixed string but when I try to replace each occurrence with a string that changes (by having an incrementing number in it, (ie 'repTxt[1]','repTxt[2]'etc), I note that the incrementing number g

Re: What value should be passed to make a function use the default argument value?

2006-10-04 Thread Antoon Pardon
On 2006-10-03, LaundroMat <[EMAIL PROTECTED]> wrote: > Suppose I have this function: > > def f(var=1): > return var*2 > > What value do I have to pass to f() if I want it to evaluate var to 1? > I know that f() will return 2, but what if I absolutely want to pass a > value to f()? "None" doesn't se

Tk: filling a frame with a widget

2006-10-04 Thread Paolo Pantaleo
I have this code from Tkinter import * root=Tk() Button(root).pack(fill=BOTH) root.mainloop() I would expect the button filling all the client draw area of the Frame, but when I resize the root window the button becomes wider, but not higher ( I get some empty space under the button). How could

SOAPpy

2006-10-04 Thread Jonathan Morgan
Hi, I'm just started playing around with Python to trigger a method in a web service. I've been using SOAPpy and it's incredibly badly documented so i'm not getting very far. What I need to do is create the following in my SOAP body: http://www.csapi.org/schema/etc...";>

Re: Python to use a non open source bug tracker?

2006-10-04 Thread Steve Holden
Giovanni Bajo wrote: > A.M. Kuchling wrote: > > >>>... using a non open source tracker (called JIRA - never heard >>>before of course) for Python itself. >> >>Other projects do use it; see >> for a partial list, and a >>link to the Apache Software Founda

Re: Python to use a non open source bug tracker?

2006-10-04 Thread Paul Boddie
Richard Jones wrote: > Nick Craig-Wood wrote: > > > > Trac is really good in my experience. > > Trac was considered. > > > A nice extra is that it is written in python. > > So are Roundup and Launchpad, two of the other three trackers considered. It should be noted that most skepticism (that I'm a

Re: Roundup Issue Tracker release 1.1.3

2006-10-04 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Richard Jones wrote: > >>I'm proud to release version 1.1.3 of Roundup. >>five database back-ends (anydbm, sqlite, metakit, >>mysql and postgresql). > > > That ORM is pretty impressive: > http://roundup.sourceforge.net/doc-1.0/design.html#roundup-database > > I like h

Where to I find files: gtk.py _gtk.py and GDK.py

2006-10-04 Thread vedran_dekovic
Hello, Can you tell me where to I find exactly this files:gtk.py, _gtk.py and GDK.py I was look everywhere,and download package of gtk but I can't find this files THANKS -- http://mail.python.org/mailman/listinfo/python-list

Re: Python/Tkinter crash.

2006-10-04 Thread Hendrik van Rooyen
Not talking to myself - Added results of strace run at bottom "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: > Hi, > > I get the following: > > [EMAIL PROTECTED]:~/Controller/lib> python display.py > UpdateStringProc should not be invoked for type font > Aborted > > and I am back at the bash

Re: Python to use a non open source bug tracker?

2006-10-04 Thread Fredrik Lundh
Steve Holden wrote: > But sadly people are much happier complaining on c.l.py than exerting > themselves to support the community with an open source issue tracker. you're not on the infrastructure list, I hear. python.org could still need a few more roundup volunteers, but it's not like nobody'

Re: What value should be passed to make a function use the default argument value?

2006-10-04 Thread Antoon Pardon
On 2006-10-04, Antoon Pardon <[EMAIL PROTECTED]> wrote: > On 2006-10-03, LaundroMat <[EMAIL PROTECTED]> wrote: >> Suppose I have this function: >> >> def f(var=1): >> return var*2 >> >> What value do I have to pass to f() if I want it to evaluate var to 1? >> I know that f() will return 2, but what

Re: Where to I find files: gtk.py _gtk.py and GDK.py

2006-10-04 Thread John Machin
[EMAIL PROTECTED] wrote: > Hello, > Can you tell me where to I find exactly this files:gtk.py, _gtk.py and > GDK.py > I was look everywhere,and download package of gtk but I can't find this > files > I would like to know what your definition of "everywhere" is. Google("python gtk") gives this as

Re: filling a frame with a widget

2006-10-04 Thread Fredrik Lundh
Paolo Pantaleo wrote: >I have this code > > from Tkinter import * > > root=Tk() > Button(root).pack(fill=BOTH) > root.mainloop() > > I would expect the button filling all the client draw area of the > Frame, but when I resize the root window the button becomes wider, but > not higher ( I get some

Re: string: __iter__()?

2006-10-04 Thread Michele Simionato
mrquantum wrote: > Hello! > > Just for curiosity i'd like to know why strings don't support the > iteration protocoll!? Is there some deeper reason for this? > > >>> hasattr('SomeString', '__iter__') > False > > In Python 2.5 it's actually simple to obtain one: > > >>> myIter = (c for c in 'SomeStr

Re: replacing all 'rng's in a buffer with consecutive r[1], r[2]'s

2006-10-04 Thread Peter Otten
m g william wrote: > I read a file into a buffer and subject it to re.sub() > I can replace every occurrence of a pattern with a fixed string but when > I try to replace each occurrence with a string that changes (by having > an incrementing number in it, (ie 'repTxt[1]','repTxt[2]'etc), I note >

Re: Getting Pygopherd to work under Mac OS X

2006-10-04 Thread Cameron Kaiser
[EMAIL PROTECTED] writes: >Could someone *please* show us poor Mac users how to install and run >Pygopherd successfully under Mac OS X? The latest version 2.0.4, as >found at http://freshmeat.net/projects/pygopherd/ is my bane. I think I >talked to John Goerzen, the maintainer, a while back but no

Re: Python to use a non open source bug tracker?

2006-10-04 Thread A.M. Kuchling
On Wed, 04 Oct 2006 07:37:47 GMT, Giovanni Bajo <[EMAIL PROTECTED]> wrote: > I am seriously concerned > that the PSF infrastructure committee EVER considered non open-source > applications for this. In fact, I thought that was an implicit requirement in > the selection. Being open source

Re: Instantiating an object when the type is only known at runtime

2006-10-04 Thread Carsten Haese
On Tue, 2006-10-03 at 18:19, Samuel wrote: > Thanks, that's what I was looking for. > > > >>> m = __import__( "StringIO" ) > > >>> x = getattr( m, "StringIO" )() > > >>> x > > > > >>> > > For the records: If the module is already loaded, this also works: > > if my_type_is_not_yet_loaded: >

Re: replacing all 'rng's in a buffer with consecutive r[1], r[2]'s

2006-10-04 Thread Paul McGuire
"m g william" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > #now replace all 'rng's with consecutive streams > #=== > def static_num(): >''' this is a generator function that avoids globals > yield differentiates fn as generator fn w

Re: Python to use a non open source bug tracker?

2006-10-04 Thread Giovanni Bajo
A.M. Kuchling wrote: >> I am seriously concerned >> that the PSF infrastructure committee EVER considered non open-source >> applications for this. In fact, I thought that was an implicit >> requirement in the selection. > > Being open source wasn't a requirement; which is, indeed, shocking and a

dictionary of list from a file

2006-10-04 Thread andrea . spitaleri
Hi guys, this is my first post. my "programming" background is perlish scripting and now I am learning python. I need to create a dictionary of list from a file. Normally in perl I use to do like: while(){ @info=split(/ +/,$_); push (@{$tmp{$info[0]}},$info[1]); } and then for

Re: dictionary of list from a file

2006-10-04 Thread limodou
On 4 Oct 2006 06:09:21 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi guys, > this is my first post. my "programming" background is perlish scripting > and now I am learning python. I need to create a dictionary of list > from a file. Normally in perl I use to do like: > > while(){ >

Re: Python to use a non open source bug tracker?

2006-10-04 Thread Paul Boddie
Giovanni Bajo wrote: > > In fact, are you absolutely positive that you need so much effort to > maintain an existing bugtracker installation? I wonder what kinds of insights were sought from other open source projects. It's not as if there aren't any big open source projects having approachable co

Re: Python to use a non open source bug tracker?

2006-10-04 Thread Steve Holden
Fredrik Lundh wrote: > Steve Holden wrote: > > >>But sadly people are much happier complaining on c.l.py than exerting >>themselves to support the community with an open source issue tracker. > > > you're not on the infrastructure list, I hear. python.org could still need a > few more roundup

Re: dictionary of list from a file

2006-10-04 Thread keirr
[EMAIL PROTECTED] wrote: > in python I tried: > b={} > a=[] > for line in fl.readlines(): > info=lines.split() > b[info[0]] = a.append(info[1]) > > and then > for i in b: > print i,b[i] > i get > 2 None > 7 None > > data file is: > 2 1 > 2 2 > 2 3 > 2 4 > 7 7 > 7 8 > 7 9 > 7

Access to static members from inside a method decorator?

2006-10-04 Thread glen . coates . bigworld
I'm developing a library at the moment that involves many classes, some of which have "exposed" capabilities. I'm trying to design a nice interface for both exposing those capabilities, and inspecting instances to find out what capabilities they have. At the moment, I'm leaning towards a supercla

Re: dictionary of list from a file

2006-10-04 Thread Thomas Jollans
On Wed, 04 Oct 2006 06:09:21 -0700, [EMAIL PROTECTED] let this slip: > b={} > a=[] > for line in fl.readlines(): > info=lines.split() > b[info[0]] = a.append(info[1]) append does not return a value. you'll want something like d = {} for line in fl: key, value = line.strip

sax barfs on unicode filenames

2006-10-04 Thread Edward K. Ream
Hi. Presumably this is a easy question, but anyone who understands the sax docs thinks completely differently than I do :-) Following the usual cookbook examples, my app parses an open file as follows:: parser = xml.sax.make_parser() parser.setFeature(xml.sax.handler.feature_external_ges,

Re: Where to I find files: gtk.py _gtk.py and GDK.py

2006-10-04 Thread Thomas Jollans
On Wed, 04 Oct 2006 05:17:48 -0700, [EMAIL PROTECTED] let this slip: > Hello, > Can you tell me where to I find exactly this files:gtk.py, _gtk.py and > GDK.py > I was look everywhere,and download package of gtk but I can't find this > files on my system, the gtk module is at /usr/lib/python2.4/s

How to ask sax for the file encoding

2006-10-04 Thread Edward K. Ream
Following the usual cookbook examples, my app parses an open file as follows:: parser = xml.sax.make_parser() parser.setFeature(xml.sax.handler.feature_external_ges,1) # Hopefully the content handler can figure out the encoding from the element. handler = saxContentHandler(c,inputFileName,

Re: Python to use a non open source bug tracker?

2006-10-04 Thread Valentino Volonghi aka Dialtone
Terry Reedy <[EMAIL PROTECTED]> wrote: > As I understood B.C.'s announcement, that was one of the judging criteria, > and the plan is for PSF to get a daily backup dump of the data. This had nothing to do with the choice of not using Trac or Launchpad. Quoting Brett Cannon from the original mail

Re: Python to use a non open source bug tracker?

2006-10-04 Thread Paul Rubin
Steve Holden <[EMAIL PROTECTED]> writes: > Sniping from the sidelines is far easier than hard work towards a goal. Right now there is not even agreement on what the goal is. The surprise people are expressing is because they thought one of the goals of a big open source project would be to avoid

RE: Raw strings and escaping

2006-10-04 Thread Matthew Warren
> -Original Message- > From: > [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > rg] On Behalf Of Scott David Daniels > Sent: 03 October 2006 18:11 > To: python-list@python.org > Subject: Re: Raw strings and escaping > > Matthew Warren wrote: > > Hi, > > > > I would expect this to work

Re: How to ask sax for the file encoding

2006-10-04 Thread Fredrik Lundh
Edward K. Ream wrote: > Can anyone tell me how the content handler can determine the encoding of the > file? Can sax > provide this info? there is no encoding on the "inside" of an XML document; it's all Unicode. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python to use a non open source bug tracker? - Trac?

2006-10-04 Thread Harry George
"Fredrik Lundh" <[EMAIL PROTECTED]> writes: > Steve Holden wrote: > > > But sadly people are much happier complaining on c.l.py than exerting > > themselves to support the community with an open source issue tracker. > > you're not on the infrastructure list, I hear. python.org could still need

Re: dictionary of list from a file

2006-10-04 Thread Giovanni Bajo
[EMAIL PROTECTED] wrote: > while(){ > @info=split(/ +/,$_); > push (@{$tmp{$info[0]}},$info[1]); > } > > and then > foreach $key (keys %tmp){ >print "$key -> @{$tmp{$key}}\n"; > } Python 2.5 introduced a dictionary type with automatic creation of values, ala Perl:

Re: Python to use a non open source bug tracker?

2006-10-04 Thread Steve Holden
Paul Boddie wrote: > Giovanni Bajo wrote: > >>In fact, are you absolutely positive that you need so much effort to >>maintain an existing bugtracker installation? > > > I wonder what kinds of insights were sought from other open source > projects. It's not as if there aren't any big open source

Re: sax barfs on unicode filenames

2006-10-04 Thread Diez B. Roggisch
Edward K. Ream wrote: > Hi. Presumably this is a easy question, but anyone who understands the > sax docs thinks completely differently than I do :-) > > > > Following the usual cookbook examples, my app parses an open file as > follows:: > > > > parser = xml.sax.make_parser() > > parser.s

Re: Python to use a non open source bug tracker?

2006-10-04 Thread Steve Holden
Valentino Volonghi aka Dialtone wrote: > Terry Reedy <[EMAIL PROTECTED]> wrote: > > >>As I understood B.C.'s announcement, that was one of the judging criteria, >>and the plan is for PSF to get a daily backup dump of the data. > > > This had nothing to do with the choice of not using Trac or La

Re: How can I correct an error in an old post?

2006-10-04 Thread Jorgen Grahn
On Mon, 02 Oct 2006 16:36:24 +0100, Steve Holden <[EMAIL PROTECTED]> wrote: > Jorgen Grahn wrote: >> On 1 Oct 2006 10:18:59 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> >> >>>and I wish to add my findings to the post, to prevent others from >>>taking the wrong path. ... >> In Usenet

<    1   2   3   4   >