Re: Tkinter pack_forget() and destroy()

2007-06-28 Thread Eric Brunel
On Thu, 28 Jun 2007 07:45:08 +0200, Rajendran Appavu <[EMAIL PROTECTED]> wrote: > When I am done with a widget that is packed in a Frame, is it safe to > call destroy() method on the widget after calling its pack_forget() or > grid_forget() method? Since I do that all the time, I'd say yes... D

Re: listing the type of an object

2007-06-28 Thread Bruno Desthuilliers
Stef Mientki a écrit : > How can I list a type of an object instance ? > > I tried: > > class tLED (tDevice): Do yourself (and the world) a favour and give up hungarian notation... This should be: class Led(Device): #... > def some_proc(self): > print 'type(self)', type(self) >

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-06-28 Thread Bruno Desthuilliers
Stephen R Laniel a écrit : > On Thu, Jun 28, 2007 at 09:08:16AM +0200, Bruno Desthuilliers wrote: >> You said ? > > I could link again to Mark-Jason Dominus, who writes that > people often make the following inference: > > 1) C is strongly typed. Lol. C is well known for it's very weak typing.

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-28 Thread Paul Rubin
Douglas Alan <[EMAIL PROTECTED]> writes: > > Before the with statement, you could do the same thing but you > > needed nested try/finally blocks > > No, you didn't -- you could just encapsulate the resource acquisition > into an object and allow the destructor to deallocate the resource. But with

Re: Portable general timestamp format, not 2038-limited

2007-06-28 Thread Leo Kislov
On Jun 27, 10:51 pm, Paul Rubin wrote: > The difficulty/impossibility of computing intervals on UTC because of > leap seconds suggests TAI is a superior timestamp format. If you care about intervals you'd better keep timestamps in SI seconds since some zero time point (j

Re: Help needed with translating perl to python

2007-06-28 Thread Duncan Booth
[EMAIL PROTECTED] wrote: > Let me add that instead of an an-close-as-possible translation > from the original Perl code, one can rewrite this as: > def bcdlen(length): > ... strlen = "%04s" % length > ... return chr(int(strlen[2:4], 16)) + chr(int(strlen[0:2], 16)) > > > which is

Re: listing the type of an object

2007-06-28 Thread stef
Bruno Desthuilliers wrote: > Stef Mientki a écrit : >> How can I list a type of an object instance ? >> >> I tried: >> >> class tLED (tDevice): > > > Do yourself (and the world) a favour and give up hungarian notation... > This should be: > > class Led(Device): >#... > > Didn't know that thi

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-06-28 Thread [EMAIL PROTECTED]
Stephen R Laniel wrote: > On Thu, Jun 28, 2007 at 09:08:16AM +0200, Bruno Desthuilliers wrote: > > You said ? > > I could link again to Mark-Jason Dominus, who writes that > people often make the following inference: > > 1) C is strongly typed. > 2) C's typing sucks. > 3) Hence strong typing sucks.

urllib2 : https and proxy

2007-06-28 Thread cp . finances . gouv
Hello all, I'm facing a strange behavior of urllib2 trying to access gmail account behind a proxy (Squid). The following works perfectly : wget --save-cookies cookies --keep-session-cookies --post- data="[EMAIL PROTECTED]&Passwd=cpfinances" --no- check-certificate -O - https://www.google.com/a

textwrap and combining diacritical marks

2007-06-28 Thread Berteun Damman
Hello, When using the textwrap module, the wrap will always use len() to determine the length of the string being wrapped. This might be a sensible thing to do in many circumstances, but I think there are circumstances where this does not lead to the desired result. I assume many applications of

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-28 Thread Andreas Eder
Hi Twisted, > "Twisted" == Twisted <[EMAIL PROTECTED]> writes: Twisted> Let me get this straight. Twisted> In this corner, we have just about every Windows application ever Twisted> developed. When a user needs help, a click on the "help" menu or tap Twisted> of the F1 key

Can IronPython work as Windows Scripting Host (WSH) language?

2007-06-28 Thread misiek3d
Hello I want to use IronPython as Windows Scripting Host language. Is it possible? How can I do it? I know that ActivePython works as WSH language but for specific reasons I need to use IronPython. regards Michal -- http://mail.python.org/mailman/listinfo/python-list

Re: listing the type of an object

2007-06-28 Thread Bruno Desthuilliers
stef a écrit : > Bruno Desthuilliers wrote: >> Stef Mientki a écrit : >>> How can I list a type of an object instance ? >>> >>> I tried: >>> >>> class tLED (tDevice): >> >> >> Do yourself (and the world) a favour and give up hungarian notation... >> This should be: >> >> class Led(Device): >>

