Re: MinGW and Python

2006-04-27 Thread Ross Ridge
Ross Ridge wrote: > Nonetheless, Cygwin applications are not generally considered native > Win32 applications because of the dependency on CYGWIN1.DLL and the > related environment. While what you're saying a strictly true, the > term "native Win32" is used to make a distinction between a port of

Re: finding IP address of computer

2006-04-27 Thread sturlamolden
print '127.0.0.1' :-P -- http://mail.python.org/mailman/listinfo/python-list

Re: OOP techniques in Python

2006-04-27 Thread Steven Bethard
[Please don't top-post] Steven Bethard wrote: > Panos Laganakos wrote: >> we usually define private properties and provide public functions >> to access them, in the form of: >> get { ... } set { ... } >> >> Should we do the same in Python: >> >> self.__privateAttr = 'some val' >> >> def

Regular Expression help

2006-04-27 Thread RunLevelZero
I have some data and I need to put it in a list in a particular way. I have that figured out but there is " stuff " in the data that I don't want. Example: 10:00am - 11:00am: The Price Is Right All I want is " Price Is Right " Here is the re. findshows = re.compile(r'(\d\d:\d\d\D\D\s-\s\d\d:\

Re: Twisted and Tkinter

2006-04-27 Thread Chris
it now comes up with the error message Traceback (most recent call last): File "C:\Python24\lib\lib-tk\Tkinter.py", line 1345, in __call__ return self.func(*args) File "C:\Documents and Settings\chris\Desktop\Python\client.py", line 30, in sendMessage self.sendLine("Test") AttributeErr

Re: OOP techniques in Python

2006-04-27 Thread Philippe Martin
Why is that ? to me it makes sense when I see self.__m_var that I'm dealing with a member variable taht derived classes will not see/access. Philippe Steven Bethard wrote: > Panos Laganakos wrote: >> we usually define private properties and provide public functions >> to access them, in the f

Slightly OT: Adding Objective C to my toolbox

2006-04-27 Thread Chris Cioffi
Question background:  I've been using Python as my primary language for several years now and have done all my non-trivial development in Python.  I've now got a Mac and want to do some development using the Core * features in OS X in ObjC.  I know I could use the PyObjC bindings, but ObjC seems to

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

2006-04-27 Thread John Bokma
"gene tani" <[EMAIL PROTECTED]> wrote: > > John Bokma wrote: >> Roedy Green <[EMAIL PROTECTED]> wrote: >> >> I leave that up to Xah's ISP/USP and hosting provider to decide :-D > > he's solidified position as top troll of 2003-2006 Maybe because people rather post a reply instead of sending an

Re: list of functions question

2006-04-27 Thread val
Tim, Greatly appreciate your help. You are right - the functions work from the list; i don't actually need the string with events. Thanks again - great list and great people... Val -- http://mail.python.org/mailman/listinfo/python-list

Re: list of functions question

2006-04-27 Thread val
Hi Kent, Thanks. Great help. It does work now, and with expressions as well. my very best, Val -- http://mail.python.org/mailman/listinfo/python-list

Re: list of functions question

2006-04-27 Thread val
John Machin wrote: > On 27/04/2006 10:38 AM, val bykoski wrote: > > Hi The List: > > I have a modeling app where i'm detecting events (in temporal > > dynamics) applying a set of (boolean) functions - kind of: > > > > event_list = "f1 f2 etc".split() # each fi detects a specific event > > i have

Re: OOP techniques in Python

2006-04-27 Thread Steven Bethard
Panos Laganakos wrote: > we usually define private properties and provide public functions > to access them, in the form of: > get { ... } set { ... } > > Should we do the same in Python: > > self.__privateAttr = 'some val' > > def getPrivateAttr(self): > return self.__privateAttr > > Or th

Re: PyEval_EvalFrame

2006-04-27 Thread Tim Peters
[EMAIL PROTECTED] > I see a C/python program that we're using spending a lot of time in > this function, far more than we think it should. What is it? PyEval_EvalFrame is the heart of the CPython interpreter: it's a very large function that _implements_ the interpreter, marching through the byte

Re: OOP techniques in Python

2006-04-27 Thread Duncan Booth
Panos Laganakos wrote: > i.e. we usually define private properties and provide public functions > to access them, in the form of: > get { ... } set { ... } > > Should we do the same in Python: > > self.__privateAttr = 'some val' > > def getPrivateAttr(self): > return self.__privateAttr > >

Re: how do I make a class global?

2006-04-27 Thread harold
basically, you can create new types on the fly using type() with three arguments: my_class = type("className",(BaseClass,),class_dict) then, you can assign this vlass to the golbal namespace using globals(): globals()["className"] = my_class In your case, you would need to populate the class_di

Re: finding IP address of computer

2006-04-27 Thread Jorge Godoy
Chris wrote: > hehe, works a charm, cheers mate. Beware that if you have a different entry in your hosts file you can match a different name. Test it: - add "127.0.0.2yourhost.yourdomain yourhost" to /etc/hosts - rerun the code. You'll see "127.0.0.2" as the result. So take that into acco

OOP techniques in Python

2006-04-27 Thread Panos Laganakos
I've been thinking if there's a point in applying some specific OOP techniques in Python as we do in other languages. i.e. we usually define private properties and provide public functions to access them, in the form of: get { ... } set { ... } Should we do the same in Python: self.__privateAttr

How to align the text of a Listbox to the right

2006-04-27 Thread Sori Schwimmer
For a listbox, I would give a width and go with string formatting. In your case, I guess that what I'll do is to limit the width to something acceptable, and show only the tail of the line. Say, your width is w, then I'll show only the last w-4 chars, preceded by '... ' (ellipsis+space). It might

Re: help

2006-04-27 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, NavyJay <[EMAIL PROTECTED]> wrote: >For such a simple task, I would use MATLAB. >http://www.mathworks.com/products/matlab/ . [pertinent Python comments] . . ... and some people wo

Editing a function in-memory and in-place

2006-04-27 Thread Sori Schwimmer
Generate your function as a string. Be careful to indent correctly and append \n at line's end. Then execute the string with exec(name_of_string). Then edit your string as necessary, and execute again. An example follows, directly from one of my projects: # create a "function" to apply on

PyEval_EvalFrame

2006-04-27 Thread [EMAIL PROTECTED]
I see a C/python program that we're using spending a lot of time in this function, far more than we think it should. What is it? Thanks in advance! There seems to be nothing (but a bunch of stack traces) when I google this. Brett -- http://mail.python.org/mailman/listinfo/python-list

Re: gcc errors

2006-04-27 Thread Simon Percivall
It doesn't think you're on an intel box, it thinks you want to compile universal libraries, since you installed a universal python. The problem is likely to be that you haven't installed SDK's for intel as well as powerpc when you installed Apple's Developer Tools. Do that, and it should work ...

[ANNOUNCE]: functional 0.6 released

2006-04-27 Thread Collin Winter
Hello all, I have released version 0.6 of my functional module, a collection of higher-order and functional programming tools for Python. Currently offered are tools for function composition, partial function application, plus flip, foldl, foldr, scanl and scanr functions. Two version of the rele

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

2006-04-27 Thread Michael Spencer
Ian Bicking wrote: > I got a puzzler for y'all. I want to allow the editing of functions > in-place. I won't go into the reason (it's for HTConsole -- > http://blog.ianbicking.org/introducing-htconsole.html), except that I > really want to edit it all in-process and in-memory. So I want the > id

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

2006-04-27 Thread sturlamolden
Julien Fiore wrote: > Thanks for your remark, Sturlamolden. > > Is there a free version of the "Visual C++ 2003" compiler available on > the web? I have found "Visual C++ 2005 Express edition" > (http://msdn.microsoft.com/vstudio/express/visualc/). According to > Micrsoft, it replaces VC++2003 > (

Re: pytiff for windows

2006-04-27 Thread Michele Petrazzo
Michele Petrazzo wrote: > import FreeImagePy as FIPY lst_names = ("/tmp/f1.png", "/tmp/f2.jpg") F = FIPY.freeimage() F.convertToMultiPage(lst_names, "out.tif", FIPY.FIF_TIFF) > (0, 'All ok!! File saved on out.tif') > Sorry for this bad copy/paste/thunderbird :) >>> import FreeI

Re: pytiff for windows

2006-04-27 Thread Michele Petrazzo
Iain King wrote: <-cut pytiff-> > (or alternatively tell me how to get PIL to save a multipage tiff). > PIL can't. If you need to work with multi-page images (tiff and others), you can use freeimagepy (freeimagepy.sf.net) >>> import FreeImagePy as FIPY lst_names = ("/tmp/f1.png", >>> "/tmp/f2

gcc errors

2006-04-27 Thread Chris Pesarchick
I installed the Universal Mac OSX binary for Python 2.4.3 When I execute 'python setup.py install' for any of my applications that I need to build, I get errors like the following: gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk - fno-strict-aliasing -Wno-long-double -no-cpp-

how do I make a class global?

2006-04-27 Thread Tom Brown
Hi, I thought it would be nifty to create a class that created other classes for me. The method below shows what I would like to do. The problem is that the class the method creates is local to the method. Is it possible to make the class visible in the global scope so I can import the module s

Re: Type-Def-ing Python

2006-04-27 Thread Aahz
In article <[EMAIL PROTECTED]>, Alex Martelli <[EMAIL PROTECTED]> wrote: ><[EMAIL PROTECTED]> wrote: > ... >> Brett Cannon's thesis in which he tweaks the compiler and shows that >> type-defing python would not help the compiler achieve a 5% performace >> increase. >> >> Brett Cannon, "Localized

Re: Twisted and Tkinter

2006-04-27 Thread Fredrik Lundh
Chris wrote: > Exception in Tkinter callback > Traceback (most recent call last): > File "C:\Python24\lib\lib-tk\Tkinter.py", line 1345, in __call__ > return self.func(*args) > TypeError: unbound method sendMessage() must be called with ChatFactory > instance as first argument (got nothing i

Re: writing some lines after reading goes wrong on windows?

2006-04-27 Thread harveysthomas
If you are opening a file for read and write access use "rb+" or "wb+". Seeking and subsequent read/write will then work fine. Without the "b", Windows opens the file in its "text" mode. Don't seek on files opened in "text" mode. -- http://mail.python.org/mailman/listinfo/python-list

pytiff for windows

2006-04-27 Thread Iain King
Does anyone have a link for a compiled-for-windows version of pytiff? (or alternatively tell me how to get PIL to save a multipage tiff). Iain -- http://mail.python.org/mailman/listinfo/python-list

Re: Get all attributes of a com object

2006-04-27 Thread bruno at modulix
eicwo01 wrote: > Without to know the names, is it possible to dump all attributes of a > com object? > from win32com.adsi import * from module import * is Bad(tm) > objDom = ADsOpenObject("LDAP:/ ... > print ???"all attributes"??? of objDom Look at dir() and the inspect module. -- bruno dest

ILOG Server integration

2006-04-27 Thread adam
Does anybody have experiences of Python and ILOG Server (distribution framework) integration? I need to access to a server application "exposed" through ILOG Server. Thanks Vieri -- http://mail.python.org/mailman/listinfo/python-list

Re: Twisted and Tkinter

2006-04-27 Thread Chris
Exception in Tkinter callback Traceback (most recent call last): File "C:\Python24\lib\lib-tk\Tkinter.py", line 1345, in __call__ return self.func(*args) TypeError: unbound method sendMessage() must be called with ChatFactory instance as first argument (got nothing instead) I have simplifie

Re: finding IP address of computer

2006-04-27 Thread Chris
hehe, works a charm, cheers mate. -- http://mail.python.org/mailman/listinfo/python-list

Re: not quite 1252

2006-04-27 Thread Anton Vredegoor
John Machin wrote: > Firstly, this should be 'content.xml', not 'contents.xml'. Right, the code doesn't do *anything* :-( Thanks for pointing that out. At least it doesn't do much harm either :-| > Secondly, as pointed out by Sergei, the data is encoded by OOo as UTF-8 > e.g. what is '\x94' in

Get all attributes of a com object

2006-04-27 Thread eicwo01
Without to know the names, is it possible to dump all attributes of a com object? from win32com.adsi import * objDom = ADsOpenObject("LDAP:/ ... print ???"all attributes"??? of objDom Thanks Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: finding IP address of computer

2006-04-27 Thread BartlebyScrivener
One way: >>> import socket >>> socket.getaddrinfo(socket.gethostname(), None)[0][4][0] It was the first google hit -- http://mail.python.org/mailman/listinfo/python-list

Re: finding IP address of computer

2006-04-27 Thread Gregor Horvath
Chris schrieb: > How do I find and print to screen the IP address of the computer my > python program is working on? > IP adresses are bound to network interfaces not to computers. One Computer can have multiple network interfaces. -- Servus, Gregor http://www.gregor-horvath.com -- http://

Re: Unpacking a list of strings

2006-04-27 Thread Alex Martelli
Panos Laganakos <[EMAIL PROTECTED]> wrote: > Is there some other practice than reading all the strings and slicing > them later? > > They're stored in the form of: > List Group[10]: > char[17] name; > > So I thought of doing: > unpacked = unpack('%s' % (10*17), data) > > And then slicing th

Re: begging for a tree implementation

2006-04-27 Thread DogWalker
Micah wrote: > I'm looking for a simple tree implementation: 0-n children, 1 root. > All the nice methods would be appreciated (getLeaves, isLeaf, isRoot, > depthfirst, breadthfirst,...) That's really all I need. I could code > one up, but it would take time to debug, and i'm really short on tim

finding IP address of computer

2006-04-27 Thread Chris
How do I find and print to screen the IP address of the computer my python program is working on? -- http://mail.python.org/mailman/listinfo/python-list

writing some lines after reading goes wrong on windows?

2006-04-27 Thread yichao.zhang
Hi all I can not write anything if I have read something. the code as: Python 2.4.3 (#69, Apr 11 2006, 15:32:42) [MSC v.1310 32 bit (Intel)] on win32 IDLE 1.1.3 >>> a=open('d:\\a','r+') >>> a >>> a.read() '11\n22\n33\n' >>> a.seek(0) >>> a.read(1) '1' >>> a.write("a") >>> a.seek(0) >>> a.read()

Re: urllib.urlopen() with pages that requires cookies.

2006-04-27 Thread mwt
Fredrik Lundh wrote: > Øyvind Østlund wrote: > > > I am trying to visit a limited amount of web pages that requires cookies. I > > will get redirected if my application does not handle them. I am using > > urllib.urlopen() to visit the pages right now. And I need a push in the > > right direction

A fix to bluepin

2006-04-27 Thread Fulvio
Hello List, I'm very beginner on programming, I''m studing some fix on the Bluez's bluepin, which is rather vague to control the given input. Code /start: = def main(*args): if len(sys.argv) < 2: print "ERR" sys.exit

Re: begging for a tree implementation

2006-04-27 Thread Diez B. Roggisch
Fredrik Lundh wrote: > Diez B. Roggisch wrote: > >> This is not to discourage you - just don't expect people to greet you as >> the next messiah who finally brought one of CS most fundamental data >> structures to Python... :) > > xml.etree was added to Python 2.5 before christmas :-) Can't wai

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

2006-04-27 Thread bruno at modulix
Peter Otten wrote: (snip) > > Can you cheat and just assign another known good func_code object? def hello(): print "hello" > ... def world(): print "world" > ... def use_it(hello=hello, world=world): > ... hello() > ... world() > ... use_it() > hello > world world.func

Re: String Exceptions (PEP 352)

2006-04-27 Thread bruno at modulix
bruno at modulix wrote: > Thomas Guettler wrote: > >>Hi, >> >>I like python because it is compatible to old versions. That's way I think >>string exceptions should not be deprecated. >> >>I use string exceptions if the condition for an assertion is >>to complex: >> >>if foo and bar and i>10: >>

Re: Twisted and Tkinter

2006-04-27 Thread Fredrik Lundh
"Chris" wrot: > Sorry. The error message is normally AttributeError: 'NoneType' object > has no attribute 'sendLine'" please post the *entire* traceback, including the part that lists filenames, line numbers, and source code lines. -- http://mail.python.org/mailman/listinfo/python-list

Re: String Exceptions (PEP 352)

2006-04-27 Thread bruno at modulix
Thomas Guettler wrote: > Hi, > > I like python because it is compatible to old versions. That's way I think > string exceptions should not be deprecated. > > I use string exceptions if the condition for an assertion is > to complex: > > if foo and bar and i>10: > raise "if foo and bar i must

Re: String Exceptions (PEP 352)

2006-04-27 Thread infidel
You could also use the "assert" statement: >>> if foo and bar: ... assert i <= 10, "if foo and bar then i must not be greater than 10" ... -- http://mail.python.org/mailman/listinfo/python-list

Re: Twisted and Tkinter

2006-04-27 Thread Chris
Sorry. The error message is normally AttributeError: 'NoneType' object has no attribute 'sendLine'" [EMAIL PROTECTED] wrote: > Posting that error message would be helpful -- http://mail.python.org/mailman/listinfo/python-list

String Exceptions (PEP 352)

2006-04-27 Thread Thomas Guettler
Hi, I like python because it is compatible to old versions. That's way I think string exceptions should not be deprecated. I use string exceptions if the condition for an assertion is to complex: if foo and bar and i>10: raise "if foo and bar i must not be greater than 10" This way I can e

Re: urllib.urlopen() with pages that requires cookies.

2006-04-27 Thread Fredrik Lundh
Øyvind Østlund wrote: > I am trying to visit a limited amount of web pages that requires cookies. I > will get redirected if my application does not handle them. I am using > urllib.urlopen() to visit the pages right now. And I need a push in the > right direction to find out how to deal with page

Re: Twisted and Tkinter

2006-04-27 Thread [EMAIL PROTECTED]
Posting that error message would be helpful -- http://mail.python.org/mailman/listinfo/python-list

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

2006-04-27 Thread Leonardo da Vinci
I have to use a Listbox that shows a list of entries. Every entry is a char string quite long in size and I cannot set "width" to a large value due to limitations of screen resolution. The rightmost part is more important, so I thought that I could show only the end of the string by aligning the fi

Re: searching for an article on name-binding

2006-04-27 Thread Gerard Flanagan
Fredrik Lundh wrote: > Gerard Flanagan wrote: > > > I'm trying to find a webpage I remember reading which contained a > > layman's description of how Python binds names to objects. It used some > > ASCII-art illustrations where an arrow represented a 'binding'. Anyone > > got a link for that? (Go

Re: Packing a list of lists with struct.pack()

2006-04-27 Thread Panos Laganakos
Unfortunately I'm familiar with the generator concept, I'll look into it though, 'cause it saved me at least once already :) Thanks mate. -- http://mail.python.org/mailman/listinfo/python-list

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

2006-04-27 Thread Eric Brunel
On 27 Apr 2006 02:35:50 -0700, Leonardo da Vinci <[EMAIL PROTECTED]> wrote: > Greetings gentlemen and ladies, > I have a question: in Tkinter, how to align a Listbox entry (i.e. a > line of text) to the right? In a real Listbox, the answer is simple: you can't. What are you trying to do? Maybe

Re: can this be done without eval/exec?

2006-04-27 Thread Kent Johnson
Schüle Daniel wrote: > and now the obvious one (as I thought at first) > > >>> lst=[] > >>> for i in range(10): > ... lst.append(lambda:i) > ... > >>> lst[0]() > 9 > >>> i > 9 > >>> > > I think I understand where the problem comes from > lambda:i seems not to be fully evalutated > it jus

Re: list of functions question

2006-04-27 Thread Kent Johnson
val bykoski wrote: > Hi The List: >I have a modeling app where i'm detecting events (in temporal > dynamics) applying a set of (boolean) functions - kind of: > > event_list = "f1 f2 etc".split() # each fi detects a specific event > i have defs for functions fi, or simple boolean expressions

Re: print names of dictionaries

2006-04-27 Thread Philippe Martin
OK, totally dumb ! g_dict[s] = p Philippe Martin wrote: > Hi, > > I do not know if there is a way to overload the instantiation of all > objects in Python but I thought of something like this to fetch any object > with its name: > > g_dict = {} > > > def create_object (v,s): >p = v >

Re: print names of dictionaries

2006-04-27 Thread Philippe Martin
Hi, I do not know if there is a way to overload the instantiation of all objects in Python but I thought of something like this to fetch any object with its name: g_dict = {} def create_object (v,s): p = v g_dict[s] = id(p) return p #ex object = create_object ([1,2,3,4], 'A LIST') Ph

Unpacking a list of strings

2006-04-27 Thread Panos Laganakos
Is there some other practice than reading all the strings and slicing them later? They're stored in the form of: List Group[10]: char[17] name; So I thought of doing: unpacked = unpack('%s' % (10*17), data) And then slicing the list by a step of 17. Is there some way to have unpack return a

RELEASED Python 2.5 (alpha 2)

2006-04-27 Thread Anthony Baxter
On behalf of the Python development team and the Python community, I'm happy to announce the second alpha release of Python 2.5. This is an *alpha* release of Python 2.5. As such, it is not suitable for a production environment. It is being released to solicit feedback and hopefully discover bugs,

Re: MinGW and Python

2006-04-27 Thread Gerhard Häring
sturlamolden wrote: > [...] The problem is actually *licensing issues* related to CYGWIN1.DLL. It > cannot always be linked. CYGWIN1.DLL can only be used for Open Source > development. [...] Of course Redhat offers an alternative license that does not have the GPL restrictions: http://www.redhat.

Re: MinGW and Python

2006-04-27 Thread sturlamolden
Martin v. Löwis wrote: > > Nonetheless, Cygwin applications are not generally considered native > > Win32 applications because of the dependency on CYGWIN1.DLL and the > > related environment. > - Is winword.exe not a native Win32 library because it uses "MSO.DLL"? > - A cygwin application does

Re: can anyone advise me

2006-04-27 Thread egbert
On Thu, Apr 27, 2006 at 02:48:46AM -0700, [EMAIL PROTECTED] wrote: > why the output of this code : > x = 0 > while x < 10: > z = 0 > print x > x = x + 1 > while z < x: > print z, > z = z + 1 > > is > > 0 > 0 1 > 0 1 2 > 0 1 2 3 > 0 1

Re: MinGW and Python

2006-04-27 Thread sturlamolden
Martin v. Löwis wrote: > > Nonetheless, Cygwin applications are not generally considered native > > Win32 applications because of the dependency on CYGWIN1.DLL and the > > related environment. > - Is winword.exe not a native Win32 library because it uses "MSO.DLL"? > - A cygwin application does

Re: MinGW and Python

2006-04-27 Thread sturlamolden
Martin v. Löwis wrote: > > Nonetheless, Cygwin applications are not generally considered native > > Win32 applications because of the dependency on CYGWIN1.DLL and the > > related environment. > - Is winword.exe not a native Win32 library because it uses "MSO.DLL"? > - A cygwin application does

urllib.urlopen() with pages that requires cookies.

2006-04-27 Thread Øyvind Østlund
I am trying to visit a limited amount of web pages that requires cookies. I will get redirected if my application does not handle them. I am using urllib.urlopen() to visit the pages right now. And I need a push in the right direction to find out how to deal with pages that requires cookies. Anyone

Re: searching for an article on name-binding

2006-04-27 Thread Fredrik Lundh
Gerard Flanagan wrote: > I'm trying to find a webpage I remember reading which contained a > layman's description of how Python binds names to objects. It used some > ASCII-art illustrations where an arrow represented a 'binding'. Anyone > got a link for that? (Google's not my friend!) http://www

Re: Inherit from array

2006-04-27 Thread bruno at modulix
TG wrote: > Hmm ... I'm definitely not a python wizard, but it seems to be quite a > special case that breaks the rules ... Yes and no. The primary use case for __new__ was to allow subclassing of immutable types. array.array is not immutable, but it's still a special case, in that it enforce typ

searching for an article on name-binding

2006-04-27 Thread Gerard Flanagan
Hello I'm trying to find a webpage I remember reading which contained a layman's description of how Python binds names to objects. It used some ASCII-art illustrations where an arrow represented a 'binding'. Anyone got a link for that? (Google's not my friend!) Thanks Gerard -- http://mail.pyt

Re: MinGW and Python

2006-04-27 Thread sturlamolden
Martin v. Löwis wrote: > That's not how I read it. To me, it says: it can be used by other > parts of Windows itself (i.e. system-level components), but it is not > intended to be used by third-party applications (such as Python), > as these are not system-level components. That is correct. And

Re: Packing a list of lists with struct.pack()

2006-04-27 Thread Fredrik Lundh
Panos Laganakos wrote: > What I don't understand is what are you doing with *(...), this is > supposed to pack its contents as a list? the *arg form treats each value in the arg sequence as a separate argument. for example, arg = 1, 2, 3 function(*arg) is the same thing as function

Re: A QFB agent: how to catch C-level crashes and last Python stack ?

2006-04-27 Thread Thomas Heller
robert wrote: > When employing complex UI libs (wx, win32ui, ..) and other extension > libs, nice "only Python stack traces" remain a myth. > > Currently I'm hunting again a rare C-level crash bug of a Python based > Windows app with rare user reports - and still in the dark (I get > snippets o

Re: begging for a tree implementation

2006-04-27 Thread Ant
Damn! Missed the boat ;-) -- http://mail.python.org/mailman/listinfo/python-list

Re: Inherit from array

2006-04-27 Thread TG
Hmm ... I'm definitely not a python wizard, but it seems to be quite a special case that breaks the rules ... unpythonic, isn't it ? Has anyone seen a PEP on this subject ? Just in case a troll reads this message : i'm not saying python sucks or has huge design flaws here ... -- http://mail.pyt

Re: can anyone advise me

2006-04-27 Thread micklee74
Dan Sommers wrote: > On 27 Apr 2006 02:48:46 -0700, > [EMAIL PROTECTED] wrote: > > > why the output of this code : > > x = 0 > > while x < 10: > > z = 0 > > print x > > x = x + 1 > > while z < x: > > print z, > > z = z + 1 > > > is >

midipy.py on linux

2006-04-27 Thread Will Hurt
Hi Ive been using midipy in my blender3d python scripts on windowsXP, now im trying to run them from ubuntu and i cant find the midipy.py module compiled for linux anywhere. Is it possible to complie it under linux and how would i go about doing it --or-- Is there another module which does the sam

[no subject]

2006-04-27 Thread UMASANKAR LAKSHMANAN
hi, I want some simple program for : timer thread running program in timer thread how to get notified when program is closed Thanks in advance Regards Ums UMASANKAR L. 704-B, SHIVARANJANI APARTMENTS 213, NAGAPRABHA CHAMBERS ITI LAYOUT, BSK III STAGE 3rd MAIN, 4th CROSS NEAR

[no subject]

2006-04-27 Thread carlosperezs
Hallo !!! I am new in Python and my doubts are basics.I would like to a window appears when press a button. This window would have only an advise. Therefore it would be a simple window. I don't know which window to choose. Thank you. --oOo

help

2006-04-27 Thread kalyanigoli
Hi! I am a new user to python. I want to draw a 2D graph with coordinates data as input. In the graph i want to fill some area and also include image maps. Can any one suggest which is the best library to use and some links for examples. Thanks in advance. Your help will be most appreciated.

Re: can anyone advise me

2006-04-27 Thread looping
try something like this: x = 0 while x < 10: z = 0 print '-' + str(x) + '-' x = x + 1 while z < x: print '.' + str(z) + '.', z = z + 1 -- http://mail.python.org/mailman/listinfo/python-list

Re: can anyone advise me

2006-04-27 Thread Gerard Flanagan
[EMAIL PROTECTED] wrote: > why the output of this code : > x = 0 > while x < 10: > z = 0 > print x > x = x + 1 > while z < x: > print z, > z = z + 1 > > is > > 0 > 0 1 > 0 1 2 > 0 1 2 3 > 0 1 2 3 4 > 0 1 2 3 4 5 > 0 1 2 3 4 5 6 > 0 1

Re: can anyone advise me

2006-04-27 Thread Peter Otten
[EMAIL PROTECTED] wrote: > why the output of this code : > x = 0 > while x < 10: > z = 0 > print x > x = x + 1 > while z < x: > print z, > z = z + 1 > > is > > 0 > 0 1 > 0 1 2 > 0 1 2 3 > 0 1 2 3 4 > 0 1 2 3 4 5 > 0 1 2 3 4 5 6 > 0

Re: can anyone advise me

2006-04-27 Thread Dan Sommers
On 27 Apr 2006 02:48:46 -0700, [EMAIL PROTECTED] wrote: > why the output of this code : > x = 0 > while x < 10: > z = 0 > print x > x = x + 1 > while z < x: > print z, > z = z + 1 > is > 0 Okay, that was x, from the print statement

Re: how to free the big list memory

2006-04-27 Thread harold
pydoc gc.collect pydoc xrange -- http://mail.python.org/mailman/listinfo/python-list

Re: I have problems with creating the classic game Wumpus. the file: http://esnips.c

2006-04-27 Thread conny . ledin
This is so great!!! I know i have alot of work left to do and i probobly wont make it in time which means that i can only get the grade E on the assignment... But at this stage it feels like ill be happy with any grade i get, just to have this behind me. Programming is apparently not my thing. It f

Re: help

2006-04-27 Thread NavyJay
For such a simple task, I would use MATLAB. http://www.mathworks.com/products/matlab/ However, if you have to do generic programming in addition to this, I would use Python with the libraries ImageMagick or Python Image Library (PIL). Just search for them and you'll have all the examples you need

Re: blob problems in pysqlite

2006-04-27 Thread aldonnelley
Woohoo! You rock, Gerhard. That's inspired. I'm sure I can sort this out now. Both you and Tim have been an enormous help. Cheers, Al. (Oh, and Tim: tip noted. I feel bad about not posting complete code- I do normally (not in python), but can't for this one. Thanks for wading your way through it

how to free the big list memory

2006-04-27 Thread kyo guan
Python version 2.4.3 >>> l=range(50*1024*100) after this code, you can see the python nearly using about 80MB. then I do this >>> del l after this, the python still using more then 60MB, Why the python don't free my memory? Is there any way to force the python free my memory? Thanks. Kyo.

can anyone advise me

2006-04-27 Thread micklee74
why the output of this code : x = 0 while x < 10: z = 0 print x x = x + 1 while z < x: print z, z = z + 1 is 0 0 1 0 1 2 0 1 2 3 0 1 2 3 4 0 1 2 3 4 5 0 1 2 3 4 5 6 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6

Re: bug in modulus?

2006-04-27 Thread Christophe
[EMAIL PROTECTED] a écrit : > I think there might be something wrong with the implementation of > modulus. > > Negative float values close to 0.0 break the identity "0 <= abs(a % b) > < abs(b)". > > print 0.0 % 2.0 # => 0.0 > print -1e-010 % 2.0 # =>1.99 > > which is correct, but

How to align the text of a Listbox to the right

2006-04-27 Thread Leonardo da Vinci
Greetings gentlemen and ladies, I have a question: in Tkinter, how to align a Listbox entry (i.e. a line of text) to the right? Google did not show up the answer to my request. Thanks very much. L -- http://mail.python.org/mailman/listinfo/python-list

Re: begging for a tree implementation

2006-04-27 Thread Fredrik Lundh
Diez B. Roggisch wrote: > This is not to discourage you - just don't expect people to greet you as the > next messiah who finally brought one of CS most fundamental data structures > to Python... :) xml.etree was added to Python 2.5 before christmas :-) -- http://mail.python.org/mailman/li

Re: begging for a tree implementation

2006-04-27 Thread Diez B. Roggisch
> I may start a tree data structure project - it's something I've been > thinking about for a while, and now it's clear that it's not just me > who uses trees as data structures! Oh, people do use them. It's just to easy to cough one up when you need it - either as nested tuples, lists, dicts or a

<    1   2   3   >