Re: How do these Java concepts translate to Python?

2005-08-12 Thread Ray
Thanks guys! Your explanations have cleared up things significantly. My transition from C++ to Java to C# was quite painless because they were so similar, but Python is particularly challenging because the concepts are quite different. (I always have this paranoid feeling: Am I using Python to

Buglet in win32 odbc

2005-08-12 Thread Frank Millman
Hi all I am using win32 odbc to connect to SQL Server. I have just started using the 'bit' data type, which is a boolean type which can store 1 or 0. This works with win32, but it returns '1' or '0'. Obviously I can change it to an int, but it would be nicer and more correct if it returned an

Re: Python supports LSP, does it?

2005-08-12 Thread en.karpachov
On Thu, 11 Aug 2005 15:02:08 -0400 Terry Reedy wrote: I remember discussion of the LSP on comp.object some years ago when I was reading it. (I presume there still are, just don't read it anymore.). One of the problems is that biology and evolution do not obey it. Birds (in general) can

Where can be a problem?

2005-08-12 Thread Lad
I use the following ### import re Results=[] data1='a href=detailaspxmember=15015mode=advert /aa href=detailaspxmember=15016mode=advert /aa href=detailaspxmember=15017mode=advert /a' ID = re.compile(r'^.*=(\d+).*$',re.MULTILINE) Results=re.findall(ID,data1) print Results #

Re: signals (again)

2005-08-12 Thread bill
I found a good solution to this problem in Richard Steven's _Network_Programming_. It seems like everything shows up in Steven's books! Rather than pausing, you do a blocking read on a pipe. You only write to the pipe from within the signal handler. However, this brings up the better question:

Re: set of sets

2005-08-12 Thread Matteo Dell'Amico
Paolo Veronelli wrote: Yes this is really strange. from sets import Set class H(Set): def __hash__(self): return id(self) s=H() f=set() #or f=Set() f.add(s) f.remove(s) No errors. So we had a working implementation of sets in the library an put a broken one in the

Re: NEWB: General purpose list iteration?

2005-08-12 Thread Peter Otten
Donald Newcomb wrote: I was wondering it there's a simple routine (I think I can write a recurisve routine to do this.) to scan all the elements of a list, descending to lowest level and change something. What I'd like to do today is to convert everything from string to float. So, if I had a

Re: Where can be a problem?

2005-08-12 Thread Peter Otten
Lad wrote: I use the following ### import re Results=[] data1='a href=detailaspxmember=15015mode=advert /aa href=detailaspxmember=15016mode=advert /aa href=detailaspxmember=15017mode=advert /a' ID = re.compile(r'^.*=(\d+).*$',re.MULTILINE) Results=re.findall(ID,data1) print

Cheese shop (was Re: python2.4/site-packages)

2005-08-12 Thread Michael Hoffman
Lucas Raab wrote: Michael Hoffman wrote: http://www.python.org/pypi This used to be called the Python Package index but is now the Python Cheese Shop? Huh??? You've never heard the Cheese Shop Sketch by Monty Python?? I have but I've never heard of PyPI's name being changed? I can only

Re: net view /domain

2005-08-12 Thread usenet
Hi Tim! Thanks again for your help! I just tried it out and it does exactly what I want it to do :-) Have a nice day! Dirk -- http://mail.python.org/mailman/listinfo/python-list

Re: Why does __init__ not get called?

2005-08-12 Thread Fuzzyman
If you subclass strings you have to do your magic in __new__ rather than __init__. It receives the same arguments as you would normally expect to go to __init__. (Except cls rather than self). Best Regards, Fuzzy http://www.voidspace.org.uk/python --

Re: Cheese shop (was Re: python2.4/site-packages)

2005-08-12 Thread Erik Max Francis
Michael Hoffman wrote: I have but I've never heard of PyPI's name being changed? I can only find an announcement on Slashdot? I came across the change a good while back in my Web referrals, not having heard of it except passively. PyPI was a simple, clear, unambiguous name; Cheese Shop is

Re: Regular expression to match a #

