(Tkinter) Adding delay to PopUpMsg

2005-03-17 Thread Harlin Seritt
I am working on making something called a PopMsg widget which is actually identical to a Balloon widget from Pmw. Here is the code: ---code--- from Tkinter import * import time class PopMsg: def showmsg(self, event): for a in range(1000): pass self.t.d

Teiei kiri listi Linux-ee ootab moderaatori otsust.

2005-03-17 Thread linux-ee-bounces
Teie kiri listi 'Linux-ee' teemal read it immediately edastati listi moderaatorile üle vaatamiseks. Põhjus: Postitus aadressilt, mis pole listi tellijate nimekirjas Sõltuvalt moderaatori otsusest kiri kas postitakse listi või teavitatakse teid moderaatori otsusest. Kui soovite seda po

Re: Is Python like VB?

2005-03-17 Thread Tim Roberts
"Mike Cox" <[EMAIL PROTECTED]> wrote: > >As you may or may not know, Microsoft is discontinuing Visual Basic in favor >of VB.NET and that means I need to find a new easy programming language. I >heard that Python is an interpreted language similar to VB. This statement is a little bit silly. VB.

Re: how to handle repetitive regexp match checks

2005-03-17 Thread David M. Cooke
Matt Wette <[EMAIL PROTECTED]> writes: > Over the last few years I have converted from Perl and Scheme to > Python. There one task that I do often that is really slick in Perl > but escapes me in Python. I read in a text line from a file and check > it against several regular expressions and do

Re: OS X and Tkinter

2005-03-17 Thread scott
Mike Tuller wrote: I have looked everywhere on the net, and can't figure out how to configure python so that Tkinter will work with it. Any help would be appreciated. The following worked for me with OSX version 10.3 and the default python 2.3: http://www.pythonmac.org/wiki/FAQ#head-8838d40d

Re: Interface support?

2005-03-17 Thread Michael Spencer
Steve wrote: Is it possible to design interfaces that classes must implement in Python? There are some well-known 'independent' implementations of interfaces: Zope Interfaces :http://www.zope.org/Wikis/Interfaces/FrontPage - a separable component of the much larger app server

Re: Python becoming less Lisp-like

2005-03-17 Thread Kay Schluehr
Paul Boddie wrote: > The principal advantage of the property function was to permit the > definition of "active" attributes without having a huge > "if...elif...else" statement in the __getattr__ method. So the > motivation was seemingly to externalize the usually simple logic in > __getattr__ so

Re: newbie:unique problem

2005-03-17 Thread Heiko Wundram
On Thursday 17 March 2005 23:31, Brian van den Broek wrote: > Am I not > right in thinking that with the dict approach there is no guarantee > that the order from the original list will be preserved? Yup, absolutely right that the original ordering will not be preserved. But, I wonder whether thi

Re: Interface support?

2005-03-17 Thread Michele Simionato
Now they use the same interface package. For the other questions: google is your friend. (try "zope interfaces" then "twisted interfaces"). -- http://mail.python.org/mailman/listinfo/python-list

RELEASED Python 2.4.1, release candidate 2

2005-03-17 Thread Anthony Baxter
On behalf of the Python development team and the Python community, I'm happy to announce the release of Python 2.4.1 (release candidate 2). Python 2.4.1 is a bug-fix release. See the release notes at the website (also available as Misc/NEWS in the source distribution) for details of the bugs squi

Re: metaclass error

2005-03-17 Thread Michele Simionato
F. Petitijean: > ManagerInterface is a module not a class ! Yes, but the error message could be improved (at least for the sake of people not knowing the internal working of Python). Do you care to fill a bug report? Michele Simionato -- http://mail.python.org/mailman/listinfo/

Re: generic text read function

2005-03-17 Thread Michael Spencer
John Hunter wrote: "les" == les ander <[EMAIL PROTECTED]> writes: les> Hi, matlab has a useful function called "textread" which I am les> trying to reproduce in python. les> two inputs: filename, format (%s for string, %d for integers, les> etc and arbitary delimiters) Builing on J

Re: Interface support?