problem with hack using multiple inheritance for plugins

2007-06-28 Thread massimo s.
Before all, I'm not a professional programmer but just a biophysics ph.d. student, so if something makes you scream of horror, please forgive me... Ok, this is not straightforward at all. I am working on an application that uses plugins. Plugins are coded as small classes that become inherited by

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-06-28 Thread Paul Boddie
On 28 Jun, 07:53, [EMAIL PROTECTED] (Alex Martelli) wrote: > John Nagle <[EMAIL PROTECTED]> wrote: > > PEP 3107 is static typing without enforcement, which is not a good thing. > > Wrong: PEP3107 is a syntax for adding arbitrary metadata annotations (so > that said annotations don't get squished wh

Re: problem with hack using multiple inheritance for plugins

2007-06-28 Thread massimo s.
> At this point, it seems too much a deep object-oriented hell to be > able to dig it myself. Would you help me getting some cue on the > problem? Update. Now I know that: - every sane Python class should return after type(self) - when disabling the multiple-inheritance-hack, the situation comes

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-28 Thread Antoon Pardon
On 2007-06-23, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Fri, 22 Jun 2007 13:21:14 -0400, Douglas Alan wrote: > >> I.e., I could write a new object system for Lisp faster than I could >> even begin to fathom the internal of CPython. Not only that, I have >> absolutely no desire to spend my v

Re: problem with hack using multiple inheritance for plugins

2007-06-28 Thread Duncan Booth
"massimo s." <[EMAIL PROTECTED]> wrote: > Now I know that: > - every sane Python class should return after > type(self) Wrong. Only old style classes are 'instance' type, and you should never be using an old style class unless you have a very good reason for it. Always use 'object' (or another

Re: problem with hack using multiple inheritance for plugins

2007-06-28 Thread Bruno Desthuilliers
massimo s. a écrit : >> At this point, it seems too much a deep object-oriented hell to be >> able to dig it myself. Would you help me getting some cue on the >> problem? > > Update. Now I know that: > - every sane Python class should return after > type(self) Certainly not, unless you're using

Evolution of a pythonistas!

2007-06-28 Thread swordofrue
Hello everyone, I just started reading the python documentation and then I got to thinking. How does a pythonistas evolve? What kind of natural evolution does a pythonistas endure? The reason why I wonder is simply because I have no idea of where I should be going. What kind of goals should I set

Re: Evolution of a pythonistas!

2007-06-28 Thread Thomas Jollans
swordofrue wrote: > Hello everyone, > > I just started reading the python documentation and then I got to > thinking. How does a pythonistas evolve? What kind of natural > evolution does a pythonistas endure? The reason why I wonder is > simply because I have no idea of where I should be going. W

Re: Evolution of a pythonistas!

2007-06-28 Thread BartlebyScrivener
On Jun 28, 6:46 am, swordofrue <[EMAIL PROTECTED]> wrote: > Hello everyone, > > How does a pythonistas evolve? > Get the Python Cookbook 2d, pick a useful looking project, and adapt it for your own needs. Learn by doing. Some people enjoy just doing the tutorials with the interpreter open, testing

Re: problem with hack using multiple inheritance for plugins

2007-06-28 Thread massimo s.
On 28 Giu, 13:45, Bruno Desthuilliers wrote: > massimo s. a écrit : > > >> At this point, it seems too much a deep object-oriented hell to be > >> able to dig it myself. Would you help me getting some cue on the > >> problem? > > > Update. Now I know that: > > - every sane Python class should retu

Re: listing the type of an object

2007-06-28 Thread Neil Cerutti
On 2007-06-28, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Stef Mientki a écrit : >> How can I list a type of an object instance ? >> >> I tried: >> >> class tLED (tDevice): > > > Do yourself (and the world) a favour and give up hungarian notation... > This should be: > > class Led(Device):

Re: 16bit hash

2007-06-28 Thread Robin Becker
Martin v. Löwis wrote: 0 the ideal hash :) can't be argued with >... > So: what are your input data, and what is the > distribution among them? > > Regards, > Martin > I'm trying to create UniqueID's for dynamic postscript fonts. According to my resources we don't actually need to use th

Re: problem with hack using multiple inheritance for plugins

2007-06-28 Thread massimo s.
On 28 Giu, 13:45, Bruno Desthuilliers wrote: > > wrt/ this snippet: > > for plugin_name in self.config['plugins']: > try: > plugin=__import__(plugin_name) > try: > print type(self) > eval('plugin.'+plugin_name+'Commands._plu

Re: Too many 'self' in python.That's a big flaw in this language.

2007-06-28 Thread Bjoern Schliessmann
Alex Martelli wrote: > Bjoern Schliessmann <[EMAIL PROTECTED]> > wrote: >> Mh, strange, I personally like to use "this.a" in C++, to make >> clear I use an instance variable. > That would be nice, unfortunately your C++ compiler will refuse > that, and force you to use this->a instead;-). Sure,

Re: problem with hack using multiple inheritance for plugins

2007-06-28 Thread massimo s.
On 28 Giu, 13:45, Bruno Desthuilliers wrote: > wxFrame is obviously a new-style class. I don't know if it's true, however. I tried that: >>> class A(object): ... def __init__(self): ... print type(self) ... >>> a=A() so in fact what I see has something to do with new style cla

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-06-28 Thread Bjoern Schliessmann
Bruno Desthuilliers wrote: > John Nagle a écrit : >> Actually, static typing is for detecting errors before the >> program is run. > > [EMAIL PROTECTED] ~ $ gcc -ototo toto.c > [EMAIL PROTECTED] ~ $ ./toto > Erreur de segmentation > [EMAIL PROTECTED] ~ $ > > You said ? Did he say that static

Re: Too many 'self' in python.That's a big flaw in this language.

2007-06-28 Thread Lou Pecora
In article <[EMAIL PROTECTED]>, "Jorgen Bodde" <[EMAIL PROTECTED]> wrote: > I had the same feeling when I started, coming from a C++ background, I > forgot about self a lot, creating local copies of what should be an > assign to a class instance, or methods that could not be found because > I for

Re: 16bit hash

2007-06-28 Thread Thomas Jollans
Robin Becker wrote: > Martin v. Löwis wrote: > > 0 the ideal hash > > :) > > can't be argued with > >> ... >> So: what are your input data, and what is the >> distribution among them? >> >> Regards, >> Martin >> > I'm trying to create UniqueID's for dynamic postscript fonts. According > to

