Re: Is Python like VB?

2005-03-17 Thread James
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. VB is not interpreted. Sure! You can compile it to P-Code if yo

Re: Python becoming less Lisp-like

2005-03-17 Thread Ville Vainio
> "Mike" == Mike Meyer <[EMAIL PROTECTED]> writes: Mike> The real problem is that newbies won't know which features Mike> are "meta" features best left to experts, and which features Mike> are ok for everyday programmers to use. I suppose that a typical lazy newbie will just skip

Re: computing a weighted sum

2005-03-17 Thread Raymond Hettinger
[Christos TZOTZIOY Georgiou] > Anyway, a functional equivalent: > > .>> from itertools import starmap, izip > .>> import operator > .>> x= [1,2,3,4] > .>> w=[3.0, 6.0, 9.0, 12.0] > .>> sum(starmap(operator.mul, izip(x,w))) > 90.0 Gack! starmap() is only for situations where the data is already in

Re: Is Python like VB?

2005-03-17 Thread James
>> VB has a much better IDE than the IDE's for Python, although Eric3 is one of the best, and is absolutely free. There is no binary distribution for Eric3 on MS Windows. The OP sounds like he is an exclusively windows programmer. While we are on topic, is there no one in the Python open source c

Re: Is Python like VB?

2005-03-17 Thread Joe
On Wed, 16 Mar 2005 21:33:36 -0800, "Mike Cox" <[EMAIL PROTECTED]> wrote: >Where I work we use Microsoft Office with a lot of customization using >Visual Basic. I would like to switch to Python to do it since VB is being >discontinued. Would Python meet our requirements? I need to make lots of >

Re: Python becoming less Lisp-like

2005-03-17 Thread Paul Boddie
Mike Meyer <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > > The real problem is that newbies won't know which features are "meta" > features best left to experts, and which features are ok for everyday > programmers to use. I think the original contributor to this thread was f

psyco install problem

2005-03-17 Thread Buday Gergely
Hi, I run an ubuntu hoary linux. I have psyco installed as apt-get says, but when I launch python and try "import psyco" it does not find. I have tried "locate psyco" to find its source or compiled version without success. Is this a known bug in the python2.4-psyco debian package? - Gergely --

Re: Python becoming less Lisp-like

