Re: Converstion

2006-04-28 Thread John Machin
On 28/04/2006 4:46 PM, Paddy wrote: > Something like (untested): > > out = [] > for ch in instring: > if ch==backspace: > if out: > out = out[:-1] > else: > out.append(ch) > outstring = ''.join(out) Instead of: if out: out = out[:-1] consider: del out[-1:] --

TypeError: 'module' object is not callable

2006-04-28 Thread Gary Wessle
dear python users I am not sure why I am getting Traceback (most recent call last): File "my.py", line 3, in ? urlparse('http://www.cwi.nl:80/%7Eguido/Python.html') TypeError: 'module' object is not callable **

Re: Direct acces to db unify on unix sco

2006-04-28 Thread rbsharp
hello, I am not sure whether I have understood you correctly, but if you mean unify as in www.unify.com then it is possible to directly link in the unify libraries statically into python. My experience was that the unify libraries do not like dynamic linking. The process of static linking involves

Re: How to align the text of a Listbox to the right

2006-04-28 Thread Eric Brunel
On 27 Apr 2006 07:00:36 -0700, Leonardo da Vinci <[EMAIL PROTECTED]> wrote: > I have to use a Listbox that shows a list of entries. Every entry is a > char string quite long in size and I cannot set "width" to a large > value due to limitations of screen resolution. The rightmost part is > more

Re: TypeError: 'module' object is not callable

2006-04-28 Thread John Machin
On 28/04/2006 5:05 PM, Gary Wessle wrote: > dear python users > > I am not sure why I am getting > > > Traceback (most recent call last): > File "my.py", line 3, in ? > urlparse('http://www.cwi.nl:80/%7Eguido/Python.html') > T

Re: Get all attributes of a com object