2005-08-12 Thread Duncan Booth
John Machin wrote: The point was made in a context where the OP appeared to be reading a line at a time and parsing it, and re.compile(r'something').match() would do the job; re.compile(r'^something').search() will do the job too -- BECAUSE ^ means start of line anchor -- but somewhat

Re: Regular expression to match a #

2005-08-12 Thread Duncan Booth
John Machin wrote: Your wording makes it hard to distinguish what exactly is dopey. dopey implementations of search() (which apply match() at offsets 0, 1, 2, .). The dopiness is that the ^ operator means that the pattern cannot possibly match starting at 1, 2, 3, etc but a

Re: Why is this?

2005-08-12 Thread Matt Hammond
On Fri, 12 Aug 2005 00:10:08 +0100, John Hazen [EMAIL PROTECTED] wrote: [[], []] is [[]]*2 True Just curious, did you actually cut and paste this from a real interactive session? (I think not.) My interpreter (yes, I know it's old) gives: Ooops - you're absolutely right. I was cutting

Re: How do these Java concepts translate to Python?

2005-08-12 Thread bruno modulix
Ray wrote: Hello, I've been learning Python in my sparetime. I'm a Java/C++ programmer by trade. So I've been reading about Python OO, and I have a few questions that I haven't found the answers for :) 1. Where are the access specifiers? (public, protected, private) object.name = public

Re: How do these Java concepts translate to Python?

2005-08-12 Thread bruno modulix
Devan L wrote: Fausto Arinos Barbuto wrote: Ray wrote: 1. Where are the access specifiers? (public, protected, private) AFAIK, there is not such a thing in Python. ---Fausto Well, technically you can use _attribute to mangle it, __attribute would work better !-) but technically

win32com: use not possible as normal user

2005-08-12 Thread Sibylle Koczian
Hello, I've installed Python 2.4 and the win32 extensions, using administrator rights, under Windows XP in C:\Programme. As this is a directory without spaces I didn't expect any problems. But now I can't _use_ win32com as a normal user, because normal users can't write there: PythonWin 2.4.1

Re: Spreadsheet with Python scripting and database interface?

2005-08-12 Thread Wolfgang Keller
Hello, and thanks for your reply. One thing that's not clear from your question is whether you want to script the office from within using a macro or from the outside via remote control. What I basically dream of is using Python as THE embedded macro language of the spreadsheet. Because

Re: How do these Java concepts translate to Python?

2005-08-12 Thread bruno modulix
Ray wrote: Fausto Arinos Barbuto wrote: Ray wrote: 1. Where are the access specifiers? (public, protected, private) AFAIK, there is not such a thing in Python. So everything is public? I know that you can prefix a member with underscores to make something private, The 2 leadings

Re: Psyco Linux

2005-08-12 Thread Jeremy Sanders
Fausto Arinos Barbuto wrote: The specifics of my system are: Athlon AMD-64 3300+ SuSE 9.3 Professional (64-bit) Python 2.4 gcc/g++ 3.3.5 Ummm... I thought psyco only supported 32 bit systems. I haven't seen anything else to suggest otherwise. See

Re: What are modules really for?

2005-08-12 Thread Tito
bruno modulix wrote: Magnus Lycka wrote: N.Davis wrote: Functions existing in a module? Surely if everything is an object (OK thats Java-talk but supposedly Python will eventually follow this too) int too? ;) Yes, int too. I think he is talking about *Java* int. Regards, Tito --

__getattribute__ for class object

2005-08-12 Thread Sylvain Ferriol
hello when i define __getattribute__ in a class, it is for the class instances but if i want to have a __getattribute__ for class attributes how can i do that ? sylvain -- http://mail.python.org/mailman/listinfo/python-list

Re: What are modules really for?

2005-08-12 Thread Magnus Lycka
bruno modulix wrote: Magnus Lycka wrote: N.Davis wrote: Functions existing in a module? Surely if everything is an object (OK thats Java-talk but supposedly Python will eventually follow this too) int too? ;) Yes, int too. I was talking about everything being an object in Java...

Re: What are modules really for?

2005-08-12 Thread Magnus Lycka
Terry Reedy wrote: However, everything is an instance of a class or type. Except whitespace, comments, operators and statements! (Did I miss anything?) You can obviously argue whether a variable (or name if you like) is an object, or just refers to an object, but then we're getting

