Re: Help Needed in WxPython

2007-06-28 Thread felix seltzer
If you use pygtk, the notebook object could do that in a few lines of code but im not sure about wxPython. note that if your using *nix of some sort, gtk should work fine, but under windows some people report issues. -felix On 6/28/07, senthil arasu <[EMAIL PROTECTED]> wrote: Hi, Currently

Re: Threads Dying?

2007-06-28 Thread felix seltzer
are you using pygtk as well? how are you using your threads, (just out of curiosity into the issue) -felix On 6/28/07, Gabriel Genellina <[EMAIL PROTECTED]> wrote: En Thu, 28 Jun 2007 15:12:53 -0300, Robert Rawlins - Think Blue <[EMAIL PROTECTED]> escribió: > I've got an application that seem

Re: Looking for an interpreter that does not request internet access

2007-06-28 Thread casevh
On Jun 25, 6:07 pm, James Alan Farrell <[EMAIL PROTECTED]> wrote: > Hello, > I recently installed new anti-virus software and was surprised the > next time I brought up IDLE, that it was accessing the internet. > > I dislike software accessing the internet without telling me about it, > especially

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

2007-06-28 Thread Michele Simionato
On Jun 29, 6:44 am, Douglas Alan <[EMAIL PROTECTED]> wrote: > > I've written plenty of Python code that relied on destructors to > deallocate resources, and the code always worked. You have been lucky: $ cat deallocating.py import logging class C(object): def __init__(self): logging.

Re: glob.glob standardization

2007-06-28 Thread Tim Roberts
billiejoex <[EMAIL PROTECTED]> wrote: >... >glob.glob, instead, return file names only if given path is relative: > os.chdir('Desktop') os.getcwd() >'/home/user/Desktop glob.glob("*") >['file.py'] > >...and absolute file names if given path is absolute: > glob.glob('/home/user/D

Re: Rappresenting infinite