2005-03-17 Thread Steve
Michele Simionato wrote: Twisted and Zope already use interfaces. You can download the interface package and use it in you project. Thanks for the response. I'm completely new to Python, where exactly would I go to find these interface packages(Python site, or Twisted/Zope sites)? Is it the same

Re: Interface support?

2005-03-17 Thread Michele Simionato
Twisted and Zope already use interfaces. You can download the interface package and use it in you project. Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: sgmlop: malformed charrefs?

2005-03-17 Thread Fredrik Lundh
Martin v. Löwis wrote: >> are the PyXML folks shipping the latest sgmlop? I'm pretty sure they've >> forked the code (there's no UnicodeParser in the effbot.org edition), and >> I have no idea how things work in the fork. > > As we've forked the code, the answer is a clear "yes" :-) It certainly

Re: fastest postgresql module

2005-03-17 Thread casevh
With the round-trip time of 245ms, three seconds only allows for approximately 12 packet exchanges (roughly 24 total packets). I think latency is your problem. casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: PyGoogle featured on Google Code

2005-03-17 Thread EP
[EMAIL PROTECTED] reported: > Google has started a site Google Code http://code.google.com/ to > showcase Open Source software, and the first featured project is > PyGoogle, a Python module wrapper for the Google Web APIs. Also > mentioned is goopy/functional, a library that brings functional > la

create/access dynamic growth list

2005-03-17 Thread sam
Hi, I have a configuration file need to be processed (read/write) by python. Currently I the following method can only read and store data that python read a line from a configuraiton file: def _parse (self): # parse message m = self.FWShow_Command.match (conf_data) if (m

how to handle repetitive regexp match checks

2005-03-17 Thread Matt Wette
Over the last few years I have converted from Perl and Scheme to Python. There one task that I do often that is really slick in Perl but escapes me in Python. I read in a text line from a file and check it against several regular expressions and do something once I find a match. For example, in p

Re: generic text read function

2005-03-17 Thread John Hunter
> "les" == les ander <[EMAIL PROTECTED]> writes: les> Hi, matlab has a useful function called "textread" which I am les> trying to reproduce in python. les> two inputs: filename, format (%s for string, %d for integers, les> etc and arbitary delimiters) les> variable numbe

Re: I can do it in sed...

2005-03-17 Thread Bengt Richter
On Thu, 17 Mar 2005 18:37:11 -0500, Kotlin Sam <[EMAIL PROTECTED]> wrote: >Thanks to everyone who answered my two questions. I have only submitted >questions twice, and on both occasions the solutions were excellent, >and, I'm emarrassed to say, much simpler than I thought they would be. > >My n

generic text read function

2005-03-17 Thread les_ander
Hi, matlab has a useful function called "textread" which I am trying to reproduce in python. two inputs: filename, format (%s for string, %d for integers, etc and arbitary delimiters) variable number of outputs (to correspond to the format given as input); So suppose your file looked like this s

Interface support?

2005-03-17 Thread Steve
Is it possible to design interfaces that classes must implement in Python? If it's not, is this functionality planned at all for the future? Thanks, Steve -- http://mail.python.org/mailman/listinfo/python-list

Re: Good use for Jython