2006-04-28 Thread eicwo01
Thanks for your tips. But dir() and inspect did not really help. dir(): ['GetIDsOfNames', 'GetTypeInfo', 'GetTypeInfoCount', 'Invoke', 'InvokeTypes', 'QueryInterface', '_ApplyTypes_', '_FlagAsMethod', '_LazyAddAttr_', '_NewEnum', '_Release_', '__AttrToID__', '__LazyMap__', '__call__', '__cmp__', '

Re: MS VC++ Toolkit 2003, where?

2006-04-28 Thread Brian Elmegaard
"sturlamolden" <[EMAIL PROTECTED]> writes: > I believe MinGW can link .lib C libraries files from Visual Studio. But > there are no .a for Python24.dll as far as I can tell. But afaik you don't need one. -- Brian (remove the sport for mail) http://www.et.web.mek.dtu.dk/Staff/be/be.html http://ww

RE: Importing modules through directory shortcuts on Windows

2006-04-28 Thread Tim Golden
[Roger Upole] | [... snipped ugly code ...] Thanks; I'll have to find the time to experiment with that a bit. TJG This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more inform

Re: can i set up a mysql db connection as a class ?

2006-04-28 Thread Winfried Tilanus
On 04/28/2006 08:35 AM, *binarystar* wrote: Looking better at the """ Humble Database Connection Class """: if I am not mistaken, it seems to mix up connections and cursors. MySQLdb has a thread safety level of '1', meaning: "Threads may share the module, but not connections". So you have to giv

Pattern_Recognition_School+Conf_2006:Deadline_Approaching

2006-04-28 Thread andrea
Approaching Deadlines!! PATTERN RECOGNITION EVENTS THIS SUMMER, 2006 ___ 4TH INTERNATIONAL SUMMER SCHOOL ON PATTERN RECOGNITION (ISSPR, 2006), 23-28 JULY, UK WWW.PatternRecognitionSchool.com The 4th International Summer School on Pattern Recognition will be organised at t

Doubt with wx.ListCtrl

2006-04-28 Thread carlosperezs
I have programmed this code: # self ist a panel self.partListCtrlMarks = wx.ListCtrl(self.panel, -1, style = wx.LC_REPORT) self.Bind(wx.EVT_LIST_ITEM_SELECTED,self.OnSelectedItemList,self.partListCtrlMarks) vs.Add(self.partListCtrlMarks, 1, wx.EXPAND | wx.ALL, 4) self.par

Re: Pyrex installation on windows XP: step-by-step guide

2006-04-28 Thread Julien Fiore
I added "step A.5" to the guide and published it on the Python wiki, so that anyone can update it easily: http://wiki.python.org/moin/PyrexOnWindows -- http://mail.python.org/mailman/listinfo/python-list

Re: MS VC++ Toolkit 2003, where?

2006-04-28 Thread Gerhard Häring
Brian Elmegaard wrote: > "sturlamolden" <[EMAIL PROTECTED]> writes: > >> I believe MinGW can link .lib C libraries files from Visual Studio. But >> there are no .a for Python24.dll as far as I can tell. > > But afaik you don't need one. Actually, a libpython24.a file was added in Python 2.4.1. T

Re: Why not BDWGC?

2006-04-28 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > I've heard that the reason why python uses reference counting rather > than tracing collector is because python cannot determine the root set > for its various C extensions. > But provided that BDWGC(full name: Boehm-Demers-Weiser conservative > garbage collector) is con

Re: How to align the text of a Listbox to the right

2006-04-28 Thread Leonardo da Vinci
Sori Schwimmer ha scritto: > For a listbox, I would give a width and go with string > formatting. In your case, I guess that what I'll do is > to limit the width to something acceptable, and show > only the tail of the line. Yes, this is exactly what I wanted to do. Do you know a way to accomplis

time conversions [hh:mm:ss.ms <-> sec(.ms)

2006-04-28 Thread kpp9c
Hi, I was looking at python & datetime and hoping that it would already have a method/func to translate time formats. I need to translate seconds to hh:mm:ss.ms and vice versa and would like the ability to do some basic arithmetic in these formats. I think that there just has to be a package or mo

Re: Direct acces to db unify on unix sco

2006-04-28 Thread luca72
Thanks Luca -- http://mail.python.org/mailman/listinfo/python-list

python game with curses

2006-04-28 Thread Jerry Fleming
Hi, I have wrote a game with python curses. The problem is that I want to confirm before quitting, while my implementation doesn't seem to work. Anyone can help me? [code] #!/usr/bin/python # # Brick & Ball in Python # by Jerry Fleming <[EMAIL PROTECTED]> # # This is a small game adapted from th

Strange constructor behaviour (or not?)

2006-04-28 Thread Rolf Wester
Hi, when defining: class A: def __init__(self, l=[]): self.l = l a = A() a.l.append() b = A() print a.l I get the output [] instead of an empty list. I guess it's because the default value in the constructor is constructed once and whenever the constructor is c

pgasync

2006-04-28 Thread Manlio Perillo
Hi. Someone knows if this project is still alive? Thanks Manlio Perillo -- http://mail.python.org/mailman/listinfo/python-list

Re: Strange constructor behaviour (or not?)

2006-04-28 Thread Dave Hughes
Rolf Wester wrote: > Hi, > > when defining: > > class A: > def __init__(self, l=[]): > self.l = l > a = A() > a.l.append() > b = A() > print a.l > > I get the output > > [] > > instead of an empty list. I guess it's because the default value in > the constructor is

Re: Get all attributes of a com object

2006-04-28 Thread bruno at modulix
eicwo01 wrote: > Thanks for your tips. > But dir() and inspect did not really help. Really ? def dump(obj): for name in dir(obj): print getattr(obj, name) -- bruno desthuilliers python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in '[EMAIL PROTECTED]'.split('@')])

RE: MinGW and Python

2006-04-28 Thread Ames Andreas
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > g] On Behalf Of Ross Ridge > Sent: Thursday, April 27, 2006 8:53 PM > Subject: Re: MinGW and Python > > > No one is working on removing MinGW's depency on MSVCRT.DLL. There is certainly work underway to ease th

Re: Get all attributes of a com object

2006-04-28 Thread Duncan Booth
bruno at modulix wrote: > eicwo01 wrote: >> Thanks for your tips. >> But dir() and inspect did not really help. > > Really ? > > def dump(obj): > for name in dir(obj): > print getattr(obj, name) > That will show him the attributes of the Python wrapper around the COM object, it won't s

RE: Get all attributes of a com object

2006-04-28 Thread Stefan Schukat
Hello, you only get information about a COM object when you have a wrapper. But you are using the dynamic invoke (Dispatch). So try the typelibrary browser in Pythonwin or use the generated wrapper with makepy or gencache.EnsureDispatch. But dir will give you only the methods and internal class