Re: problem with hack using multiple inheritance for plugins

2007-06-28 Thread Thomas Jollans
massimo s. wrote: > On 28 Giu, 13:45, Bruno Desthuilliers [EMAIL PROTECTED]> wrote: >> massimo s. a écrit : >> At this point, it seems too much a deep object-oriented hell to be able to dig it myself. Would you help me getting some cue on the problem? >>> Update. Now I know that: >>

RE: Evolution of a pythonistas!

2007-06-28 Thread Sells, Fred
concur 100%. You can breeze through the fist half of the online tutorial in a about 2 cups of coffee but you don't know what you don't know until you try to do something real. Even with 20 years of working with Python, I find goodies in the cookbook for each new project. Get a python aware edito

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-28 Thread Chris Mellon
On 6/27/07, Douglas Alan <[EMAIL PROTECTED]> wrote: > "Chris Mellon" <[EMAIL PROTECTED]> writes: > > > On 6/27/07, Douglas Alan <[EMAIL PROTECTED]> wrote: > > >> The C++ folks feel so strongly about this, that they refuse to provide > >> "finally", and insist instead that you use destructors and RA

Re: problem with hack using multiple inheritance for plugins

2007-06-28 Thread massimo s.
On 28 Giu, 14:41, "massimo s." <[EMAIL PROTECTED]> wrote: > The new-style behaviour only appears when wxFrame is plugged with the > current hack. > That is: > > - print type(self) in wxFrame alone returns > - print type(self) in the plugged (multiply inherited) wxFrame returns > < class '__main__

Re: Evolution of a pythonistas!

2007-06-28 Thread kyosohma
On Jun 28, 8:02 am, "Sells, Fred" <[EMAIL PROTECTED]> wrote: > concur 100%. You can breeze through the fist half of the online tutorial in > a about 2 cups of coffee but you don't know what you don't know until you > try to do something real. > > Even with 20 years of working with Python, I find g

Re: equality & comparison by default (was Re: Too many 'self' in python.That's a big flaw in this language.)

2007-06-28 Thread A.T.Hofkamp
On 2007-06-27, Alex Martelli <[EMAIL PROTECTED]> wrote: > A.T.Hofkamp <[EMAIL PROTECTED]> wrote: > >> I think that again now with the default implementation of the >> object.__eq__ and object.__hash__ methods. I believe these methods should >> not exist until the programmer explicitly defines th

Re: Evolution of a pythonistas!

2007-06-28 Thread BartlebyScrivener
On Jun 28, 8:02 am, "Sells, Fred" <[EMAIL PROTECTED]> wrote: > concur 100%. > Get a python aware editor. I use Eclipse+PyDev for big jobs, but still use > Emacs with python-mode for quickies. Just when I was thinking we agreed! :) Get Vim! http://www.vim.org And the Cookbook http://www.amazo