2005-03-17 Thread [EMAIL PROTECTED]
The only reason i can think of to use it would be for the purpos of using an Applet in a WebPage, as the Jythonc tool can compile Jython classes to Java byte code. But if your not in need of an Applet, then youll probably want to go with a normal Python GUI toolkit like wxPython (or QT or Tkinte

PyGoogle featured on Google Code

2005-03-17 Thread beliavsky
Google has started a site Google Code http://code.google.com/ to showcase Open Source software, and the first featured project is PyGoogle, a Python module wrapper for the Google Web APIs. Also mentioned is goopy/functional, a library that brings functional language attributes to Python. -- http:

Re: list of unique non-subset sets

2005-03-17 Thread bearophileHUGS
s1 = set(['a','b','c']) s2 = set(['a','c']) s3 = set(['a','d','e','f']) s4 = set(['r','k','l']) s5 = set(['r','k','l']) ls = [s1,s2,s3,s4,s5] result1 = [s1, s3, s5] A result can contain s4 or s5 at random. This problem looks like the one of searching the correct hyperedges for a hypergraph. s1-5 a

Re: fastest postgresql module

2005-03-17 Thread Gerhard Haering
On Fri, Mar 18, 2005 at 09:31:45AM +1000, Timothy Smith wrote: > Leif B. Kristensen wrote: > > >Timothy Smith skrev: > >>has anyone got some hard numbers on which pg access module is the > >>fastest, i currently use pypgsql, but i can't help but feel it's a > >>little slow. > >>3 seconds to connec

Re: list of unique non-subset sets

2005-03-17 Thread Raymond Hettinger
"Kent Johnson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Raymond Hettinger wrote: > > [EMAIL PROTECTED] > > > >>I have many set objects some of which can contain same group of object > >>while others can be subset of the other. Given a list of sets, > >>I need to get a list of

Re: Writing C readable bitfield structs?

2005-03-17 Thread John Machin
[EMAIL PROTECTED] TOP-POSTED: > Anyone have any idea? 1. Larry Bates has already told you. 2. I note that you say "I do not want to use a new int for every member of struct S.", *not* "I am forced to pack bools into an int, 1 bit per bool, because I have no control over the file format". Quite a

Re: Proposal for adding Shallow Threads and a Main Loop to Python

2005-03-17 Thread Rhamphoryncus
Gary D. Duzan wrote: >A while back I tossed something together to deal with the same issue > in terms of "futures" (or "promises".) Here is roughly what the above > code would look like with futures as I implemented them: >This was all done using plain Python 1.5.2 in 80 lines of code,

Re: fastest postgresql module

2005-03-17 Thread Timothy Smith
Leif B. Kristensen wrote: Timothy Smith skrev: my only issue with psycopg, is last time i looked they had no win32 port? Uh, in that case, maybe you should consider changing platform? 8^) my app has to be multiplatform, but i would gladly rip windows from the drives of every computer wi

Re: fastest postgresql module

2005-03-17 Thread Leif B. Kristensen
Timothy Smith skrev: > my only issue with psycopg, is last time i looked they had no win32 > port? Uh, in that case, maybe you should consider changing platform? 8^) -- Leif Biberg Kristensen just another global village idiot -- http://mail.python.org/mailman/listinfo/python-list

Re: I can do it in sed...

2005-03-17 Thread Kotlin Sam
Thanks to everyone who answered my two questions. I have only submitted questions twice, and on both occasions the solutions were excellent, and, I'm emarrassed to say, much simpler than I thought they would be. My next goal is to be able to help someone they way y'all have helped me. Thanks aga

Re: fastest postgresql module

2005-03-17 Thread Timothy Smith
Leif B. Kristensen wrote: Timothy Smith skrev: has anyone got some hard numbers on which pg access module is the fastest, i currently use pypgsql, but i can't help but feel it's a little slow. 3 seconds to connect, send one query, get th return data. i'm on a adsl 1.5mbit/256kbit link, the serve

Re: Proposal for adding Shallow Threads and a Main Loop to Python