2005-03-17 Thread Paul Boddie
"Kay Schluehr" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > > Some people refused properties in Python for exactly this reason. > Defining somewhat like: > > def _get_X(self): > return self._X > > def _set_X(self,X): > self._X =3D X > > X =3D property(_get_X, _set_

Static parameter count

2005-03-17 Thread Tertius Cronje
Hi all, This does not feel Pythonic. Is there a better way to do the same? Many TIA T # L = [1,2,3,4,5,6, etc] # L can contain 'n' elements # fmt is made up to each particular specification if len(L) == 0: return ''

Re: Is Python like VB?

2005-03-17 Thread Gregor Horvath
James wrote: You will probably find migrating to VB.NET easier than to Python if you have to do WYSIWYG data bound form design. VB.NET is quite a nice language (I personally prefer C#). Much nicer than VB6. Python is better but it may not meet YOUR needs infrastructure wise. This is more a strategi

Re: Python becoming less Lisp-like

2005-03-17 Thread Peter Maas
Kay Schluehr schrieb: Some people refused properties in Python for exactly this reason. Defining somewhat like: def _get_X(self): return self._X def _set_X(self,X): self._X = X X = property(_get_X, _set_X ) in a Java-style fashion is indeed awfull and clumsy and that people dismiss such boi

Re: Static parameter count

2005-03-17 Thread Ola Natvig
Tertius Cronje wrote: Hi all, This does not feel Pythonic. Is there a better way to do the same? Many TIA T # L = [1,2,3,4,5,6, etc] # L can contain 'n' elements # fmt is made up to each particular specification if len(L) == 0: return '' el

Re: Is Python like VB?

2005-03-17 Thread Groleo Marius
Maybe you should ask : Is VB like Python ( remark the ) On 17 Mar 2005 09:45:22 +0200, Ville Vainio <[EMAIL PROTECTED]> wrote: > > "Cappy" == Cappy2112 <[EMAIL PROTECTED]> writes: > > Cappy> VB has a much better IDE than the IDE's for Python, > Cappy> although Eric3 is one

Re: Is Python like VB?

2005-03-17 Thread James
Before we discuss this any further, I suggest that you guys take a look at OP's posts in comp.os.linux.advocacy. I think we all regulars here know where VB and Python stand. Let's not take bait on this one. -- http://mail.python.org/mailman/listinfo/python-list

RE: Static parameter count

2005-03-17 Thread Tertius Cronje
> > elif len(L) == 5: > > return struct.pack(fmt,L[0] , L[1], L[2], L[3], L[4]) > > elif len(L) == 6: > > return struct.pack(fmt,L[0] , L[1], L[2], L[3], L[4], L[5]) > > > > # etc... etc... etc ... > > return struct.pack(fmt, *L) > > Should do the trick

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

2005-03-17 Thread TZOTZIOY
On Thu, 17 Mar 2005 00:54:46 +0300, rumours say that "Raseliarison nirinA" <[EMAIL PROTECTED]> might have written: >i'll recite 42 times precedence rules before going to bed. >but now i'm a bit confused by the -in- operator. as: > >>>> set(['TRUE','YES']).issubset(set(dir(Tkconstants))) >T

Re: wxPython vs. pyQt

2005-03-17 Thread Giovanni Bajo
[EMAIL PROTECTED] wrote: > I've narrowed down my toolkit selection for my project to wxPython and > pyQt, and now i'd like to hear any opinions, war stories, peeves, etc, > about them, particularly from anyone who's used _both_toolkits_. I'm > only mildly interested in the IDEs and UI designers fo

Re: Itertools wishlists

2005-03-17 Thread TZOTZIOY
On Thu, 17 Mar 2005 06:09:44 GMT, rumours say that "Raymond Hettinger" <[EMAIL PROTECTED]> might have written: [snip] >> Did I make you believe I cared about the fate of any function judged unworthy >> even for the documentation? > >No. My note was mainly for the benefit of those who had an inte

Re: computing a weighted sum

2005-03-17 Thread TZOTZIOY
On Thu, 17 Mar 2005 08:11:11 GMT, rumours say that "Raymond Hettinger" <[EMAIL PROTECTED]> might have written: >[Christos TZOTZIOY Georgiou] >> Anyway, a functional equivalent: >> >> .>> from itertools import starmap, izip >> .>> import operator >> .>> x= [1,2,3,4] >> .>> w=[3.0, 6.0, 9.0, 12.0] >

Re: Why tuple with one item is no tuple

2005-03-17 Thread Antoon Pardon
Op 2005-03-16, Diez B. Roggisch schreef <[EMAIL PROTECTED]>: >> That ambiguity is only caused because python uses the same characters >> for very different operations and to be honest I don't like that. > > As I said: show me which parentheses to use - and keep in mind that: > > - < and > are for

Re: wxPython vs. pyQt

2005-03-17 Thread tc
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 excpect qt

Re: ElementTree, how to get the whole content of a tag

2005-03-17 Thread Fredrik Lundh
Damjan wrote: >>> Is there any way I could get everything between the and tag? >>> >>> >>> text >>> some other text >>> and then some more >>> > > gettext(et) >> '\n text\n some other text\n and then some more\n' > > I acctually need to get > '\n text\n some other text\n and then

sgmlop: malformed charrefs?

2005-03-17 Thread Magnus Lie Hetland
According to The Sgmlop Module Handbook [1], the handle_entityref() callback is called for "malformed character entities". What does that mean, exactly? What is a malformed character entity? I've tried mis-spelling them (e.g., dropping the semicolon), but then they're (quite naturally) treated as t

Re: I can do it in sed...

2005-03-17 Thread Ville Vainio
> "Damjan" == Damjan <[EMAIL PROTECTED]> writes: Damjan> Or, much nicer >> if line[:5]=='start': printing=1 Damjan> if line.startswith('start'): printing=1 >> if line[:3]=='end': printing=0 Damjan> if line.endswith('end'): printing=0 No, it's still line.startswith('e

Re: I can do it in sed...

2005-03-17 Thread Ville Vainio
> "John" == John Machin <[EMAIL PROTECTED]> writes: John> You can get gnu Windows versions of awk sed and most other John> suchlike goodies off the net ... Yeah, google for 'unxutils'. Cygwin versions of these tools can be a headache sometimes. -- Ville Vainio http://tinyurl.com/2

Re: Python becoming less Lisp-like

2005-03-17 Thread Antoon Pardon
Op 2005-03-16, Jeff Shannon schreef <[EMAIL PROTECTED]>: > news.sydney.pipenetworks.com wrote: > >> More in relation to the original topic, why can't people just ignore >> features they don't understand and may never use directly. > > Because they may get stuck maintaining code that uses those fe

Re: sgmlop: malformed charrefs?

2005-03-17 Thread Fredrik Lundh
Magnus Lie Hetland wrote: > According to The Sgmlop Module Handbook [1], the handle_entityref() > callback is called for "malformed character entities". What does that > mean, exactly? What is a malformed character entity? I've tried > mis-spelling them (e.g., dropping the semicolon), but then they

Re: I can do it in sed...

2005-03-17 Thread TZOTZIOY
On Wed, 16 Mar 2005 19:06:40 -0600, rumours say that Terry Hancock <[EMAIL PROTECTED]> might have written: >You mean you have a text file and you want to find all the lines between >a line starting with "start" and one starting with "end". >lines = open('myfile', 'r').readlines() >printing =

Re: Why tuple with one item is no tuple

2005-03-17 Thread Diez B. Roggisch
> So python choose a non-deterministic direction. To me (2,3) + (4,5) > equals (6,8). I don't dispute that having an operator to combine > (2,3) and (4,5) in (2,3,4,5) is usefull, but they should never have > used the "+" for that. It certainly did not choose a nondeterministic action - that would

Re: Simple XML-to-Python conversion

2005-03-17 Thread Lutz Horn
[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 -- pub 1024D/6EBDA359 1999-09-20 Lutz Horn <[EMAIL PROTECTED]> Key fingerprint =

Re: Simple XML-to-Python conversion

2005-03-17 Thread [EMAIL PROTECTED]
Amara does indeed make it effortless to transform an XML document into a Python structure. Unfortunately this suggestion requires the 3rd party software, Amara, _and_ a 4Suite installation according to the website. The reason I can't expect users to have 3rd party tools is because this tool will

Re: Simple XML-to-Python conversion

2005-03-17 Thread Tim Jarman
[EMAIL PROTECTED] wrote: > Amara does indeed make it effortless to transform an XML document into > a Python structure. Unfortunately this suggestion requires the 3rd > party software, Amara, _and_ a 4Suite installation according to the > website. > > The reason I can't expect users to have 3rd

Re: Simple XML-to-Python conversion

2005-03-17 Thread [EMAIL PROTECTED]
A good question... Here's a followup question: Does third-party software compile as well as the built-in modules when using distutils and the py2exe extension module? -- http://mail.python.org/mailman/listinfo/python-list

ConfigParser

2005-03-17 Thread Sergey
Is there an alternative to standard module ConfigParser, which can use delimitier symbol other than ":" and "=", preferaby just space? I need to parse such configs: [Passwords] 2:5020/758 2:5020/794 ConfigParser is not able to work with option names which contain symbol ':' It is not d

Re: Simple XML-to-Python conversion

2005-03-17 Thread Thomas Guettler
Am Wed, 16 Mar 2005 14:19:49 -0800 schrieb [EMAIL PROTECTED]: > I've been searching high and low for a way to simply convert a small > XML configuration file to Python data structures. I came across gnosis > XML tools, but need a built-in option for doing something similar. > > My knowledge of D

Re: Simple XML-to-Python conversion

2005-03-17 Thread Fredrik Lundh
"[EMAIL PROTECTED]" wrote: > I've been searching high and low for a way to simply convert a small > XML configuration file to Python data structures. I came across gnosis > XML tools, but need a built-in option for doing something similar. > > My knowledge of DOM and anything beyond simple XML st

Re: ConfigParser

2005-03-17 Thread Larry Bates
Sergey wrote: > Is there an alternative to standard module ConfigParser, which can use > delimitier symbol other than ":" and "=", preferaby just space? > I need to parse such configs: > > [Passwords] > 2:5020/758 > 2:5020/794 > > ConfigParser is not able to work with option names whic

Re: Is Python like VB?

2005-03-17 Thread Matthew
"Mike Cox" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > 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. Thi

Re: ConfigParser

2005-03-17 Thread Serge Orlov
Sergey wrote: > Is there an alternative to standard module ConfigParser, which can > use delimitier symbol other than ":" and "=", preferaby just space? > I need to parse such configs: > > [Passwords] > 2:5020/758 > 2:5020/794 > > ConfigParser is not able to work with option names which c

Re: Python becoming less Lisp-like

2005-03-17 Thread Thomas Bellman
Jeff Shannon <[EMAIL PROTECTED]> wrote: > Because they may get stuck maintaining code that uses those features. > Now, I'm generally in agreement with you -- in general, Python > features that aren't straightforward (e.g. metaclasses) are clearly > advanced features and aren't likely to be in

Re: Simple XML-to-Python conversion

2005-03-17 Thread Premshree Pillai
On Thu, 17 Mar 2005 12:39:42 +0100, Lutz Horn <[EMAIL PROTECTED]> 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. If using XML is not absolutely essential, you might want to take a lo

minidom get Element value

2005-03-17 Thread Scott F
Hi all, Today's embarassingly simple question goes like this. I have a file, testdoc.xml, to parse. Inside the file is an element Yo, Ho, Ho So, starting with [code] from xml.dom import minidom xmldoc = minidom.parse('home\me\testdoc.xml') [/code] therefrain = getTagsByName('refra

Importing package modules from C-extension

2005-03-17 Thread Mark English
Basic problem: If there is a C-extension module in a package and it tries to import another python module in the same package without using the fully qualified path, the import fails. Config: Python 2.4 on Windows 2000 For example: mypackage contains: cextension_example.pyd to_be_imported.py

Re: wxPython vs. pyQt

2005-03-17 Thread foobar
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

Re: super with only one argument

2005-03-17 Thread Greg Chapman
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): return self.__super.foo() This

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

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)]

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

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

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: 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

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.

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: 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

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: 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: 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: 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: 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: 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: 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): .

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: 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

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: 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

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: 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: 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

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

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

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

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]

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: 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

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: 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

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: 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

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: 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: 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

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

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'

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

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: 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

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: 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 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: 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

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: 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: 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: 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: 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: 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: 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: 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: 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
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

  1   2   >