ANN: PyDev 0.9.1 released

2005-03-03 Thread Fabio Zadrozny
Hi All, PyDev - Python IDE (Python development enviroment for Eclipse) version 0.9.1 has just been released. You can check the homepage (http://pydev.sourceforge.net/) or my blog (http://pydev.blogspot.com/) for more details. -- COMMENTS ON

Roundup Issue Tracker release 0.8.2

2005-03-03 Thread Richard Jones
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Roundup is a simple-to-use and -install issue-tracking system with command-line, web and e-mail interfaces. It is based on the winning design from Ka-Ping Yee in the Software Carpentry Track design competition. This 0.8.2 release adds one feature and

BayPIGgies: March 10, 7:30pm (FINAL MEETING AT STANFORD)

2005-03-03 Thread Aahz
WARNING: the last meeting of BayPIGgies at Stanford is currently scheduled for March. Our host, Danny Yoo, is leaving Stanford, and we need to find a new location. If you wish to assist with the search, please join the BayPIGgies mailing list. Meanwhile, let's all give hearty thanks to Danny

recursion problem

2005-03-03 Thread vegetax
I am trying to make convert a directory tree in a list of list, but cant find the algoritm =( ,for example a directory tree like : +root +doc ele1 ele2 +doc3 ele3 +doc2 ele4 ele5 should convert into: root[ doc, [ele1,ele2,doc3,[ele3]], doc2, [ele4],

Re: How to write python plug-ins for your own python program?

2005-03-03 Thread Simon Wittber
You mean like 'import'? :) That's how I would do it. It's the simplest thing, that works. exec(import %s as plugin % pluginName) plugin.someMethod() where pluginName is the name of the python file, minus the .py extension. Sw. -- http://mail.python.org/mailman/listinfo/python-list

Re: Faster way to do this...

2005-03-03 Thread Timo Virkkala
Harlin Seritt wrote: Roy, I like what you showed: nums = [a for a in range(100)] . My mistake for not expressing my question as well as I should have. Not only am I looking for a way to fill in 100 spots (more or less) in an array er... list, but I'd like to be able to do it in intervals of 2,

PythonWin, AutoDoc and german keyboards...

2005-03-03 Thread Werner Merkl
Hallo, PythonWin is really great and like to use it all the time. But, I use to an us keyboard and get support strings (.__doc__). On the other side, most of my colleges use German keyboards and the do not get these strings at all. We are using: - Python 2.4 - PyWin32 203 Here is an example:

Re: What is the best way to handle a command line argument that includes an escape sequence like \n?

2005-03-03 Thread Antoon Pardon
Op 2005-03-02, Joe schreef [EMAIL PROTECTED]: I'm using Python 2.4 on Windows XP SP2. I'm trying to receive a command line argument that is a newline (\n) Here is the command line to use sample.py \n Are you sure this supplies a newline and not the string backslach n Here is a sample.py

Re: How to write python plug-ins for your own python program?

2005-03-03 Thread Mark Rowe
On Mar 3, 2005, at 9:33 PM, Simon Wittber wrote: You mean like 'import'? :) That's how I would do it. It's the simplest thing, that works. exec(import %s as plugin % pluginName) plugin.someMethod() where pluginName is the name of the python file, minus the .py extension. A better method would be

Re: PythonWin, AutoDoc and german keyboards...

2005-03-03 Thread Neil Hodgson
Werner Merkl: When we enter range with us keyboard we get: range( [range([start,] stop[, step]) - list of integers] When we do this with German keyboard we get... nothing, ... BTW: Changes to Python24\Lib\site-packages\pythonwin\pywin\default.cfg didn't help. It appears

scrollbar dependencies

2005-03-03 Thread Marion
Hello. I am using Tkinter and Pmw. I would like to build 2 canvases/frames that are scrollable together horizontally, and independently vertically (so, the vertical scrollbars should not be moved by the horizontal one). So I built a Pmw.ScrolledFrame() containing the 2 canvases, horizontally

matplotlib under Zope

2005-03-03 Thread fabian
i develop an application under zope with windows 2000 and i would like integrate graphs. the problem is that the installation of matplotlib doesn't find the python of zope and so i can't make graph. Maybe a problem of register? could you help me? thanks --

Re: Gordon McMillan installer and Python 2.4

2005-03-03 Thread Svein Brekke
Seriously, if you're only interested in Windows, just use py2exe, or if you want Linux+Windows, try cx_Freeze. According to the command line help for cx_Freeze and py2exe, they cannot pack my program with additional installation files into one self-extracting .exe file (which is what I want to

Re: How to write python plug-ins for your own python program?

2005-03-03 Thread Terry Hancock
On Wednesday 02 March 2005 11:28 pm, Tian wrote: I am writing an audio game using Python. in this game you can apply some sound effects for the clips you have recorded. I want to make this function extensible. I want user to be able to add new sound effect plug-ins in the future. I want the

Re: PYGTK, Google Suggest-like GUI

2005-03-03 Thread Ali
I guess what i am looking for is auto-completion but with a drop-down list... -- http://mail.python.org/mailman/listinfo/python-list

Re: os.stat('filename')[stat.ST_INO] on Windows

2005-03-03 Thread Martin v. Löwis
Tim Roberts wrote: Hmmm, yes, but nearly 100% of Unix geeks have seen an inode number in their programming adventures, whereas I'll bet not 1 in 10,000 Windows hardliners has ever seen an MFT entry. That is going to change. At my university, students learn what an MFT record is and how it is

Re: HELP: Python equivalent of UNIX command touch

2005-03-03 Thread Tim G
Since no-one's suggested this yet, I highly recommend UnxUtils: http://unxutils.sourceforge.net/ which includes a touch.exe. Obviously, this doesn't answer your call for a Python version, but if you're happy with touch under Unix, maybe this will work for you. TJG --

Re: PYGTK, Google Suggest-like GUI

2005-03-03 Thread Ali
Oh well, the cool guys of GTK have just the thing i wanted called EntryCompletion. Here's the link in case someone else stumbles over here: http://www.pygtk.org/pygtk2tutorial/sec-EntryCompletion.html -- http://mail.python.org/mailman/listinfo/python-list

Re: scrollbar dependencies

2005-03-03 Thread Eric Brunel
On 3 Mar 2005 01:06:48 -0800, Marion [EMAIL PROTECTED] wrote: Hello. I am using Tkinter and Pmw. I would like to build 2 canvases/frames that are scrollable together horizontally, and independently vertically (so, the vertical scrollbars should not be moved by the horizontal one). So I built a

Re: Need direction to kill a virus

2005-03-03 Thread Anthra Norell
Josef Albert Meile, James Stroud, Sean Blakey, Thank you very very much for your valuable suggestions and kind encouragement. Frederic ( No, I don't have any particular affection for Microsoft stuff.Very muchon the contrary. I have a plan to start using Unix. This plan is over twenty

Re: yield_all needed in Python

2005-03-03 Thread Nick Coghlan
Douglas Alan wrote: Wouldn't yield *(x for x in gen1(arg)) be sufficient, and would already be supported by the proposal at hand? It would, but, as Steven pointed out, the * in func(*args) results in tuple(args) being passed to the underlying function. So I see no reason to expect yield

Re: looking for expertise

2005-03-03 Thread klappnase
Neil Hodgson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... Michael: Like I said, it's only supposed to run on linux; anyway, is it likely that problems will arise when filenames I have to handle have basically three sources: ... 3. filenames created by user input

Re: scrollbar dependencies

2005-03-03 Thread Harlin Seritt
Pardon a question I should already know the answer to, but what are the *args in the: def xscrollboth(*args): c1.xview(*args) c2.xview(*args) Thanks, Harlin -- http://mail.python.org/mailman/listinfo/python-list

Re: Need some simple coding help

2005-03-03 Thread mx2k
thx again, this code is nearly doing as we want and we think to have figured out how to change it to meet our requirments. also thx for the tip using a heap... should there be more problems i'll post again! [mx] -- http://mail.python.org/mailman/listinfo/python-list

starting windows program from python based on file extension ?

2005-03-03 Thread kowald
Hi everybody, I used python to build a HTML file and now I would like to automatically start my browser to display this file. I guess I could use os.system(), but then I had to specify a specific path to the browser. I wonder if it is possible to tell windows to open myFile.html using the

Multiline regex help

2005-03-03 Thread Yatima
Hey Folks, I've got some info in a bunch of files that kind of looks like so: Gibberish 53 MoreGarbage 12 RelevantInfo1 10/10/04 NothingImportant ThisDoesNotMatter 44 RelevantInfo2 22 BlahBlah 343 RelevantInfo3 23 Hubris Crap 34 and so on... Anyhow, these fields repeat several times in a given

pytone / _bsddb

2005-03-03 Thread Bas van Gils
Hi all, I've been using the `pytone' tool for playing my mp3's for a while. Great tool. However, after upgrading Python to version 2.4 it stopped working. The traceback that I get is this: -snip- Traceback (most recent call last): File

RE: starting windows program from python based on file extension ?

2005-03-03 Thread Tim Golden
[EMAIL PROTECTED] | I used python to build a HTML file and now I would like to | automatically start my browser to display this file. I guess I could | use os.system(), but then I had to specify a specific path to the | browser. | | I wonder if it is possible to tell windows to open myFile.html

Re: starting windows program from python based on file extension ?

2005-03-03 Thread Duncan Booth
wrote: I wonder if it is possible to tell windows to open myFile.html using the program that is registered to open html files (similar to double clicking on the file). Any idea how to do that from python ?? import webbrowser webbrowser.open('test.html') --

Re: yield_all needed in Python

2005-03-03 Thread Nick Coghlan
Jeremy Bowers wrote: At first I liked this, but the reason that is a syntax error is that it is supposed to be def f(): yield (x for x in gen1(arg)) which today on 2.4 returns a generator instance which will in turn yield one generator instance from the genexp And it would continue to do so in

Re: How to delete a module file

2005-03-03 Thread Olivier Ravard
Le lundi 28 fvrier 2005 17:08 +, Dennis Lee Bieber a crit : On Mon, 28 Feb 2005 16:43:45 +0100, Olivier Ravard [EMAIL PROTECTED] declaimed the following in comp.lang.python: Remark : This problem does not exist under Linux. I think Linux just masks the situation. Windows

Setting default option values for Tkinter widgets

2005-03-03 Thread Harlin Seritt
There are certain options for Tkinter widgets that have default values that I don't much care for (borderwidth, font come to mind) and continuously change when I'm building interfaces. With a bit of tweaking I have been able to give the widgets a look that rivals the best of them. However, I get

Re: scrollbar dependencies

2005-03-03 Thread Eric Brunel
On 3 Mar 2005 02:38:59 -0800, Harlin Seritt [EMAIL PROTECTED] wrote: Pardon a question I should already know the answer to, but what are the *args in the: def xscrollboth(*args): c1.xview(*args) c2.xview(*args) Thanks, Harlin If your question is about the syntax, it's just the way of passing

Re: starting windows program from python based on file extension ?

2005-03-03 Thread F. Petitjean
Le 3 Mar 2005 02:53:51 -0800, [EMAIL PROTECTED] a écrit : Hi everybody, I used python to build a HTML file and now I would like to automatically start my browser to display this file. I guess I could use os.system(), but then I had to specify a specific path to the browser. I wonder if

Re: Setting default option values for Tkinter widgets

2005-03-03 Thread Eric Brunel
On 3 Mar 2005 03:02:48 -0800, Harlin Seritt [EMAIL PROTECTED] wrote: There are certain options for Tkinter widgets that have default values that I don't much care for (borderwidth, font come to mind) and continuously change when I'm building interfaces. With a bit of tweaking I have been able to

Re: Multiline regex help

2005-03-03 Thread Kent Johnson
Yatima wrote: Hey Folks, I've got some info in a bunch of files that kind of looks like so: Gibberish 53 MoreGarbage 12 RelevantInfo1 10/10/04 NothingImportant ThisDoesNotMatter 44 RelevantInfo2 22 BlahBlah 343 RelevantInfo3 23 Hubris Crap 34 and so on... Anyhow, these fields repeat several times

Re: class factory example needed (long)

2005-03-03 Thread Gary Ruben
Thanks Steven and Kent, both of your suggestions look good to me. I'll try both out and pick one. Gary Gary Ruben wrote: OK, I've managed to get this to work with Rainer's method, but I realised it is not the best way to do it, since the methods are being added by the constructor, i.e. they

Re: function expression with 2 arguments

2005-03-03 Thread Xah Lee
Roel Schroeven wrote: (lambda x, y: x+y)(a, b) Thanks. That's what i was looking for. where in Pytho doc can one find this? or the lambda with multiple params? Most often the lambda is not used directly, but passed to a function. That is because the IT morons has been throughly brainwashed

Re: pytone / _bsddb

2005-03-03 Thread Bas van Gils
On 2005-03-03, Bas van Gils [EMAIL PROTECTED] wrote: Hi all, I've been using the `pytone' tool for playing my mp3's for a while. Great tool. However, after upgrading Python to version 2.4 it stopped working. The traceback that I get is this: [ ... ] Great, I found it myself. The problem was

Re: canvassing for assistance

2005-03-03 Thread Sean McIlroy
'scale' puts the lower-right corner of a bounding box where the pointer is, while keeping the upper-left corner where it was before (or, if the relevant item's coordinates aren't of bounding-box type, the function does nothing). Thanks for the link. Peace, STM [EMAIL PROTECTED] [EMAIL

Re: What is the best way to handle a command line argument that includes an escape sequence like \n?

2005-03-03 Thread Joe
Hi Steve, I've been using Python for many years, just hadn't had to deal with an escape sequence in the command line args. :-) and couldn't find the solution in the docs. It is easy to prove my assertion: import sys c = sys.argv[1] print len(c) print 'Line 1', c, 'Line 2' Output: 2 Line 1 \n

file.getvalue() with _ or other characters

2005-03-03 Thread martijn
H! I do this to get a htmlTOtext file class mvbHTMLParser(htmllib.HTMLParser): def __init__(self, formatter, verbose=0): htmllib.HTMLParser.__init__(self,formatter,verbose) self.imglist = [] def handle_image(self,src,alt,*args): self.imglist.append(src) file =

Re: Gordon McMillan installer and Python 2.4

2005-03-03 Thread Serge Orlov
Svein Brekke wrote: Seriously, if you're only interested in Windows, just use py2exe, or if you want Linux+Windows, try cx_Freeze. According to the command line help for cx_Freeze and py2exe, they cannot pack my program with additional installation files into one self-extracting .exe file

Re: windows bat file question

2005-03-03 Thread Peter Hansen
Tim Roberts wrote: Tom Willis [EMAIL PROTECTED] wrote: rem = -*-Python-*- script @echo off rem DOS section rem You could set PYTHONPATH or TK environment variables here python %* This should make it work: python %0.bat %* Only, among other issues, if you

Re: Gordon McMillan installer and Python 2.4

2005-03-03 Thread Peter Hansen
Svein Brekke wrote: Seriously, if you're only interested in Windows, just use py2exe, or if you want Linux+Windows, try cx_Freeze. According to the command line help for cx_Freeze and py2exe, they cannot pack my program with additional installation files into one self-extracting .exe file (which

Re: function expression with 2 arguments

2005-03-03 Thread Peter Hansen
Xah Lee wrote: Roel Schroeven wrote: (lambda x, y: x+y)(a, b) Thanks. That's what i was looking for. where in Pytho doc can one find this? or the lambda with multiple params? Most often the lambda is not used directly, but passed to a function. That is because the IT morons has been throughly

Re: Gordon McMillan installer and Python 2.4

2005-03-03 Thread Just
In article [EMAIL PROTECTED], Serge Orlov [EMAIL PROTECTED] wrote: Svein Brekke wrote: Seriously, if you're only interested in Windows, just use py2exe, or if you want Linux+Windows, try cx_Freeze. According to the command line help for cx_Freeze and py2exe, they cannot pack my

Re: Gordon McMillan installer and Python 2.4

2005-03-03 Thread Richie Hindle
[Svein] According to the command line help for cx_Freeze and py2exe, they cannot pack my program with additional installation files into one self-extracting .exe file (which is what I want to do). [Peter] On the other hand, there are readily available utilities that will do what you are

Re: file.getvalue() with _ or other characters

2005-03-03 Thread Peter Hansen
[EMAIL PROTECTED] wrote: file = StringIO.StringIO() f = formatter.AbstractFormatter(formatter.DumbWriter(file)) p = mvbHTMLParser(f) p.feed(html) p.close() print file.getvalue() But then the _ characters are away. is it possible to keep that character in file.getvalue() I consider this a defect in

Re: passing lists

2005-03-03 Thread Earl Eiland
This message contains the responses to two previous messages: In response to Steven B.,the statements Raw_packet_queue = enqueue(..., Raw_packet_queue, ...) print 'Sort 1 Raw_packet_queue is', Raw_packet_queue produce the output Sort 1 Raw_packet_queue is [[(Pkthdr object at

Re: mx.ODBC 2.0.7 bug?

2005-03-03 Thread Joe
Hi Steve, Thanks, I find you get much better help when you provide the details needed for your case instead of expecting others to invest alot of their time before you did your homework. Thanks for sending it over to Marc. Last time I found a bug in the mx stuff (YEARS AGO) I sent it

Re: function expression with 2 arguments

2005-03-03 Thread Xah Lee
PS sorry for the rude remarks out of nowhere. Xah -- http://mail.python.org/mailman/listinfo/python-list

Online Programming Contest (Python solutions accepted) + Amazon offer

2005-03-03 Thread Sridhar
Hi, We, the students of CEG, Anna University [1] are organizing an online programming contest as part of aBaCus [2] 2005. The contest itself will start on 6th March 2005 at 1:00 pm IST [3] and will end after 5 hours. You have to solve the problems posted at the start of the contest. Teams

Re: windows bat file question

2005-03-03 Thread Duncan Booth
Peter Hansen wrote: This should make it work: python %0.bat %* Only, among other issues, if you type the full path to the batch file, or if it's in the current directory. This approach fails if you put the batch file in a directory somewhere along your path. The simplest fix, assuming

Re: function expression with 2 arguments

2005-03-03 Thread Steve Holden
Xah Lee wrote: PS sorry for the rude remarks out of nowhere. Xah Wow, signs of developing inter-personal skills. I must assume that c.l.py is having its benign influence on you too! regards Steve -- Meet the Python developers and your c.l.py favorites March 23-25 Come to PyCon DC 2005

Re: file.getvalue() with _ or other characters

2005-03-03 Thread martijn
mmm I'm a newbie with python. I did this but don't work: class mvbHTMLParser(htmllib.HTMLParser): def __init__(self, formatter, verbose=0): htmllib.HTMLParser.__init__(self,formatter,verbose) self.imglist = [] def handle_image(self,src,alt,*args):

Re: i18n: looking for expertise

2005-03-03 Thread Serge Orlov
klappnase wrote: Hello all, I am trying to internationalize my Tkinter program using gettext and encountered various problems, so it looks like it's not a trivial task. Considered that you decided to support old python versions, it's true. Unicode support has gradually improved. If you

binutils strings like functionality?

2005-03-03 Thread cjl
Hey all: I am working on a little script that needs to pull the strings out of a binary file, and then manipulate them with python. The command line utility strings (part of binutils) has exactly the functionality I need, but I was thinking about trying to implement this in pure python. I did

converting time tuple to datetime struct

2005-03-03 Thread Michael Jard
there a shorter way then: datetime.fromtimestamp(time.mktime(time.strptime(20-3-2005,%d-%b-%y))) thanks, Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: converting time tuple to datetime struct

2005-03-03 Thread gry
[your %b is supposed to be the abbreviated month name, not the number. Try %m] In [19]: datetime.datetime(*time.strptime(20-3-2005,%d-%m-%Y)[:6]) Out[19]: datetime.datetime(2005, 3, 20, 0, 0) Cheers, George -- http://mail.python.org/mailman/listinfo/python-list

Python 2.4 PostgreSQL 8 segfault

2005-03-03 Thread Adrian Immler
hello, i have compiled and installed postgres8 --with-prefix=/usr/local/postgres8 ( several other options) and have no other version of postgres on my system. python is compiled and make'd --with-prefix=/usr. i have added the libpath of postgres to /etc/ld.so.conf and a ldconfig -v also told me

Re: unicode and socket

2005-03-03 Thread TZOTZIOY
On 18 Feb 2005 19:10:36 -0800, rumours say that [EMAIL PROTECTED] might have written: It's really funny, I cannot send a unicode stream throuth socket with python while all the other languages as perl,c and java can do it. I don't know about perl. What I think you mean by unicode in C most

Re: How would you program this?

2005-03-03 Thread Duncan Smith
engsol [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] There is a number puzzle which appears in the daily paper. Because I'm between Python projects, I thought it might be fun to write a program to solve it20 minute job, max. On closer inspection, it became apparent that it's

Re: pytone / _bsddb

2005-03-03 Thread helmi03
Downgrading??? I think the author of this pytone software should upgrade. I just upgrade all my python stuff in my FreeBSD box to python 2.4 :( I had this same problem before too. -- http://mail.python.org/mailman/listinfo/python-list

Re: What is the best way to handle a command line argument that includes an escape sequence like \n?

2005-03-03 Thread Steve Holden
Joe wrote: Hi Steve, I've been using Python for many years, just hadn't had to deal with an escape sequence in the command line args. :-) and couldn't find the solution in the docs. It is easy to prove my assertion: import sys c = sys.argv[1] print len(c) print 'Line 1', c, 'Line 2' Output: 2

Re: converting time tuple to datetime struct

2005-03-03 Thread Michael Jard
Yeah, that was just an oversight while retyping the code. Thanks from the prompt reply, it was just what I needed. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: binutils strings like functionality?

2005-03-03 Thread Fuzzyman
I don't know anything about binutils strings, other than that a quick google reveals that you can search binary files for printable strings with it. In python the following code will read a binary file into a single string : long_string = open(filename, 'rb').read() You can then slice

tkinter entry eat chars?

2005-03-03 Thread phil
In a Tkinter entry field (or Pmw entry) how could I eat charactres? Say a certain char is keyed in. Say I notice in the event handler for key. I don't want any more charactres to display or be in the field until I handle a see, in the event handler, another character. Say ? Can the event handler

tkinter absorb chars

2005-03-03 Thread phil
Sorry for the repost, but moderator jeld the last one, In a Tkinter entry field (or Pmw entry) how could I eat charactres? Say a certain char is keyed in. Say I notice in the event handler for key. I don't want any more charactres to display or be in the field until I handle, in the event

Re: tkinter absorb chars

2005-03-03 Thread Jeff Epler
On Wed, Mar 02, 2005 at 04:58:03PM -0600, phil wrote: Sorry for the repost, but moderator jeld the last one, We saw both posts. In a Tkinter entry field (or Pmw entry) how could I eat charactres? create a binding on the widget for the particular character you want to treat specially. If

Re: file.getvalue() with _ or other characters

2005-03-03 Thread Peter Otten
[EMAIL PROTECTED] wrote: I do this to get a htmlTOtext file [...] But then the _ characters are away. is it possible to keep that character in file.getvalue() Just to make sure: you did look into the HTML file and verified that there are actually underscores and not spaces that are

Re: binutils strings like functionality?

2005-03-03 Thread Larry Bates
Take a look at python's struct module in the standard library. Many people use it to manipulate binary objects at the byte level with great success. Larry Bates cjl wrote: Hey all: I am working on a little script that needs to pull the strings out of a binary file, and then manipulate them

Re: binutils strings like functionality?

2005-03-03 Thread Kent Johnson
cjl wrote: Hey all: I am working on a little script that needs to pull the strings out of a binary file, and then manipulate them with python. The command line utility strings (part of binutils) has exactly the functionality I need, but I was thinking about trying to implement this in pure python.

Re: Multiline regex help

2005-03-03 Thread Steven Bethard
Yatima wrote: Hey Folks, I've got some info in a bunch of files that kind of looks like so: Gibberish 53 MoreGarbage 12 RelevantInfo1 10/10/04 NothingImportant ThisDoesNotMatter 44 RelevantInfo2 22 BlahBlah 343 RelevantInfo3 23 Hubris Crap 34 and so on... Anyhow, these fields repeat several times

using Tkinter from IDLE

2005-03-03 Thread neutrinman
How do I use Tkinter from IDLE? Tkinter can be used from IDLE attached (Bto python 2.2, IDLE 0.8. But I couldn't use from IDLE attached to (Bpython 2.3, IDLE 1.0.3. When I execute the code below: (Bfrom Tkinter import * (Broot = Tk() (Bthe window appears form IDLE 0.8, but not from IDLE

greedy match wanted

2005-03-03 Thread alexk
Hi, I would like to request your help. My problem is as follows. I want to match urls, and therefore I have a group of long valid domain names in my regex: (?:com|org|net|biz|info|ac|cc|gs|ms| sh|st|tc|tf|tj|to|vg|ad|ae|af|ag|

Re: binutils strings like functionality?

2005-03-03 Thread Steve Holden
Kent Johnson wrote: cjl wrote: Hey all: I am working on a little script that needs to pull the strings out of a binary file, and then manipulate them with python. The command line utility strings (part of binutils) has exactly the functionality I need, but I was thinking about trying to implement

Re: binutils strings like functionality?

2005-03-03 Thread Fredrik Lundh
cjl wrote: I am working on a little script that needs to pull the strings out of a binary file, and then manipulate them with python. The command line utility strings (part of binutils) has exactly the functionality I need, but I was thinking about trying to implement this in pure python.

Re: Regular Expressions: large amount of or's

2005-03-03 Thread Manlio Perillo
On Tue, 1 Mar 2005 15:03:50 -0500, Tim Peters [EMAIL PROTECTED] wrote: [André Søreng] Given a string, I want to find all ocurrences of certain predefined words in that string. Problem is, the list of words that should be detected can be in the order of thousands. With the re module, this can

Accessing Python parse trees

2005-03-03 Thread Manlio Perillo
Hi. With module parser it is possible to access Python parse trees. But this only works for 'external' source. I would like to known if, at least in theory, it can be possible to access Python parse trees from 'inside' a script. As a simple example: def on_parsing(ast): ... @parsing -

Re: Regular Expressions: large amount of or's

2005-03-03 Thread Manlio Perillo
Hi. Python allows to subclass builtin classes but the Python Interpreter uses builtin types. As an example keyword arguments are inserted in a dict but I would like to use an user defined SortedDict. There are plans to add such a feature in a future version? Thanks and regards Manlio Perillo

Re: Regular Expressions: large amount of or's

2005-03-03 Thread Manlio Perillo
Hi. Python allows to subclass builtin classes but the Python Interpreter uses builtin types. As an example keyword arguments are inserted in a dict but I would like to use an user defined SortedDict. There are plans to add such a feature in a future version? Thanks and regards Manlio Perillo

Re: greedy match wanted

2005-03-03 Thread Kent Johnson
alexk wrote: My problem is as follows. I want to match urls, and therefore I have a group of long valid domain names in my regex: (?:com|org|net|biz|info|ac|cc|gs|ms| sh|st|tc|tf|tj|to|vg|ad|ae|af|ag| com\.ag|ai|off\.ai|al|an|ao|aq|

Re: How to write python plug-ins for your own python program?

2005-03-03 Thread David M. Cooke
Simon Wittber [EMAIL PROTECTED] writes: You mean like 'import'? :) That's how I would do it. It's the simplest thing, that works. exec(import %s as plugin % pluginName) plugin.someMethod() where pluginName is the name of the python file, minus the .py extension. You'd better hope someone

replacing builtins (WAS: Regular Expressions: large amount of or's)

2005-03-03 Thread Steven Bethard
Manlio Perillo wrote: Python allows to subclass builtin classes but the Python Interpreter uses builtin types. As an example keyword arguments are inserted in a dict but I would like to use an user defined SortedDict. There are plans to add such a feature in a future version? Note that it's

py2exe

2005-03-03 Thread demon_slayer2839
I'm a newbie at programmin. I've downloaded Python and am going through How to think like a computer scientist. I've also downloaded py2exe and I don't really know how to use it. For one what is the disutil? thanks for the help yall. -- http://mail.python.org/mailman/listinfo/python-list

Re: rearrange text

2005-03-03 Thread Russell Blau
Daniel Skinner [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] If I have the following text var = '1,2,3,4' and I want to use the comma as a field delimeter and rearrange the fields to read '1,3,2,4' How would I accomplish this in python? Well, it kind of depends on how you

Grid not getting updated

2005-03-03 Thread Gensek
I'm using wxPython. My program has a loop where it puts data in a grid cell, and then goes for some more processing. Well, some of the cells are used to indicate progress, but their usefulness is hindered by the fact that the grid refuses to change until the loop finishes, when it shows the final

Grid not getting updated

2005-03-03 Thread Gensek
I have a wxPython program, and it has a loop. I want to be able to break the loop by pushing a button. But it doesn't react to events until the loop finishes, which is sort of pointless. What's the best way to get it to work? Do I need threads? Or is there a more convenient way? --

Re: problem with recursion

2005-03-03 Thread [EMAIL PROTECTED]
take a look at os.walk, it is documented in the library documentation -- http://mail.python.org/mailman/listinfo/python-list

Re: How would you program this?

2005-03-03 Thread Russell Blau
Dennis Lee Bieber [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Wed, 2 Mar 2005 13:44:07 -0500, Russell Blau [EMAIL PROTECTED] declaimed the following in comp.lang.python: What you have is a set of 10 linear equations in 11 variables. Normally Worse -- there are 12

Re: py2exe

2005-03-03 Thread James Stroud
I'm sure that you will get plenty of lambasting for this kind of post, but since you are new... (1) try google first (2) read the how to be a hacker page: http://www.catb.org/~esr/faqs/hacker-howto.html (3) read the how to ask questions page:

Ruby on Rails or Perl's Maypole..is there a Python equivalent

2005-03-03 Thread Gary Nutbeam
I've noticed that the Perl camp has a very nice web/database environment called Maypole. Ruby has the Rails environment which on the surface seems similar to Maypole. I can't find anything in Python that ties a database to a web interface anywhere near as well as Ruby on Rails or Maypole. I see

Re: py2exe

2005-03-03 Thread jpolera
This looks like a pretty quick introduction/instruction page for py2exe: http://starship.python.net/crew/theller/py2exe/ How did we ever live without Google? [EMAIL PROTECTED] wrote: I'm a newbie at programmin. I've downloaded Python and am going through How to think like a computer

Re: any Python equivalent of Math::Polynomial::Solve?

2005-03-03 Thread Alex Renelt
Cousin Stanley wrote: Alex Thanks for posting your generalized numarray eigenvalue solution It's been almost 30 years since I've looked at any characteristic equation, eigenvalue, eignevector type of processing and at this point I don't recall many of the particulars

Re: Accessing Python parse trees

2005-03-03 Thread Lonnie Princehouse
No. I don't think it's possible to read the parse tree used by the interpreter, especially as it is being created. Here are a couple of kludgy ideas that might come close, though: 1. Use introspection to have your on_parsing function locate the and parse the code being executed. I'm not sure if

Re: any Python equivalent of Math::Polynomial::Solve?

2005-03-03 Thread Alex Renelt
Raymond L. Buvel wrote: Alex Renelt wrote: Alex Renelt wrote: in addition: I'm writing a class for polynomial manipulation. The generalization of the above code is: definitions: 1.) p = array([a_0, a_i, ..., a_n]) represents your polynomial P(x) = \sum _{i=0} ^n a_i x^i 2.) deg(p) is its degree

Re: Ruby on Rails or Perl's Maypole..is there a Python equivalent

2005-03-03 Thread deelan
Gary Nutbeam wrote: (...) Does anyone know of something similar to Rails or Maypole in Python? you may want to take a look at subway: http://subway.python-hosting.com/ it glues together cherrypy2, sqlobject and cheetah using an MVC approach. HTH, deelan. --

Re: How would you program this?

2005-03-03 Thread engsol
On Thu, 3 Mar 2005 14:57:13 -, Duncan Smith [EMAIL PROTECTED] wrote: engsol [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] There is a number puzzle which appears in the daily paper. Because I'm between Python projects, I thought it might be fun to write a program to solve

Re: Grid not getting updated

2005-03-03 Thread Steve Holden
Gensek wrote: I have a wxPython program, and it has a loop. I want to be able to break the loop by pushing a button. But it doesn't react to events until the loop finishes, which is sort of pointless. What's the best way to get it to work? Do I need threads? Or is there a more convenient way? You

  1   2   3   >