GTK for windows and Linux

2005-11-16 Thread Ask
Hi All, Can someone please tell me what I need to use GTK with python for windows and Linux? Any links to the appropriate installations would be greatly appreciated as I don't know what I need... GIMP... GTK+ etc Thanks for any advice Pauly -- http://mail.python.org/mailman/listinfo/pyth

Re: newbie - How do I import automatically?

2005-11-16 Thread Mikael Olofsson
[EMAIL PROTECTED] wrote: > I tried to put the line > from btools import * > in several places in PyShell.py > but to now avail. It does not work, IDLE does not execute it??? IDLE definitely executes PyShell.py upon startup, since IDLE does not even appear on the screen if there is an error in tha

Re: is parameter an iterable?

2005-11-16 Thread Steven D'Aprano
Fredrik Lundh wrote: > Steven D'Aprano wrote: > > >>This means we're no longer assuming what the error message will be, >>which makes our code a lot more future-proof and implementation-proof: if >>some version of Python changes the error string from "iteration over >>non-sequence" to something

Controlling Excel with win32com

2005-11-16 Thread Al Christians
I'm starting to test a python application that creates an Excel workbook, then fills in values for some cells and formulas for other cells. The formulas involve circular references, which will cause Excel to take a little time to update and iterate through the successive approximations of find

Re: best way to discover this process's current memory usage, cross-platform?

2005-11-16 Thread [EMAIL PROTECTED]
Alex Martelli wrote: > > Considering that the main purpose is adding regression tests to confirm > that a hopefully-fixed memory leak does not recur, I'm not sure why > shared memory should be a problem. What scenarios would "leak shared > memory"? Apache leaks SHM segments in some scenarios. Sy

Re: subprocess terminate help

2005-11-16 Thread Do Re Mi chel La Si Do
Hi! Self-destruction of a script: import os os.popen('TASKKILL /PID '+str(os.getpid())+' /F') (only in windows XP or 2K) @-salutations Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating (rather) generic plugin framework?

2005-11-16 Thread Jean-Paul Calderone
On Wed, 16 Nov 2005 17:14:27 +0200, Edvard Majakari <[EMAIL PROTECTED]> wrote: >Hi, > >My idea is to create a system working as follows: each module knows >path to plugin directory, and that directory contains modules which >may add hooks to some points in the code. > >Inspired by http://www.python

Re: python-mysqldb__debian_to_freebsd

2005-11-16 Thread Mike Meyer
Damjan <[EMAIL PROTECTED]> writes: >> Is there any at all chance that this will work >> with the proper configs or should I go ahead >> and beg the host for an installation ? > It seems to me very unlikely that a program compiled for FreeBSD would link > to a library compiled for Debian Linux

Re: running functions

2005-11-16 Thread Gorlon the Impossible
On Thu, 17 Nov 2005 00:08:02 GMT, [EMAIL PROTECTED] (Cameron Laird) wrote: >In article <[EMAIL PROTECTED]>, >Grant Edwards <[EMAIL PROTECTED]> wrote: >>On 2005-11-16, Gorlon the Impossible <[EMAIL PROTECTED]> wrote: >> >>> I'm not sure how to phrase this question. I have a Python function >>> tha

Re: Auto Install Linux Rpm's

2005-11-16 Thread Lars Kellogg-Stedman
> We would like to use Python to automatically deploy new rpm's (assuming we > first edit a file to require a new version). I've just starting looking a > the rpm module. I can build this from scratch, but was wondering if anyone > is/has solved some or all of this problem or could point me to so

Re: Quitting a Tkinter application with confirmation

2005-11-16 Thread jepler
Sure, there's a difference. Consider how this program behaves. Quit only quits the mainloop, Destroy destroys the root widget. When you Quit, you can enter the mainloop again. from Tkinter import * t = Tk() Button(t, command=t.quit, text="Quit").pack() Button(t, command=t.destroy, text="Destroy")

Re: Python, Linux, Desktop Environment

2005-11-16 Thread jeremyvoros
Thanks everyone. Making a shortcut was just too obvious for me... I just made a KDE shortcut that runs the python command for me. -- http://mail.python.org/mailman/listinfo/python-list

Re: Quitting a Tkinter application with confirmation

2005-11-16 Thread Peter Kleiweg
Fredrik Lundh schreef op de 16e dag van de slachtmaand van het jaar 2005: > Peter Kleiweg wrote: > > > I want the program to behave identical if the 'close' button of > > the application window is clicked. I tried the code below, > > using a class derived from Tk that redefines the destroy > > me

Re: python-mysqldb__debian_to_freebsd

2005-11-16 Thread Damjan
> Is there any at all chance that this will work > with the proper configs or should I go ahead > and beg the host for an installation ? It seems to me very unlikely that a program compiled for FreeBSD would link to a library compiled for Debian Linux which in turn was linked to a Debian lib

Re: Newbie wxPython ListCtrl Question

2005-11-16 Thread Todd7
Thank you very much. That is exactly what I needed. limodou <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > 2005/11/17, Todd7 <[EMAIL PROTECTED]>: >> I am new to python and to wxWindows. I have tried searching google, >> reading the documentation and trying to figure out some of the >>

Re: Python obfuscation

2005-11-16 Thread Mike Meyer
[EMAIL PROTECTED] (Alex Martelli) writes: > Mike Meyer <[EMAIL PROTECTED]> wrote: >> Alex's solution doesn't require special treatment for disaster >> recovery and/or planning, and as such is a valid answer to the > I'm not sure I understand this. I would assume that any software (or, > for that m

Re: Newbie wxPython ListCtrl Question

2005-11-16 Thread limodou
2005/11/17, Todd7 <[EMAIL PROTECTED]>: > I am new to python and to wxWindows. I have tried searching google, > reading the documentation and trying to figure out some of the examples, > but I am stumped as to how to get information out of a listctrl at a > certain row and column. I tried to write

Re: Python obfuscation

2005-11-16 Thread The Eternal Squire
Standard libraries are usually paid for by the implementor of the language, so this is not an issue. -- http://mail.python.org/mailman/listinfo/python-list

Re: Proposal for adding symbols within Python

2005-11-16 Thread Steven Bethard
Pierre Barbier de Reuille wrote: > Proposal > > > First, I think it would be best to have a syntax to represent symbols. > Adding some special char before the name is probably a good way to > achieve that : $open, $close, ... are $ymbols. How about using the prefix "symbol." instead of "

Re: Python obfuscation

2005-11-16 Thread Alex Martelli
Mike Meyer <[EMAIL PROTECTED]> wrote: > Alex's solution doesn't require special treatment for disaster > recovery and/or planning, and as such is a valid answer to the I'm not sure I understand this. I would assume that any software (or, for that matter, data) of any substantial importance, wort

Re: Python obfuscation

2005-11-16 Thread Alex Martelli
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Wed, 16 Nov 2005 13:51:35 +, Ed Jensen wrote: > > > Steven D'Aprano <[EMAIL PROTECTED]> wrote: > >> I'm not sure if that is meant to be a rhetorical > >> question or not, but something of the order of 95% of > >> all software written is never

Re: best way to discover this process's current memory usage, cross-platform?

2005-11-16 Thread Alex Martelli
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: ... > Neal Norwitz wrote: > > Here's a really screwy thought that I think should be portable to all > > Unixes which have dynamic linking. LD_PRELOAD. > > > > You can create your own version of malloc (and friends) and free. You > > intercept each

Re: Python obfuscation

2005-11-16 Thread The Eternal Squire
Plenty of case law exists behind judgements made to repair loss of sales opportunites... these are called infringement upon sales territories.. -- http://mail.python.org/mailman/listinfo/python-list

python-dev Summary for 2005-09-01 to 2005-09-15

2005-11-16 Thread Tony Meyer
[Note: yes, this is *September*! All my (Tony's) bad, Steve has been chugging away at the summaries like he should have. Extra apologies for this one - it was approved by python-dev a while back, and I didn't realise that I hadn't done the python-list post.] python-dev Summary for 2005-09-

Re: newbie - How do I import automatically?

2005-11-16 Thread Steve M
The file C:\Python24\Lib\sitecustomize.py (which I think doesn't exist by default) executes every time Python starts. (This means not just your IDLE session but every time you run any Python script.) One use for this file is to invoke sys.setdefaultencoding because that name gets deleted during in

Re: running functions

2005-11-16 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Grant Edwards <[EMAIL PROTECTED]> wrote: >On 2005-11-16, Gorlon the Impossible <[EMAIL PROTECTED]> wrote: > >> I'm not sure how to phrase this question. I have a Python function >> that sends MIDI messages to a synth. When I run it, I of course have >> to wait until

Re: Python vs Ruby

2005-11-16 Thread bellarchitects
bruno modulix wrote: > > It's been a long time since I last saw a Java applet on a website. > That can only mean you are ignorant. Applets are a huge deal for Intranets. And Java Web Start is even more useful. I really wish Python had such wonderful means of deployment. bruno modulix wrote > Er

Re: strange file.write() behavior on windows: $ConvertToNonresident, $ReplaceAttribute2

2005-11-16 Thread jepler
This is really just a snide joke at the expense of Microsoft, but have you checked the MSDN documentation about ConvertToNonresident or ReplaceAttribute2? Your search - site:msdn.microsoft.com ConvertToNonresident OR ReplaceAttribute2 - did not match any documents. -- google.com

Re: JMS yet again

2005-11-16 Thread Mike Meyer
Ben Finney <[EMAIL PROTECTED]> writes: > Aahz <[EMAIL PROTECTED]> wrote: >> Am I the only person who immediately thought of Babylon 5 and >> wondered if I was in the wrong newsgroup? > > I plead guilty. Well, I thought of Crusade. But I'd just finished watching those. htt

strange file.write() behavior on windows: $ConvertToNonresident, $ReplaceAttribute2

2005-11-16 Thread welch
while taking some rough disk performance measures on windows machines, and snooping with FileMon, i've noticed some odd behavior here's the little nul-writer i'm running: def writeTest(nBlocks, blockSize): """write nBlocks*blockSize nuls to a file""" f = open("writeTest.out", "wb") nulBloc

Re: subprocess terminate help

2005-11-16 Thread Fredrik Lundh
Ernesto wrote > program.exe ? I was looking at the Windows task manager after I used a > Cntrl + C to manually terminate the running python program. The > program.exe is apparently ending when I end the python program. I have to admit that I have no idea what you're doing, really. The code you

Auto Install Linux Rpm's

2005-11-16 Thread Sells, Fred
We would like to use Python to automatically deploy new rpm's (assuming we first edit a file to require a new version). I've just starting looking a the rpm module. I can build this from scratch, but was wondering if anyone is/has solved some or all of this problem or could point me to some "good

RE: HTML generation vs PSP vs Templating Engines

2005-11-16 Thread Sells, Fred
If this is your first try, use cgi, cgitb and html % dictionary as suggested in this thread. If your db is mysql, you can actually use os.popen() (or equivalent) to run a 'mysql -html -e "select * from yaddayadda" to return html. you can make that look prettier with css. here's a quick and dirty

Re: HTML generation vs PSP vs Templating Engines

2005-11-16 Thread thakadu
I just do the following: I store the form data as a pickeled dictionary. Then I create my HTML form with something like this: HTMLout=""".. .. ''' where the field1, field2 etc era the fields on my form. Then finally: print HTMLout % dict where dict has all the values that I previous

Re: Python, Linux, Desktop Environment

2005-11-16 Thread Lee Harr
On 2005-11-16, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > So, I've written my first GUI app in python. I've turned it into a > binary .exe and .app that runs on Windows and Mac respectively, but on > my Linux box, where I wrote the thing, I still have to drop to the > command line and ./myscri

Re: Python obfuscation

2005-11-16 Thread Mike Meyer
"The Eternal Squire" <[EMAIL PROTECTED]> writes: > A fair request. The teaching of legality and ethics of incorporating > other peoples' works into one's own should begin at 6th grade and be > repeated every year until the message is driven home. Right. You want to teach potential programmers th

Re: subprocess terminate help

2005-11-16 Thread Ernesto
program.exe ? I was looking at the Windows task manager after I used a Cntrl + C to manually terminate the running python program. The program.exe is apparently ending when I end the python program. -- http://mail.python.org/mailman/listinfo/python-list

Re: JMS yet again

2005-11-16 Thread Ben Finney
Aahz <[EMAIL PROTECTED]> wrote: > Am I the only person who immediately thought of Babylon 5 and > wondered if I was in the wrong newsgroup? I plead guilty. -- \ "I like to reminisce with people I don't know. Granted, it | `\ takes longer." -- Steven

Re: HTML generation vs PSP vs Templating Engines

2005-11-16 Thread Damjan
> After some thought I decided to leave the various frameworks > aside for the time being and use mod_python.publisher along with some > means of generating HTML on the fly. I kind of like KID templates the most, you can easyly work with them in any HTML authoring software, they are easy to use (p

Re: Python obfuscation

2005-11-16 Thread Ben Finney
The Eternal Squire <[EMAIL PROTECTED]> wrote: > Ben Finney wrote: > >Ethics such as sharing, and helping one's neighbour? > > Giving away an illegal copy of software it not helping one's > neighbor, it is making that neighbor an accessory to copyright > infringement, a federal offense punishable n

Re: path module / class

2005-11-16 Thread Neil Hodgson
Chris: > What is the status of the path module/class PEP? Did somebody start > writing one, or did it die? I would really like to see something like > Jason Orendorff's path class make its way into the python standard > library. There is no PEP yet but there is a wiki page. http://wiki.pyth

Python driver for lpsolve

2005-11-16 Thread Peter Notebaert
lp_solve is a Mixed Integer Linear Programming (MILP) solver (see http://lpsolve.sourceforge.net/5.5/). There is now a Python driver to lpsolve. See http://lpsolve.sourceforge.net/5.5/Python.htm for more information about this driver. Peter -- http://mail.python.org/mailman/listinfo/pytho

Re: Python obfuscation

2005-11-16 Thread Ben Finney
The Eternal Squire <[EMAIL PROTECTED]> wrote: > >The legality of copying, modifying and redistributing works should be > >reformed until it matches a 6th grader's intuitions about sharing. > > A 6th grader also has intuitions regarding the ownership of an idea. > "It was MY idea!!!" "No, it's NOT

Re: is parameter an iterable?

2005-11-16 Thread Roy Smith
Steven D'Aprano <[EMAIL PROTECTED]> wrote: ># Create an instance of the exception you expect: >try: >for i in 0: >pass >except TypeError, ITER_OVER_NON_SEQ: >pass ># Now run your code... >try: >...blah blah blah... >except TypeError, msg >if str(msg) == str(ITER_OVER_NON_SE

python-mysqldb__debian_to_freebsd

2005-11-16 Thread Cousin Stanley
Greetings I'm using a commercial web host running FreeBSD that fortunately has Python and MySQL, but no python-mysqldb module Before begging the host to install it I thought I would try the Debian version that I have on the outside chance that it might fly directly

Re: JMS yet again

2005-11-16 Thread Aahz
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > [...] Am I the only person who immediately thought of Babylon 5 and wondered if I was in the wrong newsgroup? -- Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncraft.com/ "If you think it's expensiv

Re: is parameter an iterable?

2005-11-16 Thread Bengt Richter
On Wed, 16 Nov 2005 17:39:57 +0100, "Fredrik Lundh" <[EMAIL PROTECTED]> wrote: >Rick Wotnaz wrote. > >> ... which leads me to belive that 'msg' is not type(str). It can be >> coerced (str(msg).find works as expected). But what exactly is msg? >> It appears to be of , and does not test equal to a >

Re: is parameter an iterable?

2005-11-16 Thread Fredrik Lundh
> Alex has already posted the right way to do this. can you please stop posting crappy non-solutions to a problem that has a very simple solution (split things up), that should be obvious to anyone who didn't sleep through exceptions 101. -- http://mail.python.org/mailman/listinfo/python-l

Re: Newb ?

2005-11-16 Thread Chad Everett
Hey guys, Thanks for the hint. I found that info last night but I could never get it to print more than just the last letter. or it would only print partially. I was using just a single colon, the double colon did it. Thanks "Chad Everett" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROT

Re: subprocess terminate help

2005-11-16 Thread Ernesto
A... I figured out a way around this. I'll use program.exe to shut down itself. That way I won't have to use any extension modules. Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: Python obfuscation

2005-11-16 Thread Steven D'Aprano
On Wed, 16 Nov 2005 14:00:16 -0800, The Eternal Squire wrote: >>The legality of copying, modifying and redistributing works should be >>reformed until it matches a 6th grader's intuitions about sharing. > > A 6th grader also has intuitions regarding the ownership of an idea. > "It was MY idea!!!"

Re: running functions

2005-11-16 Thread [EMAIL PROTECTED]
Gorlon the Impossible wrote: > Hello > I'm not sure how to phrase this question. I have a Python function > that sends MIDI messages to a synth. When I run it, I of course have > to wait until it is finished before I can do anything else with > Python. Is it possible to run this function and still

Re: Python obfuscation

2005-11-16 Thread Steven D'Aprano
On Wed, 16 Nov 2005 13:25:50 -0800, The Eternal Squire wrote: > The teaching of legality and ethics of incorporating > other peoples' works into one's own should begin at 6th grade and be > repeated every year until the message is driven home. I think you have that completely backwards. Sixth gr

Re: Shutdown hook

2005-11-16 Thread Steve Juranich
On 15 Nov 2005 14:45:27 -0800, Steve <[EMAIL PROTECTED]> wrote: > Does any one know if python has the ability to run a shutdown hook. Look at the "atexit" module. barbet (~)$ pydoc atexit.register Help on function register in atexit: atexit.register = register(func, *targs, **kargs) register

Re: path module / class

2005-11-16 Thread Dennis Benzinger
[EMAIL PROTECTED] schrieb: > [...] > What is the status of the path module/class PEP? Did somebody start > writing one, or did it die? I didn't find one at the PEP index , so I assume that nobody wrote or submitted one. > I would really like to see something like > Ja

Re: is parameter an iterable?

2005-11-16 Thread Fredrik Lundh
Steven D'Aprano wrote: > This means we're no longer assuming what the error message will be, > which makes our code a lot more future-proof and implementation-proof: if > some version of Python changes the error string from "iteration over > non-sequence" to something else, the code should continu

Re: Python obfuscation

2005-11-16 Thread The Eternal Squire
>Utter poppycock. Who is to say that a particular entity holds an >exclusive "sales opportunity" to a particular individual? Are we to >protect the expectations of profit for some, at the expense of sharing >things with each other? Utter horse manure. Anyone can profit from something so long as i

Re: subprocess terminate help

2005-11-16 Thread Fredrik Lundh
Ernesto wrote: > Yeah I know. I posted it b/c I was having the same problems and I'm > investigating ways to do this. None of those methods gave me desired > results for my program. All I want to do is end my python program and > return to the DOS prompt. what about the other program? do you

Re: Python obfuscation

2005-11-16 Thread The Eternal Squire
>The legality of copying, modifying and redistributing works should be >reformed until it matches a 6th grader's intuitions about sharing. A 6th grader also has intuitions regarding the ownership of an idea. "It was MY idea!!!" "No, it's NOT!!!" "Is TOO!!!" The Eternal Squire -- http://mail.p

Re: running functions

2005-11-16 Thread Ben Finney
Gorlon the Impossible <[EMAIL PROTECTED]> wrote: > I'm not sure how to phrase this question. I have a Python function > that sends MIDI messages to a synth. When I run it, I of course have > to wait until it is finished before I can do anything else with > Python. Is it possible to run this functio

Re: running functions

2005-11-16 Thread Grant Edwards
On 2005-11-16, Gorlon the Impossible <[EMAIL PROTECTED]> wrote: > I'm not sure how to phrase this question. I have a Python function > that sends MIDI messages to a synth. When I run it, I of course have > to wait until it is finished before I can do anything else with > Python. Is it possible to

Re: Tkinter: scrollbar in grid-managed frame

2005-11-16 Thread jepler
Tkinter "frame"s don't scroll. Instead, you need to use something like bwidget's "ScrollableFrame" widget. You may want to combine this with bwidget's "ScrolledWindow". Below is an example which uses my "pybwidget" package, available at http://tkinter.unpy.net/bwidget/ #

Re: subprocess terminate help

2005-11-16 Thread Ernesto
Yeah I know. I posted it b/c I was having the same problems and I'm investigating ways to do this. None of those methods gave me desired results for my program. All I want to do is end my python program and return to the DOS prompt. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python obfuscation

2005-11-16 Thread Ben Finney
The Eternal Squire <[EMAIL PROTECTED]> wrote: > The greatest theft of sales opportunities Utter poppycock. Who is to say that a particular entity holds an exclusive "sales opportunity" to a particular individual? Are we to protect the expectations of profit for some, at the expense of sharing thin

Re: is parameter an iterable?

2005-11-16 Thread Steven D'Aprano
On Wed, 16 Nov 2005 09:06:01 -0500, Rick Wotnaz wrote: [cutting to the important bit] >> except TypeError, msg: >> if msg == "iteration over non-sequence": >> # handle non-iterable case > Does this in fact work on your system? On mine (2.4.1 (#65, Mar 30 > 2005, 09:13:57)

running functions

2005-11-16 Thread Gorlon the Impossible
Hello I'm not sure how to phrase this question. I have a Python function that sends MIDI messages to a synth. When I run it, I of course have to wait until it is finished before I can do anything else with Python. Is it possible to run this function and still be able to do other things with Python

Re: Python obfuscation

2005-11-16 Thread Ben Finney
The Eternal Squire <[EMAIL PROTECTED]> wrote: > The teaching of legality and ethics of incorporating other peoples' > works into one's own should begin at 6th grade and be repeated every > year until the message is driven home. I disagree strongly. The legality of copying, modifying and redistrib

Re: creating package question

2005-11-16 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > I think I have an answer to my own question. In the > WindowsComponents/__init__.py file, I have the following, that feels > like a better answer for the problem. Is there a better answer than > this? > > import os, sys > sys.path.append(os.path.join(os.getcwd(), 'C

Re: subprocess terminate help

2005-11-16 Thread Fredrik Lundh
Ernesto wrote > I've been searching for ways to terminate this process so I can exit my > program. program.exe is a text based interface which I'm running with > python subprocess in a DOS command window. I tried using 'sys.exit()' > to end my program, but nothing works. I think I have to someh

Re: Python obfuscation

2005-11-16 Thread The Eternal Squire
Change from 3) User support and service is not an increasingly large component of the service provided by a software product, which can only be obtained to 3) User support and service is an increasingly large component of the service provided by a software product, which can only be obtained Oo

Re: Python obfuscation

2005-11-16 Thread The Eternal Squire
>I'm asking coz i don't have any real world/industrial basis to better >understand the problem and factors involved when selling software - i'm >just a student A fair request. The teaching of legality and ethics of incorporating other peoples' works into one's own should begin at 6th grade and b

Re: Python obfuscation

2005-11-16 Thread Steven D'Aprano
On Wed, 16 Nov 2005 13:51:35 +, Ed Jensen wrote: > Steven D'Aprano <[EMAIL PROTECTED]> wrote: >> I'm not sure if that is meant to be a rhetorical >> question or not, but something of the order of 95% of >> all software written is never distributed to others, >> and so copyright or the lack

Re: can modules be dynamically reloaded

2005-11-16 Thread Benjamin Niemann
Steve wrote: > Can python modules be reloaded. Yes: import mymod ... reload(mymod) But this will not always work as expected (what someone would expect who does not really understand how it works...). Read the documentation on > For examp

Re: initialising a list of lists

2005-11-16 Thread Steven D'Aprano
On Wed, 16 Nov 2005 13:58:45 +0100, Peter Kleiweg wrote: > > This does not what I want it to do: > > >>> a = [[]] * 6 > >>> a[3].append('X') > >>> a > [['X'], ['X'], ['X'], ['X'], ['X'], ['X']] > > This does what I want: > > >>> b = [[] for _ in range(6)] > >>> b[3].app

can modules be dynamically reloaded

2005-11-16 Thread Steve
Can python modules be reloaded. For example you import a module, programatically edit it, then have the file reload the module? Does anyone have any ideas about this? Steve -- http://mail.python.org/mailman/listinfo/python-list

subprocess terminate help

2005-11-16 Thread Ernesto
def launchWithoutConsole(command, args): """Launches 'command' windowless and waits until finished""" startupinfo = subprocess.STARTUPINFO() startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW return subprocess.Popen([command] + args, startupinfo=startupinfo).wait() handle = la

Re: How to write an API for a Python application?

2005-11-16 Thread Mike Meyer
"Eric Brunel" <[EMAIL PROTECTED]> writes: > On 16 Nov 2005 06:18:05 -0800, Paul Boddie <[EMAIL PROTECTED]> wrote: >> One technology that I used many years ago with Python, and which should >> still do the job is CORBA - at that time ILU, but I suppose the various >> other ORBs should also be as cap

Re: readline vi mode in python interactive shell

2005-11-16 Thread [EMAIL PROTECTED]
Well, I subsequently found this: http://groups.google.com/group/gnu.bash.bug/browse_thread/thread/ab3d3d5ff3e1ea89/f50f81b86161b271?lnk=st&q=readline+vi+mode&rnum=25#f50f81b86161b271 to explain it. Bummer ... -- http://mail.python.org/mailman/listinfo/python-list

Re: readline vi mode in python interactive shell

2005-11-16 Thread Micah Elliott
On Nov 16, [EMAIL PROTECTED] wrote: > Hi comp.lang.python: > New to the group and new to python, so don't tear me up too much ... > I installed the GNU readline support in python2.4, and it is working, > but there is one annoying behaviour that I am hoping to squash ... > > Namely, when I hit to

Re: Python obfuscation

2005-11-16 Thread Mike Meyer
"Ben Sizer" <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: >> "Ben Sizer" <[EMAIL PROTECTED]> writes: >> > In my >> > case, providing a free download of any lost executables or data upon >> > presentation of a legitimate license key should be adequate. >> My special handling for such >> things - a

Re: repeating regular expressions in one string

2005-11-16 Thread Fredrik Lundh
"Shane" wrote > I have a bunch of strings that looks like this: > > 'blahblah_sf1234-sf1238_blahblah' > > and I would like to use the re module to parse all the 'sf' parts > of the string. Each 'sf' needs to be its own string when I am > through. How do I compile a regular expression that

Re: repeating regular expressions in one string

2005-11-16 Thread Inyeol Lee
On Wed, Nov 16, 2005 at 03:09:56PM -0500, Shane wrote: > Hi folks, > > I'm new to regular expressions (and a novice at Python) but it seems to be > the tool I need for a particular problem. I have a bunch of strings that > looks like this: > > 'blahblah_sf1234-sf1238_blahblah' > > and I would

Re: using openurl to log into Yahoo services

2005-11-16 Thread Mike Meyer
"joe_public34" <[EMAIL PROTECTED]> writes: > Hello all, > > I'm trying to write a script to log into Yahoo! (mail, groups, etc), I don't have an answer to your problem but I *do* have a script that logs into yahoo. It's ugly, but it works. I'm refactoring it - if I ever get back to it. I've appe

Re: repeating regular expressions in one string

2005-11-16 Thread Carl J. Van Arsdall
Shane wrote: > Hi folks, > > I'm new to regular expressions (and a novice at Python) but it seems to be > the tool I need for a particular problem. I have a bunch of strings that > looks like this: > > 'blahblah_sf1234-sf1238_blahblah' > > and I would like to use the re module to parse all the 's

Re: Can anyone tell me if pygame and Tkinter can work together?

2005-11-16 Thread Fredrik Lundh
Nathan Pinno wrote: > It's a warning that says: > > Can only use * in top level or something like that. > > It's kind of annoying why? importing tons of unknown stuff into a local namespace is rather silly, and makes it impossible for the compiler to properly analyze your code -- which means tha

repeating regular expressions in one string

2005-11-16 Thread Shane
Hi folks, I'm new to regular expressions (and a novice at Python) but it seems to be the tool I need for a particular problem. I have a bunch of strings that looks like this: 'blahblah_sf1234-sf1238_blahblah' and I would like to use the re module to parse all the 'sf' parts of the string.

readline vi mode in python interactive shell

2005-11-16 Thread [EMAIL PROTECTED]
Hi comp.lang.python: New to the group and new to python, so don't tear me up too much ... I installed the GNU readline support in python2.4, and it is working, but there is one annoying behaviour that I am hoping to squash ... Namely, when I hit to go to edit mode, then hit 'k' to go up in the co

Re: creating package question

2005-11-16 Thread infidel
[EMAIL PROTECTED] wrote: > I think I have an answer to my own question. In the > WindowsComponents/__init__.py file, I have the following, that feels > like a better answer for the problem. Is there a better answer than > this? > > import os, sys > sys.path.append(os.path.join(os.getcwd(), 'Comm

Re: Quitting a Tkinter application with confirmation

2005-11-16 Thread Fredrik Lundh
Peter Kleiweg wrote: > I want the program to behave identical if the 'close' button of > the application window is clicked. I tried the code below, > using a class derived from Tk that redefines the destroy > method. That seems to work. At least on Linux. > > My questions: > > Is this the correct

Re: creating package question

2005-11-16 Thread Micah Elliott
On Nov 16, [EMAIL PROTECTED] wrote: > I have a package directory structure as follows > > root- > | > Common (contains __init__.py file) > WindowsComponents (contains __init__.py file) > ... > > I would like modules in the WindowsComponents directory to be able > to import some mo

Re: newbie - How do I import automatically?

2005-11-16 Thread Claudio Grondi
Probably you have inbetween already found the 'def runsource(' line in the PyShell.py , but maybe you still wait for a reply, so here it is: yes, you put the two lines at the beginning of in PyShell.py existing runsource() method of the class ModifiedInterpreter(InteractiveInterpreter) If in my

Re: creating package question

2005-11-16 Thread erick_bodine
I think I have an answer to my own question. In the WindowsComponents/__init__.py file, I have the following, that feels like a better answer for the problem. Is there a better answer than this? import os, sys sys.path.append(os.path.join(os.getcwd(), 'Common')) --ERick -- http://mail.python

Re: Creating (rather) generic plugin framework?

2005-11-16 Thread bruno at modulix
Edvard Majakari wrote: > Hi, > > My idea is to create a system working as follows: each module knows > path to plugin directory, and that directory contains modules which > may add hooks to some points in the code. > > Inspired by http://www.python.org/pycon/2005/papers/7/pyconHooking.html > > I

Re: Can anyone tell me if pygame and Tkinter can work together?

2005-11-16 Thread Nathan Pinno
It's a warning that says: Can only use * in top level or something like that. It's kind of annoying, but the program still ran after I made the import * lines top level, and removed the def's. Nathan Pinno. -- For great sites go to: http://www.the-web-surfers-store.com MSN Messenger: [EMAIL P

Re: Python, Linux, Desktop Environment

2005-11-16 Thread Jorgen Grahn
On Wed, 16 Nov 2005 19:56:51 +0100, bruno at modulix <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: >> So, I've written my first GUI app in python. I've turned it into a >> binary .exe and .app that runs on Windows and Mac respectively, but on >> my Linux box, where I wrote the thing, I sti

Quitting a Tkinter application with confirmation

2005-11-16 Thread Peter Kleiweg
I have an application written in Tkinter. There is a menu item 'quit' that calls the function 'quit'. If 'quit' is called, it first checks if there is unsaved data. If there is, it won't let the application exit unless you confirm to disregard the changes. So far, so good. I want the program

creating package question

2005-11-16 Thread erick_bodine
I have a package directory structure as follows root- | Common (contains __init__.py file) WindowsComponents (contains __init__.py file) ... I would like modules in the WindowsComponents directory to be able to import some modules from the Common directory. In my first pass, I wa

Re: Python, Linux, Desktop Environment

2005-11-16 Thread Yves Glodt
> [EMAIL PROTECTED] wrote: > >> So, I've written my first GUI app in python. I've turned it into a >> binary .exe and .app that runs on Windows and Mac respectively, but on >> my Linux box, where I wrote the thing, I still have to drop to the >> command line and ./myscript.py. What can I do t

Re: Addressing the last element of a list

2005-11-16 Thread Mike Meyer
Antoon Pardon <[EMAIL PROTECTED]> writes: > Op 2005-11-15, Mike Meyer schreef <[EMAIL PROTECTED]>: >> Antoon Pardon <[EMAIL PROTECTED]> writes: > Like having an assignment operator (let use @= for it) next to a > (re)bind operator. > We could then have something like the following.

Re: newbie - How do I import automatically?

2005-11-16 Thread bobueland
Where do I put def runsource(self, source): if(source == ''): source = 'from btools import *' "Extend base class method: Stuff the source in the line cache first" filename = self.stuffsource(source) Do I put it in Pyshell.py or somewhere else? Bob -- http://

  1   2   >