2007-06-28 Thread mmanns
On Thu, 28 Jun 2007 23:20:30 -0500 Robert Kern <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Does it differ from the > > built-in inf? > > What built-in inf? $ python Python 2.4.4 (#2, Apr 5 2007, 20:11:18) [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 Type "help", "

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

2007-06-28 Thread Douglas Alan
"Chris Mellon" <[EMAIL PROTECTED]> writes: > Obviously. But theres nothing about the with statement that's > different than using smart pointers in this regard. Sure there is -- smart pointers handle many sorts of situations, while "with" only handles the case where the lifetime of the object cor

Python & cgi on win98--tinyweb problems, etc

2007-06-28 Thread Kirk Bailey
RE: TinyWeb running python in windows PROBLEM: getting python scripts to execute. SOLUTION: Insure the script ends in the name extension .py. Windows associates all such files with the pythonw.exe interpreter program, and will use it to interpret them. IT IGNORES THE SHEBANG (the first line in

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

2007-06-28 Thread mmanns
On Fri, 29 Jun 2007 00:47:16 -0300 "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > __hash__ and equality tests are used by the dictionary > implementation, and the default implementation is OK for immutable > objects. That is probably why inf == inf yields True. In this unique case, I do not lik

Re: Rappresenting infinite

2007-06-28 Thread Robert Kern
[EMAIL PROTECTED] wrote: > On Wed, 27 Jun 2007 11:59:29 - > Rob De Almeida <[EMAIL PROTECTED]> wrote: > >> On Jun 27, 6:41 am, andrea <[EMAIL PROTECTED]> wrote: >>> I would like to have a useful rappresentation of infinite, is there >>> already something?? >> from numpy import inf > > $ pytho

Re: Threads Dying?

2007-06-28 Thread Gabriel Genellina
En Thu, 28 Jun 2007 15:12:53 -0300, Robert Rawlins - Think Blue <[EMAIL PROTECTED]> escribió: > 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 threa

Re: win32event.WaitForInputIdle() returns too soon

2007-06-28 Thread Gabriel Genellina
En Thu, 28 Jun 2007 19:15:40 -0300, Hans <[EMAIL PROTECTED]> escribió: > I'm sending keyboard and mouse events to a seperate windows application. > I use win32event.WaitForInputIdle() before calling e.g. > win32api.keybd_event() > However it seems that WaitForInputIdle() returns too soon because s

Re: Rappresenting infinite

2007-06-28 Thread mmanns
On Wed, 27 Jun 2007 11:59:29 - Rob De Almeida <[EMAIL PROTECTED]> wrote: > On Jun 27, 6:41 am, andrea <[EMAIL PROTECTED]> wrote: > > I would like to have a useful rappresentation of infinite, is there > > already something?? > > from numpy import inf > $ python Python 2.4.4 (#2, Apr 5 2007

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

2007-06-28 Thread Gabriel Genellina
En Thu, 28 Jun 2007 11:38:56 -0300, A.T.Hofkamp <[EMAIL PROTECTED]> escribió: > The point I intended to make was that having a default __hash__ method on > objects give weird results that not everybody may be aware of. > In addition, to get useful behavior of objects in sets one should > overr

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

2007-06-28 Thread Douglas Alan
Steve Holden <[EMAIL PROTECTED]> writes: >> Actually, it's "chacun". And the "à" may precede the "chacun". >> |>oug > "chacun" is an elision of the two words "Chaque" (each) and "un" > (one), and use of those two words is at least equally correct, though > where it stands in modern usage I must

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-28 Thread Tim Roberts
Twisted <[EMAIL PROTECTED]> wrote: > >On Jun 27, 8:26 am, [EMAIL PROTECTED] (Timofei Shatrov) wrote: >> >> Lie. Ghostscript works out of the box on Windows. > >You're joking. First of all I am not a liar, and secondly, Ghostscript >and Ghostview are tricky to set up correctly. I know -- I've done i

Help Needed in WxPython

2007-06-28 Thread senthil arasu
Hi, Currently Iam integrating GUI Framework in Python. As per design design,I need to use tab buttons to launch different HTML pages in same frame(without launching seperate window ). I have already tried with webbrowser class & WxPython GUI kit. Iam unable to get the expected result. I am wanted

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

2007-06-28 Thread Steve Holden
Douglas Alan wrote: > Steve Holden <[EMAIL PROTECTED]> writes: > >> Douglas Woodrow wrote: > >>> On Wed, 27 Jun 2007 01:45:44, Douglas Alan <[EMAIL PROTECTED]> wrote > A chaque son gout > >>> I apologise for this irrelevant interruption to the conversation, >>> but this isn't the first tim

Re: Converting Diff Output to XML?

2007-06-28 Thread Debajit Adhikary
That looks very good :)Thanks a ton! On 6/27/07, Yongjian Xu <[EMAIL PROTECTED]> wrote: gnosis has a converter for ASCII file to xml file, its called txt2dw.py. give it a try. -- Jim On 6/26/07, Debajit Adhikary <[EMAIL PROTECTED]> wrote: > > What would be the best way to convert the regular

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

2007-06-28 Thread Douglas Alan
Steve Holden <[EMAIL PROTECTED]> writes: > Douglas Woodrow wrote: >> On Wed, 27 Jun 2007 01:45:44, Douglas Alan <[EMAIL PROTECTED]> wrote >>> A chaque son gout >> I apologise for this irrelevant interruption to the conversation, >> but this isn't the first time you've written that. The word >>

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

2007-06-28 Thread Steve Holden
A.T.Hofkamp wrote: > 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

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

2007-06-28 Thread Steve Holden
Douglas Woodrow wrote: > On Wed, 27 Jun 2007 01:45:44, Douglas Alan <[EMAIL PROTECTED]> wrote >> A chaque son gout > > I apologise for this irrelevant interruption to the conversation, but > this isn't the first time you've written that. > > The word "chaque" is not a pronoun. > > http://gramma

Re: Collections of non-arbitrary objects ?

2007-06-28 Thread Steve Holden
Paul Rubin wrote: > Steve Holden <[EMAIL PROTECTED]> writes: >> Think of a tuple as an ordered collection. A given element's ordinal >> position indicates its semantics (meaning, significance), and >> generally it won't make sense to iterate over the elements of a tuple >> (though naturally that do

Re: Looking for an interpreter that does not request internet access

2007-06-28 Thread William Allison
James Alan Farrell wrote: > At the risk of sounding clueless, what is "the regular interpreter"? > I've now read several python books, and they all recommend IDLE. > By typing "python" at your command prompt you'll also get an interactive interpreter. -- http://mail.python.org/mailman/listinfo

Re: process stdin grab

2007-06-28 Thread Seltzer
thanks for the suggestions. I'm not able to modify the mplayer command... and they do not create a fifo and yes, i meant 'pid', sorry. -felix On 6/28/07, Will Maier <[EMAIL PROTECTED]> wrote: On Thu, Jun 28, 2007 at 08:01:18PM +, Seltzer wrote: > I need to send commands to a process that

Re: Looking for an interpreter that does not request internet access

2007-06-28 Thread James Alan Farrell
On Mon, 25 Jun 2007 20:41:59 -0500, Robert Kern <[EMAIL PROTECTED]> wrote: >James Alan Farrell wrote: >> Hello, >> I recently installed new anti-virus software and was surprised the >> next time I brought up IDLE, that it was accessing the internet. >> >> I dislike software accessing the internet

Re: Looking for an interpreter that does not request internet access

2007-06-28 Thread James Alan Farrell
On Tue, 26 Jun 2007 03:50:11 -, John Roth <[EMAIL PROTECTED]> wrote: >On Jun 25, 7:07 pm, James Alan Farrell <[EMAIL PROTECTED]> wrote: >> Hello, >> I recently installed new anti-virus software and was surprised the >> next time I brought up IDLE, that it was accessing the internet. >> >> I di

Re: try/except/else/finally problem

2007-06-28 Thread Ben Finney
Ed Jensen <[EMAIL PROTECTED]> writes: > 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 'f

HTML Page Rendering Support in WxPython Frame

2007-06-28 Thread senthil arasu
Hi, Currently Iam integrating GUI Framework in Python. As per design design,I need to use tab buttons to launch different HTML pages in same frame(without launching seperate window ). I have already tried with webbrowser class & WxPython GUI kit. Iam unable to get the expected result. I am wanted

Re: Getting some element from sets.Set

2007-06-28 Thread [EMAIL PROTECTED]
On May 9, 11:41 am, Steven Bethard <[EMAIL PROTECTED]> wrote: > $ python -m timeit -s "s = set('abcdef')" "x = s.pop(); s.add(x)" It's interesting that that's faster. I'd be hesitant to use that in a real program because it's so unattractive (as is the '.next()' approach). To me a builtin

Re: suggestion: recursive collections.defaultdict

2007-06-28 Thread [EMAIL PROTECTED]
On Jun 18, 1:56 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > In <[EMAIL PROTECTED]>, > > [EMAIL PROTECTED] wrote: > > It seems like > > > x = defaultdict(defaultdict(list)) > > > should do the obvious, but it doesn't. > > It *does* the obvious. Parenthesis after a name means: call

Re: exception from a thread

2007-06-28 Thread Diez B. Roggisch
_spitFIRE schrieb: > 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 doin

win32event.WaitForInputIdle() returns too soon

2007-06-28 Thread Hans
Hi all, I'm sending keyboard and mouse events to a seperate windows application. I use win32event.WaitForInputIdle() before calling e.g. win32api.keybd_event() However it seems that WaitForInputIdle() returns too soon because some of my events get lost. Now I'v created my own WaitForInputIdle()

Writing TGA image files?

2007-06-28 Thread Adam Pletcher
Does anyone have Python code for writing Targa (TGA) image files? Ideally, with options for bit-depth/alpha channel, and RLE compression, but I'm probably reaching there. PIL is read-only for TGAs, unfortunately, and so far I'm striking out on Google. Thanks. -- Adam Pletcher Technical Art Direct

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

2007-06-28 Thread Andy Freeman
On Jun 28, 1:09 pm, John Nagle <[EMAIL PROTECTED]> wrote: > 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 sur

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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: 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] ~ $

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

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

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

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 #=

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

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

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

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

  1   2   >