2005-03-17 Thread Gary D. Duzan
In article <[EMAIL PROTECTED]>, Rhamphoryncus <[EMAIL PROTECTED]> wrote: > >import mainloop, urllib > >def get_and_save(path): >infile = waitfor urllib.urlopen(path, async=True) >outfile = waitfor open(path.split('/')[-1], async=True) >waitfor outfile.write(waitfor infile.read(async=Tru

Re: Is Python like VB?

2005-03-17 Thread Luis M. Gonzalez
Mike, I've got a very good news for you which, to my surprise, nobody mentioned in this thread: Right now, Micrsoft is developing a .NET version of Python ( http://www.ironpython.com ). It has been started as an open source project by Jim Hugunin, which was later hired by Microsoft to keep on wor

Re: newbie:unique problem

2005-03-17 Thread Brian van den Broek
Heiko Wundram said unto the world upon 2005-03-17 16:29: On Thursday 17 March 2005 20:08, Leeds, Mark wrote: But, I also want it to get rid of the AAA KP because there are two AAA's even though the last two letters are different. It doesn't matter to me which one is gotten rid of but I don't know h

PyZeroConf Question

2005-03-17 Thread djw
AMK, thanks for your work on PyZeroConf! Using PyZeroConf 0.12. I'm seeing an issue with the Browser.py code. I am scanning for printers using: type = "_pdl-datastream._tcp.local." The list of printers is returned, but every call to getServiceInfo() in the Listener objectresults in a timeout and

Re: fastest postgresql module

2005-03-17 Thread Leif B. Kristensen
Timothy Smith skrev: > has anyone got some hard numbers on which pg access module is the > fastest, i currently use pypgsql, but i can't help but feel it's a > little slow. > 3 seconds to connect, send one query, get th return data. > i'm on a adsl 1.5mbit/256kbit link, the server is on a 10/10mbi

fastest postgresql module

2005-03-17 Thread Timothy Smith
has anyone got some hard numbers on which pg access module is the fastest, i currently use pypgsql, but i can't help but feel it's a little slow. 3 seconds to connect, send one query, get th return data. i'm on a adsl 1.5mbit/256kbit link, the server is on a 10/10mbit, and i have a ping of 245ms

Re: Listbox fill=BOTH expand=YES (Tkinter)

2005-03-17 Thread Raseliarison nirinA
"Christos TZOTZIOY Georgiou" wrote: > > the 'in' operator searches for existance of *elements* in a set, not > of *subsets*. BTW, only a frozenset can be included in a set. ah! yes. that's clear now. thanks! after all: >>> for element in aset: print element, why did i think that 'in'

Re: Simple account program

2005-03-17 Thread wes weston
Igorati wrote: Hello all, I am still needing some help on this code, I have gone a bit further on it. Thank you for the help. I am trying to understand how to make the file searchable and how I am to make the deposit and withdrawl interact with the transaction class. I need to just search the file

Re: Simple XML-to-Python conversion

2005-03-17 Thread news.sydney.pipenetworks.com
Lutz Horn wrote: [EMAIL PROTECTED] schrieb: I've been searching high and low for a way to simply convert a small XML configuration file to Python data structures. Take a look at Amara (http://uche.ogbuji.net/tech/4Suite/amara/). Lutz Amara rules xml to python conversions. I've used it successfully

Proposal for adding Shallow Threads and a Main Loop to Python

2005-03-17 Thread Rhamphoryncus
First a bit about myself. I've been programming in python several years now, and I've got several more years before that with C. I've got a lot of interest in the more theoretical stuff (language design, component architectures, etc). Of late my focus has been on concurrent operations (and on ho

Re: list of unique non-subset sets

2005-03-17 Thread Peter Otten
Steven Bethard wrote: > Can you just do: > > py> def uniq(lst): > ... result = [] > ... for s1 in sorted(lst, reverse=True): > ... for s2 in result: > ... if s1 <= s2: > ... break > ... else: > ... result.append(s1) > ... return 

Re: Simple account program

2005-03-17 Thread Ron
The indentation got messed up a bit, it should look like this. class Transaction: def __init__(self): self.name = '' self.amount = 0.0 self.type = '' class Account: def __init__(self, name=''): self.name = name self.ledger = [] def newtransaction(self

Re: sgmlop: malformed charrefs?

2005-03-17 Thread "Martin v. Löwis"
Fredrik Lundh wrote: are the PyXML folks shipping the latest sgmlop? I'm pretty sure they've forked the code (there's no UnicodeParser in the effbot.org edition), and I have no idea how things work in the fork. As we've forked the code, the answer is a clear "yes" :-) It certainly is the latest re

Re: Simple account program

2005-03-17 Thread Ron
Igorati wrote: Hello all, I am still needing some help on this code, I have gone a bit further on it. Thank you for the help. I am trying to understand how to make the file searchable and how I am to make the deposit and withdrawl interact with the transaction class. I need to just search the file

Re: newbie:unique problem

2005-03-17 Thread Heiko Wundram
On Thursday 17 March 2005 20:08, Leeds, Mark wrote: > But, I also want it to get rid of the AAA KP because > there are two AAA's even though the last two letters > are different. It doesn't matter to me which one > is gotten rid of but I don't know how to change > the function to handle this ? I ha

Re: list of unique non-subset sets

2005-03-17 Thread Steven Bethard
Kent Johnson wrote: Raymond Hettinger wrote: [EMAIL PROTECTED] I have many set objects some of which can contain same group of object while others can be subset of the other. Given a list of sets, I need to get a list of unique sets such that non of the set is an subset of another or contain exactl

Re: Simple account program

2005-03-17 Thread M.E.Farmer
Igorati, I wished I could give you a simple fix, BUT... You need to really re-read the docs and do some tutors first . Your understanding of classes and namespaces is flawed and will not become clear without futher study. search strategy: python namespaces python class python tutor Classes are li

Re: Writing C readable bitfield structs?

2005-03-17 Thread phark52
Anyone have any idea? [EMAIL PROTECTED] wrote: > Roy Smith wrote: > > In article <[EMAIL PROTECTED]>, > > Cappy2112 <[EMAIL PROTECTED]> wrote: > > >there is a bitfiled mainpulator class inthe Cookbook, but I don't > > >understand his explanation, and the example given doesn't really > show > > >of

Re: How to create datetime object from DbiDate (win32.odbc)?

2005-03-17 Thread Larry Bates
Frank Millman wrote: > Hi all > > I am using odbc from win32 extensions to connect to MS SQL Server. I > use mx.DateTime to handle dates. When I select a datetime column from > the database, odbc returns something called a DbiDate object. I cannot > find out any information on this type, but mx ca

Re: list of unique non-subset sets

2005-03-17 Thread Kent Johnson
Raymond Hettinger wrote: [EMAIL PROTECTED] I have many set objects some of which can contain same group of object while others can be subset of the other. Given a list of sets, I need to get a list of unique sets such that non of the set is an subset of another or contain exactly the same members.

Re: metaclass error

2005-03-17 Thread asteele
doh, that was the problem. :} thanks for the help! aaron -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie:unique problem

2005-03-17 Thread Brian van den Broek
Leeds, Mark said unto the world upon 2005-03-17 14:08: I have a function uniqueList that is below : Def uniqueList(origList): nodups= {} for temp in origList: nodups[temp] = None returns nodups.keys() When used in the following context : industryList = uniqueList(jpb

metaclass error

2005-03-17 Thread Aaron Steele
hi, i have a very simple package organized as follows: !-! bgp/ __init__.py managers/ __init__.py ManagerInterface.py TestManager.py !-! and here's ManagerInterface.py and TestMana

Re: metaclass error

2005-03-17 Thread F. Petitjean
Le 17 Mar 2005 12:27:07 -0800, [EMAIL PROTECTED] a écrit : > dear readers, > > i have a very simple package organized as follows: > > !-! > bgp/ > __init__.py > managers/ > __init__.py > ManagerInterface.py > Test

metaclass error

2005-03-17 Thread asteele
dear readers, i have a very simple package organized as follows: !-! bgp/ __init__.py managers/ __init__.py ManagerInterface.py TestManager.py !-! and here's ManagerInterfa

Re: list of unique non-subset sets

2005-03-17 Thread Raymond Hettinger
[EMAIL PROTECTED] > I have many set objects some of which can contain same group of object > while others can be subset of the other. Given a list of sets, > I need to get a list of unique sets such that non of the set is an > subset of another or contain exactly the same members. > > Tried to do t

Re: list of unique non-subset sets

2005-03-17 Thread Steven Bethard
[EMAIL PROTECTED] wrote: Hi, I have many set objects some of which can contain same group of object while others can be subset of the other. Given a list of sets, I need to get a list of unique sets such that non of the set is an subset of another or contain exactly the same members. Tried to do th

Re: Is Python like VB?

2005-03-17 Thread Marek Kubica
Hi! >> People coming from VB background probably also appreciate the ability >> to draw the UI in point&click style: >> >> http://gazpacho.sicem.biz/ >> http://wxglade.sourceforge.net/ >> >> Unfortunately these seem to still be a tad rough around the edges... wxGlade is a port of Glade (which is

list of unique non-subset sets

2005-03-17 Thread les_ander
Hi, I have many set objects some of which can contain same group of object while others can be subset of the other. Given a list of sets, I need to get a list of unique sets such that non of the set is an subset of another or contain exactly the same members. Tried to do the following: s1=set(['a'

Experienced Programmer needed to work on Python related projects

2005-03-17 Thread Sano, Marisa
Internet/Web Application Developers     Our client is a fast-growing and very successful player in the Internet space.  Their particular expertise is with on-demand email hosting.  They are looking for several excellent software engineers to help create the next generation of messaging solu

Re: Getting current variable name

2005-03-17 Thread Ron
Jeff Shannon wrote: Are you sure that you really need that single-element list? No I'm not sure, I thought I found a concdition where it made a difference while playing with it, but I don't recall just what circumstance it was? Don't forget, in Python, all names are references. You only have to

Re: wxPython vs. pyQt

2005-03-17 Thread Simon John
"so is there already a binary for qt/pyqt/eric3 available or when can i excpect qt4 to be released? " I think that pyqt4 is going to be a long way off, obviously further away than qt4. i have compiled qt 3.3.3/pyqt 3.1.3 using mingw/vcc6 for windows using the instructions i linked to in my previo

Re: Is Python like VB?

2005-03-17 Thread Cappy2112
Eric3 has been compiled for Windows, without Cygwin and Without a commercial license -- http://mail.python.org/mailman/listinfo/python-list

Re: Memory mapped File (Python win32 extensions)

2005-03-17 Thread Thomas Heller
"Srijit Kumar Bhadra" <[EMAIL PROTECTED]> writes: > Hello, > I see that it is possible to use mmapfile.pyd of win32all. The same is > mentioned in http://www.python.org/windows/win32/#mmapfile. > > Unfortunately I could not trace any example using mmapfile. > > Any example or link to an example wi

newbie:unique problem

2005-03-17 Thread Leeds, Mark
I have a function uniqueList that is below :   Def uniqueList(origList):       nodups= {}     for temp in origList:    nodups[temp]  = None     returns nodups.keys()   When used in the following context :   industryList = uniqueList(jpbarradata[group])   where jpbarradata[g

RE: How to create datetime object from DbiDate (win32.odbc)?

2005-03-17 Thread Robert Brewer
Frank Millman wrote: > I am using odbc from win32 extensions to connect to MS SQL Server. I > use mx.DateTime to handle dates. When I select a datetime column from > the database, odbc returns something called a DbiDate object. I cannot > find out any information on this type, but mx can convert it

Re: Getting current variable name

2005-03-17 Thread Lonnie Princehouse
> There should be an easier way that doesn't require stepping though the name list. Trying to find names bound to a particular object is a /very/ strange thing to want to do in Python. If this is for anything more than debugging diagnostics, it's probably better to use a dictionary explicitly for

Re: sgmlop: malformed charrefs?

2005-03-17 Thread Magnus Lie Hetland
In article <[EMAIL PROTECTED]>, Fredrik Lundh wrote: [snip] >are the PyXML folks shipping the latest sgmlop? I don't know. The last history entry marked fl is from 2000-07-05... Perhaps I should just get the effbot version. (And perhaps file a bug report about this behaviour in PyXML.) > I'm pre

Memory mapped File (Python win32 extensions)

2005-03-17 Thread Srijit Kumar Bhadra
Hello, I see that it is possible to use mmapfile.pyd of win32all. The same is mentioned in http://www.python.org/windows/win32/#mmapfile. Unfortunately I could not trace any example using mmapfile. Any example or link to an example will be of help. I am interested to learn how to achieve efficien

Re: Getting current variable name

2005-03-17 Thread Jeff Shannon
Ron wrote: def getvinfo(vars, v): """ vars is locals() v is [varable] Use an one item list to pass single varables by reference. """ for n in vars.keys(): if vars[n] is v[0]: return n, v[0], type(v[0]) a = 101 b = 2.3 c = True print getvinfo(locals(), [a]

Simple account program

2005-03-17 Thread Igorati
Hello all, I am still needing some help on this code, I have gone a bit further on it. Thank you for the help. I am trying to understand how to make the file searchable and how I am to make the deposit and withdrawl interact with the transaction class. I need to just search the file only for the d

REPOST: Re: Python becoming less Lisp-like

2005-03-17 Thread Ville Vainio
> "Torsten" == Torsten Bronger <[EMAIL PROTECTED]> writes: >>> There would be keywords for static and class methods, no >>> distinction between Unicode and non-Unicode >> You couldn't do that 15 years ago because there were no Unicode >> that time. Torsten> I've never sai

REPOST: Re: Python becoming less Lisp-like

2005-03-17 Thread Ville Vainio
> "Tim" == Tim Daneliuk <[EMAIL PROTECTED]> writes: Tim> Except that in this case, removal will also complicate code Tim> in some cases. Consider this fragment of Tkinter logic: Tim> UI.CmdBtn.menu.add_command(label="MyLabel", Tim> command=lambda cmd=cmdkey: CommandMenuSelect

Re: sgmlop: malformed charrefs?

2005-03-17 Thread Fredrik Lundh
Magnus Lie Hetland wrote: >>if you have a handle_entityref hook, but no handle_charref, the part between >>& and ; is passed to handle_entityref. > > Strange. It doesn't seem to work that way for me... Here is an example: > > from xml.parsers.sgmlop import SGMLParser, XMLParser, XMLUnicodeParser

Re: A Q. on pop().

2005-03-17 Thread Duncan Booth
spencer wrote: > first Q.. Why is pop() starting from the back > back of the stack? Because that is what it does. Try reading the documentation: >>> help(list.pop) Help on method_descriptor: pop(...) L.pop([index]) -> item -- remove and return item at index (default last) > sec

Re: MySQL problem

2005-03-17 Thread wes weston
Lad wrote: I have the following program( only insert a record) import MySQLdb conn = MySQLdb.connect (host = "localhost",user = "", passwd = "",db="dilynamobily") cursor = conn.cursor () cursor.execute("""CREATE TABLE produkt1 ( id int(10) unsigned NOT NULL auto_increment, MyNu

Re: Obfuscated Python: fun with shadowing builtins

2005-03-17 Thread fraca7
Michael Hoffman wrote: Enjoy ;) That's not the exact word that first came to my mind :) -- http://mail.python.org/mailman/listinfo/python-list

MySQL problem

2005-03-17 Thread Lad
I have the following program( only insert a record) import MySQLdb conn = MySQLdb.connect (host = "localhost",user = "", passwd = "",db="dilynamobily") cursor = conn.cursor () cursor.execute("""CREATE TABLE produkt1 ( id int(10) unsigned NOT NULL auto_increment, MyNumber varcha

Re: Is Python like VB?

2005-03-17 Thread James
> We have almost finished Windows form designer support in SharpDevelop > IDE for boo, a .NET language similar to Python. But still in your case > I'd just use VB.NET since you are familiar with VB and all .NET > languages are pretty comparable. Wow! That's great news. I saw a few days ago an ol

A Q. on pop().

2005-03-17 Thread spencer
Hi, The code. def buildStackMajor(): for node in dirStackMinor: #print 's is the node...', node dirStackMajor.append(node) dirStackMinor.pop() print 'POP the stack...', len(dirStackMinor) print 'after pop...', dirStackMinor When I start the "for" loop I

Re: super with only one argument

2005-03-17 Thread Michele Simionato
``super`` with only one argument ("bound" super) is a mess. AFAICT ``super(C)`` is intended to be used as an attribute in other classes. Then the descriptor magic will automatically convert the unbound syntax in the bound syntax. For instance: >>> class B(object): ... a = 1 >>> class C(B): .

Re: Obfuscated Python: fun with shadowing builtins

2005-03-17 Thread Fuzzyman
very good. Regards, Fuzzy http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: I can do it in sed...

2005-03-17 Thread Kent Johnson
Kotlin Sam wrote: Also, I frequently use something like s/^[A-Z]/~&/ to pre-pend a tilde or some other string to the beginning of the matched string. I know how to find the matched string, but I don't know how to change the beginning of it while still keeping the matched part. Something like

Re: Splitting with Regular Expressions

2005-03-17 Thread Fredrik Lundh
"qwweeeit" <[EMAIL PROTECTED]> wrote: > Splitting with RE has (for me!) misterious behaviour! > > I want to get the words from this string: > s= 'This+(that)= a.string!!!' > > in a list like that ['This', 'that', 'a.string'] > considering "a.string" as a word. print re.findall("[\w.]+", s)

Re: Splitting with Regular Expressions

2005-03-17 Thread Paul McGuire
A pyparsing example may be less mysterious. You can define words to be any group of alphas, or you can define a word to be alphas concatenated by '.'s. scanString is a generator that scans for matches in the input string and returns the matching token list, and the start and end location of the m

Re: sgmlop: malformed charrefs?

2005-03-17 Thread Magnus Lie Hetland
In article <[EMAIL PROTECTED]>, Fredrik Lundh wrote: >Magnus Lie Hetland wrote: [snip] >with sgmlop 1.1, the following script > >class entity_handler: >def handle_entityref(self, entityref): >print "ENTITY", repr(entityref) > >parser = sgmlop.XMLParser() >parser.register(entity_handler(

Re: ConfigParser

2005-03-17 Thread Fuzzyman
Hmm interesting situation. The following will work with ConfigObj : [Passwords] "2:5020/758" "2:5020/794" http://www.voidspace.org.uk/python/configobj.html Regards, Fuzzy -- http://mail.python.org/mailman/listinfo/python-list

Re: GUI toolkit question

2005-03-17 Thread Harry George
[EMAIL PROTECTED] writes: > I'm building an app that operates on tuples (typically pairs) of > hierarchical structures, and i'd like to add a GUI to display my > internal representation of them, and simplify manipulations/operations > on them. My requirements are: > > 1) Draw a single 3D repres

tkinter: call root.after from a thread?

2005-03-17 Thread Benjamin Rutt
Let's say we have root = Tk() ... root.mainloop() Is a safe to call the method root.after(...) from a separate thread? (The registered callback updates the GUI). I know you're supposed to avoid calling methods such as pack(), etc. from a thread, but I was wondering if calling root.after() would

Re: Splitting with Regular Expressions

2005-03-17 Thread Thomas Guettler
Am Thu, 17 Mar 2005 06:51:19 -0800 schrieb qwweeeit: > Splitting with RE has (for me!) misterious behaviour! > > I want to get the words from this string: > s= 'This+(that)= a.string!!!' > > in a list like that ['This', 'that', 'a.string'] > considering "a.string" as a word. Hi, try this: re.

Re: super with only one argument

2005-03-17 Thread Greg Chapman
Greg Chapman wrote: > Steven Bethard wrote: > > > When would you call super with only one argument? The only examples > > I can find of doing this are in the test suite for super. > > > > I think it's to allow something like this: > > class A(B, C): > __super = super(A) > def foo(self

PyCon: Request for Video Cameras

2005-03-17 Thread LD \"Gus\" Landis
Hello, We are needing a couple additional video cameras to ensure that we can capture the presentations at PyCon 2005. MiniDV is the preferred format, but as long as you can capture your video to a common video format on a hard disk, that is acceptable. If you are a candidate parti

Re: Is Python like VB?

2005-03-17 Thread D H
Mike Cox wrote: As you may or may not know, Microsoft is discontinuing Visual Basic in favor of VB.NET and that means I need to find a new easy programming language. I heard that Python is an interpreted language similar to VB. This means that it doesn't have all the hard stuff like pointers, cla

How to create datetime object from DbiDate (win32.odbc)?

2005-03-17 Thread Frank Millman
Hi all I am using odbc from win32 extensions to connect to MS SQL Server. I use mx.DateTime to handle dates. When I select a datetime column from the database, odbc returns something called a DbiDate object. I cannot find out any information on this type, but mx can convert it to a mx.DateTime obj

Splitting with Regular Expressions

2005-03-17 Thread qwweeeit
Splitting with RE has (for me!) misterious behaviour! I want to get the words from this string: s= 'This+(that)= a.string!!!' in a list like that ['This', 'that', 'a.string'] considering "a.string" as a word. Python 2.3.4 (#2, Aug 19 2004, 15:49:40) [GCC 3.4.1 (Mandrakelinux (Alpha 3.4.1-3mdk)]

Re: wxPython vs. pyQt

2005-03-17 Thread Ken Godee
tc wrote: Has anyone compiled binaries for qt/pyqt/eric3. i'd really like to try it. at the moment i work with wxWindows and BoaConstructor which i'm actually not so happy with. design of gui's with wx is not very efficient... so is there already a binary for qt/pyqt/eric3 available or when can i e

  1   2   >