Re: How to quit a Windows GUI program gracefully with Python under Cygwin?

2005-08-12 Thread KB
Thanks. After I confirmed 'Alt-F4' would terminate and close a win32 application running independently, I installed 'SendKeys' module and tested with the following code under both Cygwin and Python Windows import os, SendKeys os.system('program datafile') SendKeys.SendKeys( {PAUSE 0.25}

Re: How to Adding Functionality to a Class by metaclass(not by inherit)

2005-08-12 Thread Paolino
Dont' know where are you going with that but if what you need is cancelling some attributes when inheriting then probably this is a cleaner approach: class Meta(type): def __init__(cls, name, bases, dic): def attributeError(*_): raise AttributeError for base in bases:

Re: __getattribute__ for class object

2005-08-12 Thread Paolino
Sylvain Ferriol wrote: hello when i define __getattribute__ in a class, it is for the class instances but if i want to have a __getattribute__ for class attributes how can i do that ? Skating on thin ice eh.Read something on metaclasses. class Meta(type): def

pywin32 from network install

2005-08-12 Thread agostino . russo
I managed to make pywin32 work from a network installation (not really hard work: a shared folder + copying some dlls + setting PYTHONPATH). PythonWin amd COM seem to be working fine from the network install, BUT when I need to pass PyTime to a COM object expecting a Date I get the following

how do i make exteranl module work under debug session?

2005-08-12 Thread Wen
Hi guys! I'm writing a small DLL thingy that requieres the use of loading the Python interpreter and executing a series of scripts. I have generated an interface to my dll with SWIG and put it in. It works like this: 1) a small .exe loads the .dll and calls the main init() function 2) the dll

Re: pywin32 from network install

2005-08-12 Thread Neil Benn
[EMAIL PROTECTED] wrote: I managed to make pywin32 work from a network installation (not really hard work: a shared folder + copying some dlls + setting PYTHONPATH). PythonWin amd COM seem to be working fine from the network install, BUT when I need to pass PyTime to a COM object expecting a Date

Re: Help sorting a list by file extension

2005-08-12 Thread Cyril Bazin
Maybe simpler but not very much simpler: one line for each solution. And in your solution the lambda is evaluated at each comparaison of the sort algorithm isn't it? So your code seems less productive than the bengt's code which apply the same code as the lambda only one time by entry in the

Re: What is Python?!

2005-08-12 Thread Martin P. Hellwig
Magnus Lycka wrote: cut or what have you. How do you sell this without making it sound like snake oil? (Particularly with that name! :) cut JediMindTrick This *is* the languange you are looking for ... /JediMindTrick Stops the argument every time, although afterwards they look kind a

Re: Jargons of Info Tech industry

2005-08-12 Thread Ulrich Hobelmann
Jürgen Exner wrote: Just for the records at Google et.al. in case someone stumbles across Xah's masterpieces in the future: Xah is very well known as the resident troll in many NGs and his 'contributions' are less then useless. And you are the resident troll-reply service, posting this reply

Re: __getattribute__ for class object

2005-08-12 Thread Dan
but if i want to have a __getattribute__ for class attributes Read something on metaclasses. Depending on what you want to do, it might be better to use properties instead: class Meta(type): x = property(lambda klass: 'Called for '+str(klass)) class Foo(object):

Help with wxPython

2005-08-12 Thread mitsura
Hi, I have encountered an annoying problem with wx.Choice from wx.Python. Basically, what I want to do is create a drop down box with a set of choices (so far so good). The problem is that when the drop down box is created, the first entry in the list of the drop down box is empty and you need to

Re: Why is this?

2005-08-12 Thread Peter Mott
If I use concatenation + instead of multiplication * then I get the result that Jiri expected: L = [[]] + [[]] L[1].append(1) L [[], [1]] With * both elements are changed: L = [[]] * 2 L[1].append(1) L [[1], [1]] Alex Martelli says in his excellent Nutshell book that + is

Re: len(sys.argv) in (3,4)

2005-08-12 Thread Magnus Lycka
Daniel Schüle wrote: I just tried the same code at home and it worked fine it has to do with windows .. some settings or whatever (python 2.4.1 installed on both) maybe someone have experienced the same problem and had more luck in solving the puzzle First of all: Windows is a whole family

Re: NEWB: General purpose list iteration?

2005-08-12 Thread Donald Newcomb
Devan L [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] This will just do_something(object) to anything that is not an iterable. Only use it if all of your nested structures are of the same depth. Cool! I'll try it. -- Donald Newcomb DRNewcomb (at) attglobal (dot) net --

bug in property?

2005-08-12 Thread Damir Hakimov
#!/usr/bin/python2.4 class test_property: def __init__(self): self._x=Zero pass def setx(self,x): print set x #this is not work self._x=x def getx(self): return self._x def delx(self): del(self._x) x=property(getx,setx,delx,XXX)

Re: Jargons of Info Tech industry

2005-08-12 Thread Thomas Fritsch
Xah Lee wrote: [...] My time is limited, so i'll just give a brief explanation of my thesis [...] This is what psychology calls a disordered self-perception. -- Thomas:Fritsch$ops:de.replace(':','.').replace('$','@') -- http://mail.python.org/mailman/listinfo/python-list

Re: bug in property?

2005-08-12 Thread Simon Brunning
On 8/12/05, Damir Hakimov [EMAIL PROTECTED] wrote: #!/usr/bin/python2.4 class test_property: def __init__(self): self._x=Zero pass def setx(self,x): print set x #this is not work self._x=x def getx(self): return self._x def delx(self):

Re: pywin32 from network install

2005-08-12 Thread agostino . russo
Hmm I have the same problem using python -E... Moreover I do not see anything strange in the sys.path (Z\LocalApps is my shared folder): 'Z:\\LocalApps\\examples', 'Z:\\LocalApps\\python\\python24.zip', 'Z:\\LocalApps\\examples', 'Z:\\LocalApps\\python\\DLLs', 'Z:\\LocalApps\\python\\lib',

Re: Why is this?

2005-08-12 Thread Duncan Booth
Peter Mott wrote: If I use concatenation + instead of multiplication * then I get the result that Jiri expected: L = [[]] + [[]] L[1].append(1) L [[], [1]] With * both elements are changed: L = [[]] * 2 L[1].append(1) L [[1], [1]] Alex Martelli says in his excellent

Re: Writing a small battleship game server in Python

2005-08-12 Thread Michael Goettsche
On Thursday 11 August 2005 19:03, [EMAIL PROTECTED] wrote: Why not using directly SOAP ? A minimalistic 'Hello world' client looks like : from SOAPpy import SOAPProxy server= SOAPProxy(http://localhost:8080;) print server.Hello(world) and the server side like : from SOAPpy

Re: Printing to printer

2005-08-12 Thread Larry Bates
I adapted some code from David Boddie into a Python class to write directly to Linux print queues. I have used it in one project and it worked just fine. I've attached a copy for your use. You are free to use it as you wish, with no guarantees or warranties. Hope it helps. Larry Bates Steve

Re: len(sys.argv) in (3,4)

2005-08-12 Thread infidel
It might make more sense if you could find out exactly what that one argument contains. -- http://mail.python.org/mailman/listinfo/python-list

Python's Exception, and Capitalization

2005-08-12 Thread Ray
Hello guys, OK, I've been reading some more about Python. There are some things about Python exception that I haven't been able to grasp: 1. This is a small thing, but why is object spelled object, and the mother of all exception Exception (with capital E)? Why is not object spelled Object then?

Re: Where can be a problem?

2005-08-12 Thread Peter Otten
Lad wrote: Peter, I tried exactly this import re Results=[] data1='a href=detailaspxmember=15015mode=advert /aa href=detailaspxmember=15016mode=advert /aa href=detailaspxmember=15017mode=advert /a' ID = re.compile(r'^.*=(\d+).*$',re.MULTILINE) Results=re.findall(ID,data1)

simpli int/str problem

2005-08-12 Thread sinan .
hi all, i have a string and int values in same dictionary like this dict = {'str_name': 'etc' , 'int_name' : 112 } the error occures when do this SQL = INSERT INTO (`AH`, `BH` ) VALUES (' + dict['str_name'] + ', ' + dict['int_name'] + ') cursor.execute(SQL) python does not accep dict['int_name']

Text/IDE Python Editor?

2005-08-12 Thread djanvk
Any recommendations on a editior/IDE for programming in python? I'm using windows xp. Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's Exception, and Capitalization

2005-08-12 Thread D H
Ray wrote: Hello guys, OK, I've been reading some more about Python. There are some things about Python exception that I haven't been able to grasp: 1. This is a small thing, but why is object spelled object, and the mother of all exception Exception (with capital E)? Why is not object

Re: Text/IDE Python Editor?

2005-08-12 Thread Simon Brunning
On 8/12/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Any recommendations on a editior/IDE for programming in python? http://wiki.python.org/moin/PythonEditors -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ --

Re: Bug in slice type

2005-08-12 Thread Michael Hudson
Bryan Olson [EMAIL PROTECTED] writes: The Python slice type has one method 'indices', and reportedly: This method takes a single integer argument /length/ and computes information about the extended slice that the slice object would describe if applied to a sequence of length

Re: simpli int/str problem

2005-08-12 Thread [EMAIL PROTECTED]
Use substitution like below. Hope this helps py d = {'str_name': 'etc' , 'int_name' : 112 } py SQL = INSERT INTO (`AH`, `BH` ) VALUES (' + d['str_name'] + ', ' + d['int_name'] + ') Traceback (most recent call last): File pyshell#1, line 1, in -toplevel- SQL = INSERT INTO (`AH`, `BH` )

Re: Python's Exception, and Capitalization

2005-08-12 Thread Ray
D H wrote: Yeah, the python standard library has been built by lots of different people. It wasn't designed by one entity using one standard like the java standard library or .NET/Mono class library. Um, OK, so is it customary in modern Python programs to follow Java convention? then

Re: simpli int/str problem

2005-08-12 Thread Paolino
sinan . wrote: hi all, i have a string and int values in same dictionary like this dict = {'str_name': 'etc' , 'int_name' : 112 } the error occures when do this SQL = INSERT INTO (`AH`, `BH` ) VALUES (' + dict['str_name'] + ', ' + dict['int_name'] + ') cursor.execute(SQL) python does not

Re: simpli int/str problem

2005-08-12 Thread Paul McGuire
I just did this sort of thing the other day! Your database only accepts ints for BH, but remember, you are building an SQL *string* to be executed. To show SQL that your BH value is an int, not a string, do not enclose it in quotes. (Another style hint: don't name dict's dict, as this will mask

Re: Python's Exception, and Capitalization

2005-08-12 Thread [EMAIL PROTECTED]
For youtr try, except, finally: you can construct something like this: try: try: print 'egg' + 1 except ValueError, e: print e finally: print 'spam' It results in: py spam Traceback (most recent call last): File C:/Martin/test.py, line 3, in -toplevel- print

Re: thread limit in python

2005-08-12 Thread danieldsmith
i modified my C test program (included below) to explicitly set the default thread stack size, and i'm still running into the same problem. can you think of any other thing that would possibly be limiting me? and sorry to continue to post here. since this is occurring in both c and python, i

Re: Where can be a problem?

2005-08-12 Thread Lad
Thank you Peter for help. The reason why it did not work was the fact that findall function required CRLF among lines -- http://mail.python.org/mailman/listinfo/python-list

Re: Where can be a problem?

2005-08-12 Thread Paul McGuire
Try this, its a bit more readable than your re. from pyparsing import Word,nums,Literal,replaceWith data1='''a href=detailaspxmember=15015m-ode=advert /aa href=detailaspxmember=15016m­ode=advert /aa href=detailaspxmember=15017m­ode=advert /a''' # a number is a word composed of nums, that is,

Re: Jargons of Info Tech industry

2005-08-12 Thread Mike Schilling
Jürgen Exner [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Xah Lee wrote: Jargons of Info Tech industry (A Love of Jargons) Xah Lee, 2002 Feb People in the computing field like to spur the use of spurious jargons. The less educated they are, the more they like extraneous

problem extending tkSimpleDialog.Dialog

2005-08-12 Thread William Gill
I have created a widget that extends Frame() and contains labels, checkboxes, and entrys. I am trying to use tkSimpleDialog.Dialog to create a modal display of this widget, but am running into some (addressing) problems. My widget displays in the parent widget, not the tkSimpleDialog.Dialog?

Re: How do these Java concepts translate to Python?

2005-08-12 Thread Aahz
In article [EMAIL PROTECTED], Ben Finney [EMAIL PROTECTED] wrote: Recently, the language came to partially support '__foo' (i.e. a name beginning with two underscores) as a pseudo-private. It's just a namespace munging though; sufficiently determined users can get at it without much effort.

Re: Python's Exception, and Capitalization

2005-08-12 Thread Aahz
In article [EMAIL PROTECTED], Ray [EMAIL PROTECTED] wrote: 2. I'm quite baffled that you either have try/except, or try/finally. In Java, it is quite common to do this: try { // something } catch(AException e) { // handle } catch(BException e) { // handle } catch(CException e) {

Re: Jargons of Info Tech industry

2005-08-12 Thread jan V
Xah is very well known as the resident troll in many NGs and his 'contributions' are less then useless. Best is to just ignore him. Did you know that some deranged people take sexual pleasure out of starting fires? Apparently some of the latest forest/bush fires in southern Europe were even

Re: Why is this?

2005-08-12 Thread Peter Mott
Matt Hammond wrote: On Fri, 12 Aug 2005 12:57:38 +0100, Peter Mott [EMAIL PROTECTED] wrote: If I use concatenation + instead of multiplication * then I get the result that Jiri expected: L = [[]] + [[]] L[1].append(1) L [[], [1]] With * both elements are changed: L = [[]] *

Re: Python's Exception, and Capitalization

2005-08-12 Thread bruno modulix
Ray wrote: Hello guys, OK, I've been reading some more about Python. There are some things about Python exception that I haven't been able to grasp: 1. This is a small thing, but why is object spelled object, and the mother of all exception Exception (with capital E)? Why is not object

need help with my append syntax

2005-08-12 Thread yaffa
dear folks, i'm trying to append a semicolon to my addr string and am using the syntax below. for some reason the added on of the ; doesn't work. when i print it out later on it only shows the original value of addr. addr = incident.findNextSibling('td') addr.append('%s;') thanks yaffa --

Re: How do these Java concepts translate to Python?

2005-08-12 Thread Ray
bruno modulix wrote: Then wait until you discover what one can do with __magic_methods__, functions-as-objects, closures, callable objects, descriptors (properties on steroids), decorators, generators, and metaclasses... *Then* you'll know what power means !-) And more is to come... ...

Re: need help with my append syntax

2005-08-12 Thread Qiangning Hong
yaffa wrote: dear folks, i'm trying to append a semicolon to my addr string and am using the syntax below. for some reason the added on of the ; doesn't work. when i print it out later on it only shows the original value of addr. addr = incident.findNextSibling('td') addr.append('%s;')

Re: thread limit in python

2005-08-12 Thread Peter Hansen
[EMAIL PROTECTED] wrote: and sorry to continue to post here. since this is occurring in both c and python, i think there's no question i'm running into an os limit. Probably, but I haven't yet seen anyone ask the real important question. What possible use could you have for more than 1000

Re: Text/IDE Python Editor?

2005-08-12 Thread Peter A.Schott
Also, it depends on what you're trying to do. GUI, Web, Service-type apps, etc. I have started using Stan's Python Editor (www.stani.be) because I like the general features it offers. It does require wxpython to run, though. I've also used Boa Constructor and DrPython - both pretty good

Re: Python's Exception, and Capitalization

2005-08-12 Thread Steve M
You might find the Python Style Guide to be helpful: http://www.python.org/doc/essays/styleguide.html -- http://mail.python.org/mailman/listinfo/python-list

Re: UCALC equivalent

2005-08-12 Thread Larry Bates
Python has built in eval function and doesn't require a library. Larry Bates Dark Cowherd wrote: http://www.ucalc.com/mathparser/index.html There is a great library called UCALC which allows you to set up an expression and evaluate it for e.g. you an define an expression by calling a

Re: __getattribute__ for class object

2005-08-12 Thread Steven Bethard
Dan wrote: Depending on what you want to do, it might be better to use properties instead: class Meta(type): x = property(lambda klass: 'Called for '+str(klass)) class Foo(object): __metaclass__=Meta Also worth noting that you can inline the metaclass if you don't need it

Re: Supressing argument renaming in the Qt Designer - pyuic workflow

2005-08-12 Thread Phil Thompson
On Thursday 11 August 2005 6:36 pm, Madhusudan Singh wrote: Hi Some of the functions I defined inside Qt Designer need to have some values passed to them. For instance : Code : void Form3::runningplot(n,plottitle,xname,x,y1name,y1,y2name,y2) is translated by pyuic to Python code :

Re: Using globals with classes

2005-08-12 Thread Scott David Daniels
Madhusudan Singh wrote: I am using qwtplot to display a running plot : void Form3::runningplot(n,plottitle,xname,x,y1name,y1,y2name,y2) { ^^ I presume this is just some untranslated stuff ^^ if n==1 :

Re: UCALC equivalent

2005-08-12 Thread max
Larry Bates [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: Python has built in eval function and doesn't require a library. Larry Bates Are you kidding? Read the original post a little more closely. The o.p. is looking for a library that evaluates mathematical expressions and is

Bug on Python2.3.4 [FreeBSD]?

2005-08-12 Thread Uwe Mayer
posted mailed Hi, AFAICT there seems to be a bug on FreeBSD's Python 2.3.4 open function. The documentation states: Modes 'r+', 'w+' and 'a+' open the file for updating (note that 'w+' truncates the file). Append 'b' to the mode to open the file in binary mode, on systems that differentiate

Re: simpli int/str problem

2005-08-12 Thread Scott David Daniels
Paolino wrote: sinan . wrote: hi all, i have a string and int values in same dictionary like this dict = {'str_name': 'etc' , 'int_name' : 112 } Bad idea to call this dict -- that is a system-defined name for the dictionary type. I'll use holder below. the error occures when do this SQL =

Re: problem extending tkSimpleDialog.Dialog

2005-08-12 Thread William Gill
I'm still hammering away, and have found that when I change: class testWidget(Frame): def __init__(self, master): Frame.__init__(self) self.createWidgets() def createWidgets(self): Label(self,text=testWidget).grid() to: def __init__(self, master):

Re: Catching stderr output from graphical apps

2005-08-12 Thread Bryan Olson
Thanks. Yeah, guess I was naive to test on Windows and expect that kind of process stuff to be portable. I'll be away from Linux for a week or so, so this will take me a while. Further bulletins as events warrant. -- --Bryan -- http://mail.python.org/mailman/listinfo/python-list

Re: Bug on Python2.3.4 [FreeBSD]?

2005-08-12 Thread paolino
Uwe Mayer wrote: posted mailed Hi, AFAICT there seems to be a bug on FreeBSD's Python 2.3.4 open function. The documentation states: Modes 'r+', 'w+' and 'a+' open the file for updating (note that 'w+' truncates the file). Append 'b' to the mode to open the file in binary mode, on

Re: UCALC equivalent

2005-08-12 Thread Scott David Daniels
max wrote: Larry Bates [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: Python has built in eval function and doesn't require a library. Are you kidding? Read the original post a little more closely. The o.p. is looking for a library that evaluates mathematical expressions and is

Re: thread limit in python

2005-08-12 Thread Bryan Olson
Peter Hansen wrote: Probably, but I haven't yet seen anyone ask the real important question. What possible use could you have for more than 1000 *simultaneously active* threads? There are very likely several alternative approaches that will fit your use case and have better

Dictionary inheritance

2005-08-12 Thread Talin
I want to make a dictionary that acts like a class, in other words, supports inheritance: If you attempt to find a key that isn't present, it searches a base dictionary, which in turn searches its base, and so on. Now, I realize its fairly trivial to code something like this using UserDict,

Dual mode for file/directory chooser

2005-08-12 Thread jasonjho
Does tkinter have a dialog chooser for supporting both file and directory selections? I can only seem to find ask* methods that provide function for each, and not both. Thanks, J -- http://mail.python.org/mailman/listinfo/python-list

Re: Permutation Generator

2005-08-12 Thread Michael J. Fromberger
In article [EMAIL PROTECTED], Talin [EMAIL PROTECTED] wrote: I'm sure I am not the first person to do this, but I wanted to share this: a generator which returns all permutations of a list: def permute( lst ): if len( lst ) == 1: yield lst else: head = lst[:1]

Re: Dictionary inheritance

2005-08-12 Thread Devan L
Talin wrote: I want to make a dictionary that acts like a class, in other words, supports inheritance: If you attempt to find a key that isn't present, it searches a base dictionary, which in turn searches its base, and so on. Now, I realize its fairly trivial to code something like this

Re: Bug on Python2.3.4 [FreeBSD]?

2005-08-12 Thread Uwe Mayer
Friday 12 August 2005 22:12 pm paolino wrote: [...] f = open('test', 'a+') f.read() '' - append mode does not read from file, *not ok* This is right IMO 'a' is appending so seek(-1) True, thank you. f.tell() shows the file pointer is at EOF. On my Debian Linux (unstable), Python 2.3.4

Re: Jargons of Info Tech industry

2005-08-12 Thread Ulrich Hobelmann
jan V wrote: Did you know that some deranged people take sexual pleasure out of starting fires? Apparently some of the latest forest/bush fires in southern Europe were even started by firemen (with their pants down?). I've only heard of people trying to extinguish fires with their pants down.

Re: Bug on Python2.3.4 [FreeBSD]?

2005-08-12 Thread David Bolen
Uwe Mayer [EMAIL PROTECTED] writes: AFAICT there seems to be a bug on FreeBSD's Python 2.3.4 open function. The documentation states: Modes 'r+', 'w+' and 'a+' open the file for updating (note that 'w+' truncates the file). Append 'b' to the mode to open the file in binary mode, on

Re: Bug on Python2.3.4 [FreeBSD]?

2005-08-12 Thread Uwe Mayer
Friday 12 August 2005 22:12 pm David Bolen wrote: Which version of FreeBSD are you running? I thought it might be a dependency on needing to seek between reads and writes on a duplex stream (which is ANSI), but FreeBSD doesn't require that, at least back as far as a 4.7 system I have, and I

Re: Text/IDE Python Editor?

2005-08-12 Thread djanvk
THanks for the information and the review.. On Fri, 12 Aug 2005 16:57:04 GMT, Peter A. Schott [EMAIL PROTECTED] wrote: Also, it depends on what you're trying to do. GUI, Web, Service-type apps, etc. I have started using Stan's Python Editor (www.stani.be) because I like the general features

Re: Jargons of Info Tech industry

2005-08-12 Thread axel
In comp.lang.perl.misc Xah Lee [EMAIL PROTECTED] wrote: The other class of jargon stupidity is from computing practitioners, of which the Unix/Perl community is exemplary. For example, the name Unix Perl themselves are good examples of buzzing jargons. Unix is supposed to be opposed of

Re: How do these Java concepts translate to Python?

2005-08-12 Thread gene tani
I think you'll like python. http://naeblis.cx/rtomayko/2004/12/15/the-static-method-thing http://dirtsimple.org/2004/12/java-is-not-python-either.html (and python-is-not-java) -- http://mail.python.org/mailman/listinfo/python-list

Re: thread limit in python

2005-08-12 Thread Christopher Subich
[EMAIL PROTECTED] wrote: i modified my C test program (included below) to explicitly set the default thread stack size, and i'm still running into the same problem. can you think of any other thing that would possibly be limiting me? Hrm, you're on an A64, so that might very well mean you're

Re: Using globals with classes

2005-08-12 Thread Madhusudan Singh
Many thanks for an excellent solution to the problem and clearing up my mind about globals. In some sense, Python globals seem to be a little like the COMMON statement in the old Fortran 77 standard. -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >