Re: Issues of state (was: Tkinter or wxpython?)

2007-08-08 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Paul Rubin wrote: . . . >I'm not sure what you're getting at in this context. You can write a >desktop app where the window system communicates with a gui toolkit >th

help a n00b with a Zope site-package install

2007-08-08 Thread sdoty044
I am having a general problem getting Zope installed as part of my linux distro. Sadly, I have always used Python on Windows, and now I am have to do some work for Linux. My goal is to compile a SuSE linux distro of Python with all the same site-packages that I am using on Windows. The only thin

Re: 'Advanced' list comprehension? query

2007-08-08 Thread scottishguy
Thanks for some great explanations and alternatives! I'll go with the any() approach, as its nice and readable (my noShowList is quite small compared to myList). Thanks, John, for the 'make it obvious' tip. As an exercise, if I now wanted to show the entries where the 'noShowList' matches, what

How to reset sys.exec_prefix?

2007-08-08 Thread Bryan
Somehow on my linux box I scrood things up and I lost my python path info. If I check sys.exec_prefix or sys.prefix it shows '/usr/local/', where it should show '/usr/'. Is there a config file somewhere that I can change to fix this, or do I need to do a rebuild/reinstall? Hope not. Thanks, B

Re: How to avoid reverse code engineering of a python executable

2007-08-08 Thread Ben Finney
NicolasG <[EMAIL PROTECTED]> writes: > Now I want to proceed a little bit further asking how can I avoid > (or at least make it difficult) for some one to extract my code by > using reverse code engineer techniques? I came on pyobfuscate but I > would like more suggestions and guide to achieve th

Re: How to reset sys.exec_prefix?

2007-08-08 Thread Bryan
Bryan wrote: > Somehow on my linux box I scrood things up and I lost my python path info. > > If I check sys.exec_prefix or sys.prefix it shows '/usr/local/', where > it should show '/usr/'. > > Is there a config file somewhere that I can change to fix this, or do I > need to do a rebuild/reins

Re: testing

2007-08-08 Thread Ben Finney
nikolay marinov <[EMAIL PROTECTED]> writes: > Hi,there.I'm a young tester (4 months,still learning what is "testing > > software!?!"). I work on Linux and i write my tests with Python. [many more lines of quoted text] Is this a response to another message? I didn't see any parts of the message

Re: Release of Pmw.1.3

2007-08-08 Thread Laurent Pointal
Two problems when trying setup.py installation: * archive unzip into a ./src/Pmw directory - IMHO src is not a good name. * setup.py install failed: [EMAIL PROTECTED] src]# gunzip -c /home/laurent/nobackup/download/Pmw.1.3.tar.gz | tar -xv [EMAIL PROTECTED] src]# cd src [EMAIL PROTECTED] src]#

Re: How to reset sys.exec_prefix?

2007-08-08 Thread Steve Holden
Bryan wrote: > Bryan wrote: >> Somehow on my linux box I scrood things up and I lost my python path info. >> >> If I check sys.exec_prefix or sys.prefix it shows '/usr/local/', where >> it should show '/usr/'. >> >> Is there a config file somewhere that I can change to fix this, or do I >> need t

Re: Google Conspiracy Revealed!

2007-08-08 Thread Bill Sornson
[EMAIL PROTECTED] wrote: > http://www.nasaconspiracy.net/2007/06/content-generator-recognizing-generated.html > - Amazing Google Conspiracies Revealed from CIA, NSA and Government > conspiracies and Dr.Kevorkians magic pills. Ironically, forwarded to Gmail Abuse -- E-mail Address(es): [EMAIL PROT

Re: help a n00b with a Zope site-package install

2007-08-08 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > I am having a general problem getting Zope installed as part of my > linux distro. We have a general problem solving problems that lack any concrete description of what is not working. We need stacktraces and so forth. Maybe reading this helps: http://catb.org/~es

Re: Destruction of generator objects

2007-08-08 Thread MRAB
On Aug 7, 11:28 pm, Stefan Bellon <[EMAIL PROTECTED]> wrote: > Hi all, > > I'm generating a binding from Python to C using SWIG. On the C side I > have iterators over some data structures. On the Python side I > currently use code like the following: > > def get_data(obj): > result = []

Re: Destruction of generator objects

2007-08-08 Thread Stefan Bellon
On Wed, 08 Aug, MRAB wrote: > Simple! :-) Sorry, I forgot to mention that I am forced to using Python 2.4. -- Stefan Bellon -- http://mail.python.org/mailman/listinfo/python-list

RE: Jython - problem import os

2007-08-08 Thread Delaney, Timothy (Tim)
[EMAIL PROTECTED] wrote: > I'm using Jython in combination with Java, webservices and jboss4.0.4. > > The webservice is implemented in java and creates an PythonInterpreter > object which loads the jython scripts. > I wrote an jython script which uses a function from another jython > file called

Re: some import / namespace questions

2007-08-08 Thread stef mientki
Marc 'BlackJack' Rintsch wrote: > On Wed, 08 Aug 2007 17:11:19 +0200, stef mientki wrote: > > >> Now it's not possible to import in the existing modules the main plugin, >> like >>from Main_User import * >> because this will start the infinite loop. >> > > Which means there's code at t

Re: How can I programmatically find the name of a method from within that method?

2007-08-08 Thread Tony
On Aug 8, 9:28 pm, Peter Otten <[EMAIL PROTECTED]> wrote: > No, just wrong. > > >> class A: > > ... def alpha(self): return dir(self)[-2] > ... def gamma(self): return dir(self)[-1] > ...>>> a = A() > >>> a.alpha(), a.gamma() > ('alpha', 'gamma') > >>> a.beta = 42 > >>> a.alpha(), a.gamma(

Re: some import / namespace questions

2007-08-08 Thread Steve Holden
stef mientki wrote: > Marc 'BlackJack' Rintsch wrote: >> On Wed, 08 Aug 2007 17:11:19 +0200, stef mientki wrote: >> >> >>> Now it's not possible to import in the existing modules the main plugin, >>> like >>>from Main_User import * >>> because this will start the infinite loop. >>> >>

Re: Launch file from Python

2007-08-08 Thread [EMAIL PROTECTED]
On Aug 8, 2:39 pm, [EMAIL PROTECTED] wrote: > On Aug 8, 2:35 pm, Arnau Sanchez <[EMAIL PROTECTED]> wrote: > > > > > > > [EMAIL PROTECTED] escribió: > > > > That's just the exit status or run status, if I recall correctly. I > > > think 0 (i.e. False) means it didn't run properly and anything else i

Re: Destruction of generator objects

2007-08-08 Thread Graham Dumpleton
On Aug 8, 8:28 am, Stefan Bellon <[EMAIL PROTECTED]> wrote: > Hi all, > > I'm generating a binding from Python to C using SWIG. On the C side I > have iterators over some data structures. On the Python side I > currently use code like the following: > > def get_data(obj): > result = []

what's the point of pow()?

2007-08-08 Thread richyjsm
it's a serious question: why does the builtin pow function exist? for two argument pow we've got **. there's no add() for + or mul() for * and three argument pow-with-modulo seems like specilaist usage that belongs in the standard lib, not in the core. I know about crypto and number theory

Re: Issues of state

2007-08-08 Thread greg
Paul Rubin wrote: > The high bandwidth and persistence is not needed for an http > connection, which just gets a form submission once in a while. Bandwidth isn't really the main issue. The point is that a lot of state is kept on both ends, making it much easier to implement a rich user interface.

Re: some import / namespace questions

2007-08-08 Thread Graham Dumpleton
On Aug 9, 1:11 am, stef mientki <[EMAIL PROTECTED]> wrote: > hello, > > I'm working on a rather strange program, > that is partially build dynamically, > and where users can create plugins, > without knowing any of the details of the core program. > > Of course this leads to some weird bugs, > so o

EXCELLENT advice on "foreign brides"

2007-08-08 Thread bstevens
You've seen them a million times: those fascinating web sites with thousands of pictures of foreign women, many of them incredibly beautiful, and every one of them saying she is "looking for a kind, gentle man who will love me," and likes "cooking, sewing, and making a cozy home" and "walking and h

Re: Something in the function tutorial confused me.

2007-08-08 Thread greg
Steve Holden wrote: > For some reason your reply got right up my nose, I'm sorry about that. Sometimes it's hard to judge the level of experience with Python that a poster has. In discussions about this particular topic, often it turns out that the person is a newcomer to Python who is using the

Re: Misleading wikipedia article on Python 3?

2007-08-08 Thread greg
Istvan Albert wrote: > A solution would be writing the code with a logging function to begin > with, alas many times that is out of one's hand. If the code has been written with calls to a builtin print function, the situation isn't much better. You could monkeypatch the print function, but that's

Re: Something in the function tutorial confused me.

2007-08-08 Thread Steve Holden
greg wrote: > Steve Holden wrote: > >> For some reason your reply got right up my nose, > > I'm sorry about that. Sometimes it's hard to judge the > level of experience with Python that a poster has. In > discussions about this particular topic, often it turns > out that the person is a newcomer

Re: accessing parts of large files with File.seek()

2007-08-08 Thread [EMAIL PROTECTED]
On Aug 8, 11:46 am, "mhearne808[insert-at-sign-here]gmail[insert-dot- here]com" <[EMAIL PROTECTED]> wrote: > I'm having a problem with the File object's seek() method. > Specifically, I cannot use it to seek to a location in a binary file > that is greater than 2^31 (2147483648). This seems unnece

Re: How can I programmatically find the name of a method from within that method?

2007-08-08 Thread faulkner
On Aug 8, 12:45 am, kj7ny <[EMAIL PROTECTED]> wrote: > Is there a way that I can programmatically find the name of a method I > have created from within that method? I would like to be able to log > a message from within that method (def) and I would like to include > the name of the method from w

Re: Issues of state (was: Tkinter or wxpython?)

2007-08-08 Thread Paul Rubin
[EMAIL PROTECTED] (Cameron Laird) writes: > Others have answered this at other levels. In elementary terms, > there truly is a difference, Paul, and one that's widely reified: > a "desktop client-server" application typically listens through > one socket, which therefore constitutes an index of th

Re: what's the point of pow()?

2007-08-08 Thread Paul Rubin
[EMAIL PROTECTED] writes: > it's a serious question: why does the builtin pow function exist? > for two argument pow we've got **. there's no add() for + or mul() > for * They are in the operator module and maybe pow could go there too. Actually there's a math.pow function that works differ

Re: How can I programmatically find the name of a method from within that method?

2007-08-08 Thread faulkner
On Aug 8, 10:43 pm, faulkner <[EMAIL PROTECTED]> wrote: > On Aug 8, 12:45 am, kj7ny <[EMAIL PROTECTED]> wrote: > > > Is there a way that I can programmatically find the name of a method I > > have created from within that method? I would like to be able to log > > a message from within that method

mmm-mode, python-mode and doctest-mode?

2007-08-08 Thread Edward Loper
> Anyone testing on xemacs? I tried it, and C-c C-c sent xemacs into an > infinite loop (apparantly). It works fine for me in XEmacs 21.4 (patch 17) (i386-debian-linux, Mule). If you could answer a few questions, it might help me track down the problem: - What version of xemacs are you runnin

Re: Misleading wikipedia article on Python 3?

2007-08-08 Thread Evan Klitzke
On 8/8/07, greg <[EMAIL PROTECTED]> wrote: > Istvan Albert wrote: > > A solution would be writing the code with a logging function to begin > > with, alas many times that is out of one's hand. > > If the code has been written with calls to a builtin > print function, the situation isn't much better

wxPython before MainLoop

2007-08-08 Thread [david]
I'd like to refresh the display before I start the main loop. I have code like this: app = App() app.Show() app.long_slow_init() app.MainLoop() The main frame partly loads at Show, but because the mainloop has not started yet, the display does not update until long_slow_init() finishes. Alter

Re: accessing parts of large files with File.seek()

2007-08-08 Thread mhearne808[insert-at-sign-here]gmail[insert-dot-here]com
On Aug 8, 7:37 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Aug 8, 11:46 am, "mhearne808[insert-at-sign-here]gmail[insert-dot- > > > > here]com" <[EMAIL PROTECTED]> wrote: > > I'm having a problem with the File object's seek() method. > > Specifically, I cannot use it to seek to a locati

Re: Destruction of generator objects

2007-08-08 Thread Stefan Bellon
On Thu, 09 Aug, Graham Dumpleton wrote: > result = application(environ, start_response) > try: > for data in result: > if data:# don't send headers until body appears > write(data) > if not headers_sent: > write('') # send heade

how to get output.

2007-08-08 Thread indu_shreenath
Hey, I want to get the output of "DIR /AD /B" command to a varriable using python. How can I do this? Thanks, Indu -- http://mail.python.org/mailman/listinfo/python-list

Re: How can I programmatically find the name of a method from within that method?

2007-08-08 Thread Peter Otten
Tony wrote: > On Aug 8, 9:28 pm, Peter Otten <[EMAIL PROTECTED]> wrote: > >> No, just wrong. >> >> >> class A: >> >> ... def alpha(self): return dir(self)[-2] >> ... def gamma(self): return dir(self)[-1] >> ...>>> a = A() >> >>> a.alpha(), a.gamma() >> ('alpha', 'gamma') >> >>> a.beta = 4

Re: how to get output.

2007-08-08 Thread Diez B. Roggisch
indu_shreenath schrieb: > Hey, > I want to get the output of "DIR /AD /B" command to a varriable using > python. How can I do this? Using the subprocess-module. However, I'm not sure what DIR /AD /B does - but there are many functions in module os that might deliver what you want without invok

<    1   2