Re: Foriegn contents in Python Packages...

2006-04-28 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > Is it possible to store "non-python" files in a directory that serves > as a Python Package? (Like an image file or an XML file.) > > Is this allowed for sub-directories that are not Python Packages? In > other words, can I have a Python Package that contains other Pyth

Re: time conversions [hh:mm:ss.ms <-> sec(.ms)

2006-04-28 Thread John Machin
On 28/04/2006 6:39 PM, kpp9c wrote: > Hi, > > I was looking at python & datetime and hoping that it would already > have > a method/func to translate time formats. I need to translate seconds to > hh:mm:ss.ms and vice versa and would like the ability to do some basic > arithmetic in these formats.

Re: time conversions [hh:mm:ss.ms <-> sec(.ms)

2006-04-28 Thread Dave Hughes
kpp9c wrote: > Hi, > > I was looking at python & datetime and hoping that it would already > have > a method/func to translate time formats. I need to translate seconds > to hh:mm:ss.ms and vice versa and would like the ability to do some > basic arithmetic in these formats. I think that there ju

Re: Get all attributes of a com object

2006-04-28 Thread bruno at modulix
Duncan Booth wrote: > bruno at modulix wrote: > > >>eicwo01 wrote: >> >>>Thanks for your tips. >>>But dir() and inspect did not really help. >> >>Really ? >> >>def dump(obj): >> for name in dir(obj): >> print getattr(obj, name) >> > > > That will show him the attributes of the Python wrapp

Re: append function problem?

2006-04-28 Thread bruno at modulix
[EMAIL PROTECTED] wrote: > hello, recently i tried to use list.append() function in seemingly > logical ways, What seems logical and how it really works may not be the same... As a general rule, for builtin types, destructive methods returns None. I personnaly find it a wart, but what, it's the B

RE: Get all attributes of a com object

2006-04-28 Thread Tim Golden
[bruno at modulix] | Duncan Booth wrote: | > That will show him the attributes of the Python wrapper | around the COM | > object, it won't show him the attributes of the underlying | COM object | > itself. | | I stand corrected - and shouldn't answer questions about MS technos :( In fact, i

Re: MinGW and Python

2006-04-28 Thread sturlamolden
Ames Andreas wrote: > 1) psychological issues: 'convenient IDE', 'better debugger' I prefer Eclipse when using MinGW. That IDE is on par with Visual Studio. And Python will be developed for GCC anyway. > 2) legal issues: redistribution of msvcrXX That is indeed the problem. msvcrXX cannot be

Non-web-based templating system

2006-04-28 Thread qscomputing
Hi, I'm creating a small application in Python that uses lists and dictionaries to create a rudimentary database. I'd like to create some "fill-in-the-blanks" reports from this data, ideally by taking an RTF or plaintext file as a template and replacing placeholder tags with my data. Are there any

Re: Regular Expression help

2006-04-28 Thread Kent Johnson
Edward Elliott wrote: > [EMAIL PROTECTED] wrote: >> If you are parsing HTML, it may make more sense to use a package >> designed especially for that purpose, like Beautiful Soup. > > I don't know Beautiful Soup, but one advantage regexes have over some > parsers is handling malformed html. Beaut

Re: not quite 1252

2006-04-28 Thread Anton Vredegoor
Serge Orlov wrote: > I extracted content.xml from a test file and the header is: > > > So any xml library should handle it just fine, without you trying to > guess the encoding. Yes my header also says UTF-8. However some kind person send me an e-mail stating that since I am getting \x94 and s

Re: Non-web-based templating system

2006-04-28 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > Hi, > > I'm creating a small application in Python that uses lists and > dictionaries to create a rudimentary database. I'd like to create some > "fill-in-the-blanks" reports from this data, ideally by taking an RTF > or plaintext file as a template and replacing placeh

Add file to zip, or replace file in zip

2006-04-28 Thread abcd
I have a script which zips up a directory, once it does with that (before it closes the zip file) I want to replace a file that was added to the zip, say "Foo.txt". So I tried this... [code] z = zipfile.ZipFile("blah.zip", "w") # zip the directory #... z.writestr("c:\\path\\to\\current\\foo_txt_fi

Re: Non-web-based templating system

2006-04-28 Thread bruno at modulix
Diez B. Roggisch wrote: > [EMAIL PROTECTED] wrote: > > >>Hi, >> >>I'm creating a small application in Python that uses lists and >>dictionaries to create a rudimentary database. I'd like to create some >>"fill-in-the-blanks" reports from this data, ideally by taking an RTF >>or plaintext file as

Re: not quite 1252

2006-04-28 Thread Richard Brodie
"Anton Vredegoor" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Yes my header also says UTF-8. However some kind person send me an e-mail > stating that > since I am getting \x94 and such output when using repr (even if str is > giving correct > output) there could be some pr

Re: not quite 1252

2006-04-28 Thread John Machin
On 28/04/2006 9:21 PM, Anton Vredegoor wrote: > Serge Orlov wrote: > >> I extracted content.xml from a test file and the header is: >> >> >> So any xml library should handle it just fine, without you trying to >> guess the encoding. > > Yes my header also says UTF-8. However some kind person sen

Re: python game with curses

2006-04-28 Thread Harold Fellermann
Jerry, if you want anyone to answer your question, please read this: http://www.catb.org/~esr/faqs/smart-questions.html -- http://mail.python.org/mailman/listinfo/python-list

Re: not quite 1252

2006-04-28 Thread Serge Orlov
Anton Vredegoor wrote: > In fact there are a lot of printable things that haven't got a text > attribute, for example some items with tag ()s. In my sample file I see , is that you're talking about? Since my file is small I can say for sure this tag represents two space characters. -- http:

Re: not quite 1252

2006-04-28 Thread Anton Vredegoor
Richard Brodie wrote: > "Anton Vredegoor" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >> Yes my header also says UTF-8. However some kind person send me an e-mail >> stating that >> since I am getting \x94 and such output when using repr (even if str is >> giving correct

Re: Non-web-based templating system

2006-04-28 Thread qscomputing
Thanks, it looks like empy is what I need. -- http://mail.python.org/mailman/listinfo/python-list

Re: can i set up a mysql db connection as a class ?

2006-04-28 Thread nephish
So this opens and closes the connection every time i run the query? thats cool. i think that would fit in well. so when i need to run the query, i pass something like query = "SELECT * FROM `Table` WHERE `foo` = 'bar'" result = DB_Connector.Execute(query) and the result would be the same as if i

Re: finding IP address of computer

2006-04-28 Thread DarkBlue
Chris wrote: > How do I find and print to screen the IP address of the computer my > python program is working on? def readip(): import re, urllib f = urllib.urlopen('http://checkip.dyndns.org') s = f.read() m = re.search('([\d]*\.[\d]*\.[\d]*\.[\d]*)', s) return m.group(0) myip = readip()

Re: not quite 1252

2006-04-28 Thread Serge Orlov
Anton Vredegoor wrote: > Serge Orlov wrote: > > > I extracted content.xml from a test file and the header is: > > > > > > So any xml library should handle it just fine, without you trying to > > guess the encoding. > > Yes my header also says UTF-8. However some kind person send me an > e-mail sta

Re: Pyrex installation on windows XP: step-by-step guide

2006-04-28 Thread Chris Cioffi
On 28 Apr 2006 01:06:55 -0700, Julien Fiore <[EMAIL PROTECTED]> wrote: I added "step A.5" to the guide and published it on the Python wiki, sothat anyone can update it easily:http://wiki.python.org/moin/PyrexOnWindows --http://mail.python.org/mailman/listinfo/python-listThanks to Julien and everyon

Re: Non-web-based templating system

2006-04-28 Thread Brett g Porter
Diez B. Roggisch wrote: > [EMAIL PROTECTED] wrote: > > Maybe the built-in string interpolation is sufficient? > > print "Hello %(name)s" % dict(name="Peter Pan") Or in recent pythons, the built-in string templating system (see http://docs.python.org/lib/node109.html) >>> from string import

Re: not quite 1252

2006-04-28 Thread Anton Vredegoor
Serge Orlov wrote: > Anton Vredegoor wrote: >> In fact there are a lot of printable things that haven't got a text >> attribute, for example some items with tag ()s. > > In my sample file I see , is that you're talking > about? Since my file is small I can say for sure this tag represents > t

RE: Get all attributes of a com object

2006-04-28 Thread Stefan Schukat
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Tim Golden > Sent: Friday, April 28, 2006 11:45 AM > To: python-list@python.org > Subject: RE: Get all attributes of a com object > > [snip] > > The only thing is that you can't always build a prox

Re: not quite 1252

2006-04-28 Thread Serge Orlov
Anton Vredegoor wrote: > Serge Orlov wrote: > > > Anton Vredegoor wrote: > >> In fact there are a lot of printable things that haven't got a text > >> attribute, for example some items with tag ()s. > > > > In my sample file I see , is that you're talking > > about? Since my file is small I ca

Re: Get all attributes of a com object

2006-04-28 Thread eicwo01
Many thanks to all of you; I learned a lot and will come up next time hopefully with some less utopic project ... :-) Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: (was Re: Xah's Edu Corner: Criticism vs Constructive Criticism)

2006-04-28 Thread Tagore Smith
John Bokma wrote: > Eli Gottlieb <[EMAIL PROTECTED]> wrote: > > > Oh, God, not another one. > > Instead of cross posting more garbage, do as follows: > > Email a complaint to the email addresses you can look up yourself and > include the entire message of Xah: > > http://www.spamcop.net/sc?track=7

RE: Get all attributes of a com object

2006-04-28 Thread Tim Golden
[Stefan Schukat] | You can only build a proxy module if you have the typelibrary | information which not all programs provide, since it prohibits | changes in the interface the easy way. E.g., MFC application | will normally not provide a typelibrary but support dynamic | dispatch. Oh. Thanks.

Re: not quite 1252

2006-04-28 Thread Anton Vredegoor
Anton Vredegoor wrote: > So, probably yes. If it doesn't have a text attribrute if you iterate > over it using OOopy for example: Sorry about that, I meant if the text attribute is None, but there *is* some text. Anton -- http://mail.python.org/mailman/listinfo/python-list

Re: not quite 1252

2006-04-28 Thread Serge Orlov
Anton Vredegoor wrote: > Anton Vredegoor wrote: > > > So, probably yes. If it doesn't have a text attribrute if you iterate > > over it using OOopy for example: > > Sorry about that, I meant if the text attribute is None, but there *is* > some text. OK, I think I understand what you're talking ab

Re: Non-web-based templating system

2006-04-28 Thread Larry Bates
[EMAIL PROTECTED] wrote: > Hi, > > I'm creating a small application in Python that uses lists and > dictionaries to create a rudimentary database. I'd like to create some > "fill-in-the-blanks" reports from this data, ideally by taking an RTF > or plaintext file as a template and replacing placeho

Re: (was Re: Xah's Edu Corner: Criticism vs Constructive Criticism)

2006-04-28 Thread Chris Uppal
Tagore Smith wrote: > It's much easier to use a killfile than to complain to an ISP, and I > think that that should be the preferred response to messages you don't > like. I'm inclined to agree. The problem is not Xah Lee (whom I have killfiled), but the people who insist on making my killfile u

Re: Can one query full name (or version) of selected packages at pypi?

2006-04-28 Thread Chris Lambacher
On Thu, Apr 20, 2006 at 02:26:02AM -0700, Caleb Hattingh wrote: > I could do these steps myself with normal http access and > screen-scraping, but is there already such a system/script somewhere? > Alternatively, how do you all keep versions of python addons > up-to-date? Manually? I use easy_ins

Awesome PySIG meeting last night

2006-04-28 Thread Ted Roche
Ten folks attended the monthly Python Special Interest Group meeting, held monthly at the Amoskeag Business Incubator in Manchester. Ben was harassed. Announcements were made. Several Python gotchas were discussed. Paul Koning demonstrated a remarkable reinvention of the TECO (Tape Edit and

Re: Awesome PySIG meeting last night

2006-04-28 Thread Ben Scott
On 4/28/06, Ted Roche <[EMAIL PROTECTED]> wrote: > Ten folks attended the monthly Python Special Interest Group meeting, > held monthly at the Amoskeag Business Incubator in Manchester. > > Ben was harassed. I must say, the level of harrassment was fairly low. I expect a higher quality of heckl

Re: not quite 1252

2006-04-28 Thread Serge Orlov
Anton Vredegoor wrote: > Anton Vredegoor wrote: > > > So, probably yes. If it doesn't have a text attribrute if you iterate > > over it using OOopy for example: > > Sorry about that, I meant if the text attribute is None, but there *is* > some text. OK, I think I understand what you're talking ab

Re: not quite 1252

2006-04-28 Thread Serge Orlov
Anton Vredegoor wrote: > Serge Orlov wrote: > > > Anton Vredegoor wrote: > >> In fact there are a lot of printable things that haven't got a text > >> attribute, for example some items with tag ()s. > > > > In my sample file I see , is that you're talking > > about? Since my file is small I ca

Re: Twisted and Tkinter

2006-04-28 Thread [EMAIL PROTECTED]
Fredrik is right, ChatFactory doesn't have sendLine as a method b/c it doesn't inherit it from ClientFactory. The code: protocol = ChatClient does do anything within ChatFactory except set the variable. Try out these. from twisted.protocols.basic import LineReceiver, LineReceiver.sendLine or chan

Re: (was Re: Xah's Edu Corner: Criticism vs Constructive Criticism)

2006-04-28 Thread Tagore Smith
Chris Uppal wrote: > I'm inclined to agree. The problem is not Xah Lee (whom I have killfiled), > but > the people who insist on making my killfile useless by posting loads of > follow-ups saying things amounting to "stop this insane gibberish". ... well, this is the problem with killfiles. So

Re: (was Re: Xah's Edu Corner: Criticism vs Constructive Criticism)

2006-04-28 Thread Takehiko Abe
> > > > Wake up, people ! You are not the victims, you are the problem. Shut up, > > > > /please/. > > > > > > Cannot agree more! > > > > > > Wake up, people ! You are not the victims, you are the problem. Shut up, > > > /please/. > > > > Wholeheartedly agree! > > > > Wake up, people ! You

Re: time conversions [hh:mm:ss.ms <-> sec(.ms)

2006-04-28 Thread Faber
kpp9c wrote: > I was looking at python & datetime and hoping that it would already > have a method/func to translate time formats. I need to translate seconds > to hh:mm:ss.ms and vice versa and would like the ability to do some basic > arithmetic in these formats. Have a look at datetime.timedel

best way to determine sequence ordering?

2006-04-28 Thread John Salerno
If I want to make a list of four items, e.g. L = ['C', 'A', 'D', 'B'], and then figure out if a certain element precedes another element, what would be the best way to do that? Looking at the built-in list functions, I thought I could do something like: if L.index('A') < L.index('D'): # do

ANN: Leo 4.4 rc1 released

2006-04-28 Thread Edward K. Ream
Leo 4.4 release candidate 1 is now available at: http://sourceforge.net/project/showfiles.php?group_id=3458&package_id=29106 This version fixes a few minor bug reported in 4.4b4 and adds 9 new commands. The open-outline-by-name command supports filename completion. Leo is a text editor, data org

os.startfile() - one or two arguments?

2006-04-28 Thread BartlebyScrivener
Can any Windows user give a working example of adding a "command verb" to os.startfile()? When I try it, it squawks that it takes only one argument. >>> os.startfile('d:/','explore') Traceback (most recent call last): File "", line 1, in ? TypeError: startfile() takes exactly 1 argument (2 give

Re: os.startfile() - one or two arguments?

2006-04-28 Thread Lou Losee
On 28 Apr 2006 08:06:02 -0700, BartlebyScrivener <[EMAIL PROTECTED]> wrote: Can any Windows user give a working example of adding a "command verb"to os.startfile()?When I try it, it squawks that it takes only one argument.>>> os.startfile('d:/','explore') ry: os.startfile(["d:/",  "explore"]) you

Re: Non-web-based templating system

2006-04-28 Thread Alex Martelli
<[EMAIL PROTECTED]> wrote: > Hi, > > I'm creating a small application in Python that uses lists and > dictionaries to create a rudimentary database. I'd like to create some > "fill-in-the-blanks" reports from this data, ideally by taking an RTF > or plaintext file as a template and replacing plac

Re: os.startfile() - one or two arguments?

2006-04-28 Thread Scott David Daniels
BartlebyScrivener wrote: > Can any Windows user give a working example of adding a "command verb" > to os.startfile()? > > When I try it, it squawks that it takes only one argument. > os.startfile('d:/','explore') > Traceback (most recent call last): > File "", line 1, in ? > TypeError: st

RE: os.startfile() - one or two arguments?

2006-04-28 Thread Tim Golden
[BartlebyScrivener] | Can any Windows user give a working example of adding a "command verb" | to os.startfile()? I'm afraid the core Python version of this command has only grown the command verb since 2.5a1. Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32 Type "h

Re: os.startfile() - one or two arguments?

2006-04-28 Thread Thomas Heller
BartlebyScrivener wrote: > Can any Windows user give a working example of adding a "command verb" > to os.startfile()? > > When I try it, it squawks that it takes only one argument. > os.startfile('d:/','explore') > Traceback (most recent call last): > File "", line 1, in ? > TypeError: st

Using Databases in Python

2006-04-28 Thread Petr Jakes
I would like to know if anybody can point me to the site, where it is possible to find the tutorial "Using Databases in Python" which is mentioned by Steve Holden here: http://tinyurl.com/ectj8 Thanks Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: Converstion

2006-04-28 Thread Paddy
the del version - is that an optimisation? Is it actually faster? - I did not have enough info. to check so just did what came naturally to me :-) - Pad. -- http://mail.python.org/mailman/listinfo/python-list

Re: os.startfile() - one or two arguments?

2006-04-28 Thread BartlebyScrivener
Whoops! Sorry all. I was using the "in-development" version of the documentation and didn't even realize it. Thank you, Rick -- http://mail.python.org/mailman/listinfo/python-list

Re: Editing a function in-memory and in-place

2006-04-28 Thread Ian Bicking
Thanks for the answers, very helpful. I think I'm going to give Peter's hack a try, as it's actually quite close to what I'm trying to do -- I get the source for the new function, then that lets me make the old function become the new one. But I'll probably also use Michael's solution for class e

Re: MS VC++ Toolkit 2003, where?

2006-04-28 Thread Chris Mellon
On 27 Apr 2006 12:06:44 -0700, sturlamolden <[EMAIL PROTECTED]> wrote: > > Alex Martelli wrote: > > > Provides the core msvcrt.lib for msvcr71.dll against which to link > > your extensions. This is critically important, as without it you are > > going to wind up linking against the wrong run

Re: Converstion

2006-04-28 Thread Peter Otten
Paddy wrote: > the del version - is that an optimisation? > Is it actually faster? del x[-1:] # or del x[-1] if you are sure that len(x) > 0 just deletes the last item (if any) from x whereas x = x[:-1] copies all but the last item of the original list into a new one. This can take much longer

Re: How to align the text of a Listbox to the right

2006-04-28 Thread Edward Elliott
Leonardo da Vinci wrote: >> to limit the width to something acceptable, and show >> only the tail of the line. > > Yes, this is exactly what I wanted to do. Do you know a way to > accomplish that? Because Eric Brunel said it is impossible on a > Listbox. Use a string slice. -- http://mail.pytho

Re: os.startfile() - one or two arguments?

2006-04-28 Thread BartlebyScrivener
Neat tutorial. Thank you! Rick -- http://mail.python.org/mailman/listinfo/python-list

wxPython problem

2006-04-28 Thread scottholdensmith
I'm a little confused. I installed wxPython on my Thinkpad T23, on which I'm running Fedora Core 5. I did it using Yum and Yumex, and everything installed fine. In fact, I now have PyShell and PyCrust in my applications. Within those two apps I can use wx as a module. But from the bash shell, when

Re: Using Databases in Python

2006-04-28 Thread BartlebyScrivener
It might be in his book, Python Web Programming, or just go to http://www.holdenweb.com/ and ask him yourself using the contact form. He's a generous contributor here. rick -- http://mail.python.org/mailman/listinfo/python-list

Re: OOP techniques in Python

2006-04-28 Thread Steven Bethard
Dennis Lee Bieber wrote: > On Thu, 27 Apr 2006 14:32:15 -0500, Philippe Martin > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > >> What then is the point of the double underscore (if any) ?: > > To prevent masking/shadowing of inherited attributes... Note that it can fa

Re: MinGW and Python

2006-04-28 Thread Martin v. Löwis
Ames Andreas wrote: > There remains one technical issue that isn't a killer but would > be inconvenient, IMHO: Can pywin32 be made working with a > mingw-python (I'm quite sure it can't be made building on it)? > I'd appreciate any datapoints about that ... It all depends on what CRT version you

Re: Converstion

2006-04-28 Thread Edward Elliott
Peter Otten wrote: > del x[-1:] # or del x[-1] if you are sure that len(x) > 0 > just deletes the last item (if any) from x whereas > x = x[:-1] > copies all but the last item of the original list into a new one. This can > take much longer: But his data is a string, which is immutable but heavily

Re: wxPython problem

2006-04-28 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > I'm a little confused. I installed wxPython on my Thinkpad T23, on > which I'm running Fedora Core 5. I did it using Yum and Yumex, and > everything installed fine. In fact, I now have PyShell and PyCrust in > my applications. Within those two apps I can use wx as a modu

Re: wxPython problem

2006-04-28 Thread scottholdensmith
No, it's python2.4. It says there's no module wx...hmm. -- http://mail.python.org/mailman/listinfo/python-list

RE: MinGW and Python

2006-04-28 Thread Ames Andreas
> -Original Message- > From: "Martin v. Löwis" [mailto:[EMAIL PROTECTED] > Sent: Friday, April 28, 2006 6:20 PM > Subject: Re: MinGW and Python > > It all depends on what CRT version you link Python with. If you > use mingw32 to link Python with msvcr71.dll, nothing would change > for pyw

wxPython, wxcombobox opening

2006-04-28 Thread Rony Steelandt
Hi, Does somebody knows a way to automaticely open the list part of a wxCombobox when it gets the focus ? tia, Rony -- http://mail.python.org/mailman/listinfo/python-list

Re: (was Re: Xah's Edu Corner: Criticism vs Constructive Criticism)

2006-04-28 Thread John Bokma
"Tagore Smith" <[EMAIL PROTECTED]> wrote: > It's much easier to use a killfile than to complain to an ISP, and I > think that that should be the preferred response to messages you don't > like. No, since even if you kill file Xah Lee, he keeps wasting resources of people who have dedicated equip

Re: (was Re: Xah's Edu Corner: Criticism vs Constructive Criticism)

2006-04-28 Thread John Bokma
"Chris Uppal" <[EMAIL PROTECTED]> wrote: > I'm inclined to agree. The problem is not Xah Lee (whom I have > killfiled), but the people who insist on making my killfile useless by > posting loads of follow-ups saying things amounting to "stop this > insane gibberish". Every bloody time. Yup, an

Re: Awesome PySIG meeting last night

2006-04-28 Thread Ted Roche
On Apr 28, 2006, at 10:31 AM, Ben Scott wrote: > I must say, the level of harrassment was fairly low. I expect a > higher quality of heckling from this group. Don't let it happen > again. Be careful what you wish for! Ted Roche Ted Roche & Associates, LLC http://www.tedroche.com -- http://

Re: wxPython problem

2006-04-28 Thread scottholdensmith
What I'm wondering is, perhaps it has something to do with the wx.pth file? I can't seem to find anything in the documentation about what the path should be, which file it should be pointing to. Scott -- http://mail.python.org/mailman/listinfo/python-list

Urllib2 / add_password method

2006-04-28 Thread mrstephengross
I'm working on learning how to use urllib2 to use a proxy server. I've looked through the postings on this group, and it's been helpful. I have not, however, found complete documentation on the add_password() functions. Here's what I've got so far: # import

Re: (was Re: Xah's Edu Corner: Criticism vs Constructive Criticism)

2006-04-28 Thread John Bokma
"Tagore Smith" <[EMAIL PROTECTED]> wrote: > > Chris Uppal wrote: > >> I'm inclined to agree. The problem is not Xah Lee (whom I have >> killfiled), but the people who insist on making my killfile useless >> by posting loads of follow-ups saying things amounting to "stop this >> insane gibberish

Summer of Code mailing list

2006-04-28 Thread Neal Norwitz
There's a new SoC mailing list. [EMAIL PROTECTED] You can sign up here: http://mail.python.org/mailman/listinfo/soc2006 This list is for any SoC discussion: mentors, students, idea, etc. Student can submit applications starting May 1, so now is the time to get students interested in your

  1   2   >