Re: guidance needed: best practice for script packaging

2007-06-28 Thread Alan Isaac
My thanks to Gabriel and Josiah. Alan -- http://mail.python.org/mailman/listinfo/python-list

Re: problem with hack using multiple inheritance for plugins

2007-06-28 Thread Peter Otten
massimo s. wrote: > Again: using a new-style plugin class for multiple inheritance does > not work. This statement is certainly too broad. [earlier] > TypeError: unbound method _plug_init() must be called with > dummyguiplugGui instance as first argument (got MainWindowPlugged > instance instead

using urllib, urllib2 ,mechanize to access password protected site

2007-06-28 Thread comeshopcheap
Hi I am using this script to access doba.com (I need to download some files) but I keep on being sent back to the login page not the user home page. Any help. I think I may need to use a post method and opener is using a get method Thanks import mechanize cookies = mechanize.CookieJar() # build_

Re: equality & comparison by default (was Re: Too many 'self' in python.That's a big flaw in this language.)

2007-06-28 Thread Alan Isaac
A.T.Hofkamp wrote: a = Car2(123) b = Car2(123) a == b > > True > set([a,b]) > > set([Car2(123), Car2(123)]) > > I get a set with two equal cars, something that never happens with a set > my math teacher once told me. Then your math teacher misspoke. You have two different car

Re: 16bit hash

2007-06-28 Thread Robin Becker
Thomas Jollans wrote: > Robin Becker wrote: ... >> I'm not sure my postscript is really good enough to do the latter so I >> hoped to pursue a python based approach which has a low probability of >> busting. Originally I thought the range was a 16bit number which is why >> I started with 16bit

Re: Portable general timestamp format, not 2038-limited

2007-06-28 Thread sla29970
On Jun 27, 10:51 pm, Paul Rubin wrote: > According to , UTC is derived from > TAI. According to , TAI is a proper time, but the very first section in the TAI discussion page cites a refereed paper by the

Re: equality & comparison by default (was Re: Too many 'self' in python.That's a big flaw in this language.)

2007-06-28 Thread A.T.Hofkamp
On 2007-06-28, Alan Isaac <[EMAIL PROTECTED]> wrote: > A.T.Hofkamp wrote: > >a = Car2(123) >b = Car2(123) >a == b >> >> True >> >set([a,b]) >> >> set([Car2(123), Car2(123)]) >> >> I get a set with two equal cars, something that never happens with a set >> my math teacher once to

Re: making a opc client in Python and use opc server Events

2007-06-28 Thread jp . eugster
On 4 juin, 11:32, [EMAIL PROTECTED] wrote: > Hi all > I have a sample code to implement opc client in Python. i use a > file .py making by makepy with pythonwin for Com Interface. > i can get all server in machine, connect to server opc, disconnect, > add group, add item, read, write item in server

Re: problem with hack using multiple inheritance for plugins

2007-06-28 Thread massimo s.
On 28 Giu, 15:37, Peter Otten <[EMAIL PROTECTED]> wrote: > massimo s. wrote: > > Again: using a new-style plugin class for multiple inheritance does > > not work. > > This statement is certainly too broad. > > [earlier] > > > TypeError: unbound method _plug_init() must be called with > > dummyguipl

Re: equality & comparison by default (was Re: Too many 'self' in python.That's a big flaw in this language.)

2007-06-28 Thread Roy Smith
In article <[EMAIL PROTECTED]>, "A.T.Hofkamp" <[EMAIL PROTECTED]> wrote: > In object oriented programming, objects are representations of values, and the > system shouldn't care about how many instances there are of some value, just > like numbers in math. Every instance with a certain value is t

pypdf assert error on documentinfo

2007-06-28 Thread Tim Arnold
Using pyPdf, nice user interface. Maybe it doesn't handle pdf 1.4? I'm getting an assertion error from the following code. The pdf file shows it does have a title in its document info (using acrobat 8 or reader 5). pdf is version 1.4, produced with pdfeTex (pdflatex) 1.304 using python 2.4.1 #=

compiling extension using distutils and visual studio 2003

2007-06-28 Thread markybob
I'm trying to get Deluge ported to work on Windows, but unfortunately I can't seem to figure how to fix this error. Any help would be *greatly* appreciated. First off, here's the code to the setup.py file (http://dev.deluge-torrent.org/browser/trunk/setup.py? rev=809&format=txt) And here is the e

Re: problem with hack using multiple inheritance for plugins

2007-06-28 Thread Bruno Desthuilliers
massimo s. a écrit : > On 28 Giu, 13:45, Bruno Desthuilliers [EMAIL PROTECTED]> wrote: >> >> wrt/ this snippet: >> >> for plugin_name in self.config['plugins']: >> try: >> plugin=__import__(plugin_name) >> try: >> print type(self) >>

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-28 Thread Andy Freeman
On Jun 27, 11:41 pm, John Nagle <[EMAIL PROTECTED]> wrote: > One right answer would be a pure reference counted system where > loops are outright errors, and you must use weak pointers for backpointers. > ... The general > idea is that pointers to

Re: problem with hack using multiple inheritance for plugins

2007-06-28 Thread Bruno Desthuilliers
massimo s. a écrit : > On 28 Giu, 14:41, "massimo s." <[EMAIL PROTECTED]> wrote: > >> The new-style behaviour only appears when wxFrame is plugged with the >> current hack. >> That is: >> >> - print type(self) in wxFrame alone returns >> - print type(self) in the plugged (multiply inherited) wxFr

Segfault due to threads created by external modules

2007-06-28 Thread [EMAIL PROTECTED]
Dear list, I'm using two external modules (matplotlib and pyroot). Both are using different GUI threads (internally) Unfortunately, pretty soon after I've loaded both modules and made some function calls (without invoking GUI commands), python dies with a segfault. A libthread_db captures the stac

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-06-28 Thread Bruno Desthuilliers
Bjoern Schliessmann a écrit : > Bruno Desthuilliers wrote: >> John Nagle a écrit : > >>> Actually, static typing is for detecting errors before the >>> program is run. >> [EMAIL PROTECTED] ~ $ gcc -ototo toto.c >> [EMAIL PROTECTED] ~ $ ./toto >> Erreur de segmentation >> [EMAIL PROTECTED] ~ $

Re: Face Recognition

2007-06-28 Thread ce
On Jun 26, 5:37 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Henrik Lied wrote: > > Hi there! > > > Has anyone made effort to try to create a python binding to a facial > >recognitionsoftware [1]? > > > For those of you with some experience - would this be very hard? > > OpenCV has a python-

Re: Face Recognition

2007-06-28 Thread ce
On Jun 26, 5:37 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Henrik Lied wrote: > > Hi there! > > > Has anyone made effort to try to create a python binding to a facial > >recognitionsoftware [1]? > > > For those of you with some experience - would this be very hard? > > OpenCV has a python-

Re: listing the type of an object

2007-06-28 Thread Bruno Desthuilliers
Neil Cerutti a écrit : > On 2007-06-28, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: >> Stef Mientki a écrit : >>> How can I list a type of an object instance ? >>> >>> I tried: >>> >>> class tLED (tDevice): >> >> Do yourself (and the world) a favour and give up hungarian notation... >> This sh

Excuse me!!

2007-06-28 Thread mossab00019
Excuse me!! Would you stop for a moment?! Haven't you thought-one day- about yourself ? Who has made it? Have you seen a design which hasn't a designer ?! Have you seen a wonderful,delicate work without a worker ?! It's you and the whole universe!.. Who has made them all ?!! You know who ?.. It's "

Re: Collections of non-arbitrary objects ?

2007-06-28 Thread walterbyrd
> > Did you try to sort a tuple ? > > >>> (1, "aaa").sort() > Traceback (most recent call last): >File "", line 1, in ? > AttributeError: 'tuple' object has no attribute 'sort' I can do this: >>> x = (3,2,1) >>> x = tuple(sorted(list(x))) Which, although senseless, effectively sorts the x t

Re: Collections of non-arbitrary objects ?

2007-06-28 Thread Peter Otten
walterbyrd wrote: > I can do this: > x = tuple(sorted(list((3,2,1 The list() conversion is superfluous: >>> tuple(sorted((3,2,1))) (1, 2, 3) Peter -- http://mail.python.org/mailman/listinfo/python-list

Help needed for Pmw and WxPython Interface

2007-06-28 Thread senthil arasu
Hi, Iam creating tab pages using pmw nb = Pmw.NoteBook(master) p1 = nb.add('Page 1') p2 = nb.add('Page 2') p3 = nb.add('Page 3') created button control for every tabe page to open HTML Button(p1, fg='blue',command=f.call,command=call1).pack(pady=40) Button(p2, fg='blue'

Re: problem with hack using multiple inheritance for plugins

2007-06-28 Thread massimo s.
On 28 Giu, 15:37, Peter Otten <[EMAIL PROTECTED]> wrote: > Post a self-contained example. Now I'm even more confused. The self-contained example is below... and it works, using only old-style declarations. #!/usr/bin/env python import wx import cmd global CLI_PLUGINS global GUI_PLUGINS class

Re: problem with hack using multiple inheritance for plugins

2007-06-28 Thread massimo s.
Uh, oh. I think I found the bug, and it was a *really stupid bug*. The list of GUI_PLUGINS was empty... so there was no plugin class that was inherited. I'm embarrassed to have wasted your time that way. However I learned a lot about new-style classes and so on, so for me it was a learning experi

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-28 Thread Rustom Mody
On 6/28/07, Andreas Eder <[EMAIL PROTECTED]> wrote: > Twisted> In the other corner, we have just about every Unix application > ever > Twisted> developed. When a user needs help, they may do such things as > manually > Twisted> explore the directories where the application was instal

RE: Evolution of a pythonistas!

2007-06-28 Thread Sells, Fred
> > Wow Fred! You're awesome! How did you get 20 years in of Python when > it was created in 1991? You're right, programming skills exceed basic math. I think I started around 1990 with version 0.92 beta. -- http://mail.python.org/mailman/listinfo/python-list

Re: Excuse me!!

2007-06-28 Thread Michael Hoffman
[EMAIL PROTECTED] wrote: > Haven't you thought about what is the right religion?! Sure, why do you think I use Python? > Here you will get the answer Agreed. -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: Help needed for Pmw and WxPython Interface

2007-06-28 Thread Chris Mellon
On 6/28/07, senthil arasu <[EMAIL PROTECTED]> wrote: > Is it possible to integrate the functionalities of libraries WxPython and > pmw.? > No. -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter pack_forget() and destroy()

2007-06-28 Thread Rajendran Appavu
I asked just to be sure. Thank you. Rajendran. On 6/28/07, Eric Brunel <[EMAIL PROTECTED]> wrote: > On Thu, 28 Jun 2007 07:45:08 +0200, Rajendran Appavu <[EMAIL PROTECTED]> > wrote: > > > When I am done with a widget that is packed in a Frame, is it safe to > > call destroy() method on the widg

noob question How do I run a Python script.

2007-06-28 Thread CarlP
How do I run a Python script. I have one that gmail loader needs to run on my email box. Here's the script http://www.marklyon.org/gmail/cleanmbox.py I can't seem to find what I need to run it. I installed python, run the interpreter and the script , but all it will do is say invalid syntax. Th

Re: Help needed for Pmw and WxPython Interface

2007-06-28 Thread senthil arasu
I On 6/28/07, senthil arasu <[EMAIL PROTECTED]> wrote: Hi, Iam creating tab pages using pmw nb = Pmw.NoteBook(master) p1 = nb.add('Page 1') p2 = nb.add('Page 2') p3 = nb.add('Page 3') created button control for every tabe page to open HTML Button(p1, fg='blue',co

Memory leak in PyQt application

2007-06-28 Thread Alexander Eisenhuth
Hello alltogether, My System: Python 2.5.1 Boost.Python Qt 4.2.2 SIP 4.6 PyQt 4.2 WinXp I've a memory leak in a PyQt application and no idea how to find it. What happens in the application ? From QWindow a QDialog is called on a button "pressed()" signal, that instantiate a QThread and waits

Re: noob question How do I run a Python script.

2007-06-28 Thread kyosohma
On Jun 28, 12:17 pm, CarlP <[EMAIL PROTECTED]> wrote: > How do I run a Python script. I have one that gmail loader needs to > run on my email box. Here's the script > > http://www.marklyon.org/gmail/cleanmbox.py > > I can't seem to find what I need to run it. I installed python, run > the interpret

Re: Evolution of a pythonistas!

2007-06-28 Thread swordofrue
Thanks everyone for your responses. I am really loving this. Installed Pygame and playing some of those games. It just amazes me how much effort some of these games take. I am reading the source and am just amazed by the effort and organizational ability of the authors. Perhaps one day I will such

try/except/else/finally problem

2007-06-28 Thread Ed Jensen
I'm using: Python 2.3.2 (#1, Oct 17 2003, 19:06:15) [C] on sunos5 And I'm trying to execute: #! /usr/bin/env python try: f = file('test.txt', 'r') except IOError: print 'except' else: print 'else' finally: print 'finally' And the results are: File "./test.py", line 9 f

Re: try/except/else/finally problem

2007-06-28 Thread Peter Otten
Ed Jensen wrote: > I'm using: > > Python 2.3.2 (#1, Oct 17 2003, 19:06:15) [C] on sunos5 > > > And I'm trying to execute: > > #! /usr/bin/env python > > try: > f = file('test.txt', 'r') > except IOError: > print 'except' > else: > print 'else' > finally: > print 'finally' > >

Re: try/except/else/finally problem

2007-06-28 Thread Sebastian Wiesner
[ Ed Jensen <[EMAIL PROTECTED]> ] > try: > f = file('test.txt', 'r') > except IOError: > print 'except' > else: > print 'else' > finally: > print 'finally' > > > And the results are: > > File "./test.py", line 9 > finally: > ^ > SyntaxError: invalid syntax A finally

Threads Dying?

2007-06-28 Thread Robert Rawlins - Think Blue
Hello Guys, I've got an application that seems to be a little bit unstable and freezes quite a bit, and I'm suspecting it's something in one of my threads that's causing the problem, when does a thread die? And how can I be sure that its dyeing when its mean to be? Thanks guys, Rob --

Re: urllib2 : https and proxy

2007-06-28 Thread O.R.Senthil Kumaran
> Hello all, > > I'm facing a strange behavior of urllib2 trying to access gmail > account behind a proxy (Squid). > First off, your password wont work. See if you can get a new one. :-) Then to setup proxy suppor for urllib2, do the steps: proxy_url = 'http://' + PROXY_USER + ':

Re: noob question How do I run a Python script.

2007-06-28 Thread Matimus
> I installed python, run the interpreter and the script... Are you trying to run the script from the interpreter? You _can_ run scripts from the interpreter, but it isn't as simple as typing the name of the script. To me, that is what it sounds like you are trying to do. I don't know what environ

Re: 16bit hash

2007-06-28 Thread Martin v. Löwis
> I'm trying to create UniqueID's for dynamic postscript fonts. According > to my resources we don't actually need to use these, but if they are > required by a particular postscript program (perhaps to make a print run > efficient) then the private range of these ID's is 400<=UID<=499 > ie

Re: 16bit hash

2007-06-28 Thread Robin Becker
Martin v. Löwis wrote: .. >> ie a bunch of lists of strings which are eventually joined together and >> written out with a template to make the postscript definition. > > And the UniqueID should be unique within this file, right? > > Why don't you just use a serial number then? .. I d

Re: textwrap and combining diacritical marks

2007-06-28 Thread Berteun Damman
On Thu, 28 Jun 2007 09:19:20 + (UTC), Berteun Damman <[EMAIL PROTECTED]> wrote: > And that leasts to another question, does Python have a function akin to > wcwidth() which gives the number of column positions a unicode character > needs? After playing around a bit with unicodedata.normalize,

Vista 64 + Python2.5 + wxpython 28 issue

2007-06-28 Thread simonroses
Hello Guys, I have installed python 2.5 (AMD64) on Vista (64), also installed wx 2.8 but I'm getting this error: Traceback (most recent call last): File "mymodule.py", line 39, in import wx File "C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\__init__.py", line 4 5, in fro

RE: Evolution of a pythonistas!

2007-06-28 Thread Sells, Fred
this one is fun: http://www.vpython.org/ > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Behalf Of swordofrue > Sent: Thursday, June 28, 2007 1:50 PM > To: python-list@python.org > Subject: Re: Evolution of a pythonistas! > > > Thanks everyone for your respon

Re: try/except/else/finally problem

2007-06-28 Thread Ed Jensen
Peter Otten <[EMAIL PROTECTED]> wrote: >> try: >> f = file('test.txt', 'r') >> except IOError: >> print 'except' >> else: >> print 'else' >> finally: >> print 'finally' > You need Python 2.5 for that to work. In older Python versions you have to > nest try...except...else and try.

process stdin grab

2007-06-28 Thread Seltzer
hello I need to send commands to a process that i did not start. (mplayer specifically) I have the PIP of the process, and thats about all. Any ideas on how to do this in python? i need only to write to its stdin, not read any information from it, and i don't really need to know if my command wor

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-28 Thread John Nagle
Andy Freeman wrote: > On Jun 27, 11:41 pm, John Nagle <[EMAIL PROTECTED]> wrote: > While I agree that weak pointers are good and can not be an > afterthought, I've written code where "back" changed dynamically, and > I'm pretty sure that Nagle has as well. That sort of thing tends to show up

Re: 16bit hash

2007-06-28 Thread Martin v. Löwis
> If the UniqueID is used it must be unique when used in the printer > (where I cannot control which other UniqueID's might be present). I don't know much about PostScript; googling around gives http://fontforge.sourceforge.net/UniqueID.html that says that you should not use them anymore, and h

Re: Too many 'self' in python.That's a big flaw in this language.

2007-06-28 Thread John Nagle
Alex Martelli wrote: > Bjoern Schliessmann <[EMAIL PROTECTED]> > wrote: >... > >>Mh, strange, I personally like to use "this.a" in C++, to make clear >>I use an instance variable. > > > That would be nice, unfortunately your C++ compiler will refuse that, > and force you to use this->a inste

Re: try/except/else/finally problem

2007-06-28 Thread Peter Otten
Ed Jensen wrote: > Peter Otten <[EMAIL PROTECTED]> wrote: > >>> try: >>> f = file('test.txt', 'r') >>> except IOError: >>> print 'except' >>> else: >>> print 'else' >>> finally: >>> print 'finally' > >> You need Python 2.5 for that to work. In older Python versions you have >> to

RE: ironpython exception line number

2007-06-28 Thread Dino Viehland
Given a file foo.py: def f(): You should get these results: IronPython 1.0.60816 on .NET 2.0.50727.312 Copyright (c) Microsoft Corporation. All rights reserved. >>> try: ... execfile('foo.py') ... except IndentationError, e: ... import sys ... x = sys.exc_info() ... >>> print x[1].fi

RE: Can IronPython work as Windows Scripting Host (WSH) language?

2007-06-28 Thread Dino Viehland
Currently IronPython doesn't support being hosted in WSH. It's something we've discussed internally in the past but we've never had the cycles to make it work. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of misiek3d Sent: Thursday, June 28, 2007 3:07 AM

Re: Vista 64 + Python2.5 + wxpython 28 issue

2007-06-28 Thread Martin v. Löwis
> I have installed python 2.5 (AMD64) on Vista (64), also installed wx 2.8 > but I'm getting this error: > > > Traceback (most recent call last): > File "mymodule.py", line 39, in > import wx > File "C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\__init__.py", > line 4 > 5, in

RE: Vista 64 + Python2.5 + wxpython 28 issue

2007-06-28 Thread Simon Roses Femerling
Hello Martin, I installed wxpython 2.8 using the installer (wxPython2.8-win32-unicode-2.8.4.0-py25.ex), yeah I assume is the 32 bits version. Is there any 64 version installer or do I need to build myself ? Thanks, SRF -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED

Re: process stdin grab

2007-06-28 Thread Will Maier
On Thu, Jun 28, 2007 at 08:01:18PM +, Seltzer wrote: > I need to send commands to a process that i did not start. > (mplayer specifically) I have the PIP of the process, and thats > about all. I assume you mean 'PID'. This is somewhat offtopic, but mplayer supports receiving commands from a FI

exception from a thread

2007-06-28 Thread _spitFIRE
assume a scenario, where there is a class that for doing some work, spawns lot of threads. class X: def __init__(self): # Spawns some threads to # do some work now, assuming that at least one of the threads encounters a problem while doing work and throws an exception. Would I

Re: Vista 64 + Python2.5 + wxpython 28 issue

2007-06-28 Thread Martin v. Löwis
> Is there any 64 version installer or do I need to build myself ? There are hardly AMD64 versions of *anything* but the base Python distribution. I strongly advise to use the 32-bit version on AMD64 (in fact, I see little reason to run Win64 at all unless you have more that 4GiB in the box, or un

IMAP library

2007-06-28 Thread Bruno Barberi Gnecco
It seems that this question has been asked a few times in this group before, but sometime has passed since the last post and maybe there's something new. I'm looking for a high level IMAP library--I know of imaplib, but it's awfully documented and I was hoping to avoid reading RFCs for a si

Re: IMAP library

2007-06-28 Thread Jean-Paul Calderone
On Thu, 28 Jun 2007 18:44:02 -0300, Bruno Barberi Gnecco <[EMAIL PROTECTED]> wrote: > It seems that this question has been asked a few times in this >group before, but sometime has passed since the last post and maybe there's >something new. I'm looking for a high level IMAP library--I know

  1   2   >