Re: Proposal: an unchanging URL for Python documentation

2005-04-18 Thread Fredrik Lundh
"Steve" <[EMAIL PROTECTED]> wrote: > I propose that an additional a URL be set up for the Python HTML > documentation. This URL will always contain the current version of the > documentation. Suppose we call it "current". Then (while 2.4 is still > the current version) the documentation for th

Re: Nokia to speak at Python-UK next week

2005-04-18 Thread Ville Vainio
> "Nick" == Nick Craig-Wood <[EMAIL PROTECTED]> writes: Nick> Not entirely on topic, but does anyone know if there is a Nick> series 80 python? Or if the series 60 python runs on a Nick> series 80 phone (eg communicator 9300/9500)? Nope & nope. It would be easy-ish to get Python

Re: pre-PEP: Simple Thunks

2005-04-18 Thread Ron_Adam
On Mon, 18 Apr 2005 21:11:52 -0700, Brian Sabbey <[EMAIL PROTECTED]> wrote: >Ron_Adam wrote: >> The load and dump would be private to the data class object. Here's a >> more complete example. >> >> import pickle >> class PickledData(object): >> def __init__(self, filename): >> se

Re: Enumerating formatting strings

2005-04-18 Thread Bengt Richter
On Mon, 18 Apr 2005 16:24:39 -0400, Steve Holden <[EMAIL PROTECTED]> wrote: >I was messing about with formatting and realized that the right kind of >object could quite easily tell me exactly what accesses are made to the >mapping in a string % mapping operation. This is a fairly well-known >te

Re: Inelegant

2005-04-18 Thread Greg Ewing
Bengt Richter wrote: I never liked any of the solutions that demand bracketing the string with expression brackets, but I just had an idea ;-) Or for an even more twisted idea: from textwrap import dedent class _Dedent(type): def __new__(cls, name, bases, dict): if name == "*": # fo

module MySQLdb is missing in python 2.3.3

2005-04-18 Thread praba kar
Dear All, I am using python 2.3.3 version. If I try to import MySQLdb. Here I found " the following error" importError: No module named MySQLdb. So what I need to do for this ?. How I need to install this MySQLdbo. praba ___

Re: def a((b,c,d),e):

2005-04-18 Thread AdSR
> Thanks for pointing this out. However I see no atrocity potential here > -- what did you have in mind? Bad choice of words. I meant obfuscated, something like def z(((a, b), (c, d)), e, f): pass but much worse. But it looks like there is nothing unusual about it after all. Oh, well... AdS

Re: Tiny fonts in wxPython app

2005-04-18 Thread Sven Kobow
Jeff Reavis wrote: > Sven, > It may be the default gtk font settings. This can be changed in the > .gtkrc file. > > -jjr > I'm not sure but the gnome font in general looks okay? Could be something about proportional fonts? Or maybe a Unicode issue? I read something about that. Sven -- http://ma

Re: EasyDialogs module problem with python 2.4.1

2005-04-18 Thread "Martin v. Löwis"
scott wrote: > Can I get this Pyshell behavior using python from the terminal? One application is "active" at any point in time, and this application controls the menu, has its windows displayed, and so on. So when the Terminal.app is active, Python cannot be. Now, it may be possible to programma

Re: (PHP or Python) Developing something like www.tribe.net

2005-04-18 Thread Mir Nazim
I agree Zope2/Plone are really mature. But I think you missed my point. It is not neccessary that I may be using all the functionality of Plone etc. More over zope3 seems to have got a few great features like better support for building filesystem based products, easier learning curve etc. Please

Re: pre-PEP: Suite-Based Keywords

2005-04-18 Thread Bengt Richter
On Mon, 18 Apr 2005 14:06:08 -0700, "Robert Brewer" <[EMAIL PROTECTED]> wrote: >Reinhold Birkenfeld wrote: >> >y =3D (f(11, 22, x=3D1, y=3D'y for f') * >> > g(*args_from_somewhere, >> > x=3D'x for g', y=3D'y for g', >> > foo=3Dlambda: return 'foo for g')) >> > >> >would be my curre

Re: pre-PEP: Suite-Based Keywords

2005-04-18 Thread Bengt Richter
On Mon, 18 Apr 2005 12:50:24 +0200, Reinhold Birkenfeld <[EMAIL PROTECTED]> wrote: >Bengt Richter wrote: >> On Sun, 17 Apr 2005 15:25:04 +0200, Reinhold Birkenfeld <[EMAIL PROTECTED]> >> wrote: > Note that there is no problem adding other parameters, because :: is just a unary ex

uploading/streaming a file to a java servlet

2005-04-18 Thread Vasil Slavov
I apologize for the long email. I hope somebody will have time to read it and give some suggestions. I am working on a school project written in Python (using mod_python) and I need to upload a file to a java servlet. Here are the high-level instructions given by the servlet authors (the instructi

Re: pre-PEP: Simple Thunks

2005-04-18 Thread Brian Sabbey
Ron_Adam wrote: The load and dump would be private to the data class object. Here's a more complete example. import pickle class PickledData(object): def __init__(self, filename): self.filename = filename self.L = None try:

Re: Proposal: an unchanging URL for Python documentation

2005-04-18 Thread Skip Montanaro
Skip> But appears to be firefox-specific. Michael> Works for me with both Firefox and IE6 under WinXP The wikalong.org thing is firefox-specific. You trimmed too much from my reply. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: pydoc preference for triple double over triple single quotes--anyreason?

2005-04-18 Thread Brian van den Broek
Kent Johnson said unto the world upon 2005-04-18 08:20: The puzzle for me was that if I enter my module name in the "Search for" box, it shows up in the list of results, as expected. But whether the results list entry for my module incorporates the description form my module's docstring or inst

grammar for where/letting/with and suite expressions (thunks etc)

2005-04-18 Thread Bengt Richter
We have where syntax in combination with suite expression syntax (bear with me, I think a good synergy will emerge ;-) http://groups.google.co.uk/groups?selm=mailman.403.1105274631.22381.python-list%40python.org http://groups.google.co.uk/groups?selm=3480qqF46jprlU1%40individual.net are the key

Re: pre-PEP: Suite-Based Keywords - syntax proposal

2005-04-18 Thread Bengt Richter
On 17 Apr 2005 21:48:47 -0700, "Kay Schluehr" <[EMAIL PROTECTED]> wrote: >> > >> I like this. But how would you put "where args:" and "where kw:" if >you needed both? >> also, is it looking back to see the '*' or '**' to do (::x=1).values >vs. (::x=1) >> and how about (::x=1).keys() or (::x=1).ite

Re: Proposal: an unchanging URL for Python documentation

2005-04-18 Thread Michael Spencer
Skip Montanaro wrote: steve> I propose that an additional a URL be set up for the Python HTML steve> documentation. This URL will always contain the current version steve> of the documentation. Suppose we call it "current". Then (while steve> 2.4 is still the current version) the

Re: Proposal: an unchanging URL for Python documentation

2005-04-18 Thread Tim Peters
[Steve] > I have a suggestion/request that will, I think, improve the Python > documentation. > > Currently, the Python documentation in HTML format is stored at URLs > that change with each new release of Python. That is, for example, the > documentation for the os module is at > http://python.or

Re: Proposal: an unchanging URL for Python documentation

2005-04-18 Thread Skip Montanaro
steve> I propose that an additional a URL be set up for the Python HTML steve> documentation. This URL will always contain the current version steve> of the documentation. Suppose we call it "current". Then (while steve> 2.4 is still the current version) the documentation for th

Proposal: an unchanging URL for Python documentation

2005-04-18 Thread Steve
posted on: comp.lang.python emailed to: [EMAIL PROTECTED] I have a suggestion/request that will, I think, improve the Python documentation. Currently, the Python documentation in HTML format is stored at URLs that change with each new release of Python. That is, for example, the documentation fo

Re: Wrapping C++ Class Heirachy in Python

2005-04-18 Thread Skip Montanaro
Roy> I've been playing around with ctypes Roy> (http://starship.python.net/crew/theller/ctypes/) recently. So Roy> far, it looks pretty cool. Wrapping C++ libraries? Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Wrapping C++ Class Heirachy in Python

2005-04-18 Thread Roy Smith
In article <[EMAIL PROTECTED]>, Chris Smith <[EMAIL PROTECTED]> wrote: > > Diez B Roggisch <[EMAIL PROTECTED]> writes: > > >> PyType_Ready but in Python the base class isn't recognised. Is > >> there anything obvious I'm missing? > > > Maybe - I'd go for one of the several avail

Re: Wrapping C++ Class Heirachy in Python

2005-04-18 Thread Chris Smith
> Diez B Roggisch <[EMAIL PROTECTED]> writes: >> PyType_Ready but in Python the base class isn't recognised. Is >> there anything obvious I'm missing? > Maybe - I'd go for one of the several available python wrapper > generators. I personally had good experiences with SIP. But

Re: EasyDialogs module problem with python 2.4.1

2005-04-18 Thread scott
Martin v. Löwis wrote: Try pythonw. Thanks, that was it. One more question, when I use the EasyDialogs module to, for example, display a message in a dialog box, the dialog box doesn't appear directly. I need to switch to 'python' by clicking on it on the dock or alt-tabbing to 'python' in order

Re: Can't compile with --enable-shared on MacOSX

2005-04-18 Thread Robert Kern
Lothar Scholz wrote: Maarten Sneep <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... On Mac OS X the shared library functionality is obtained through frameworks. It may detect this by default, but I'm not sure about Not good. I don't want frameworks. I must embedd python into my

Re: Can't compile with --enable-shared on MacOSX

2005-04-18 Thread Lothar Scholz
Maarten Sneep <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > On Mac OS X the shared library functionality is obtained through > frameworks. It may detect this by default, but I'm not sure about Not good. I don't want frameworks. I must embedd python into my application. Sett

Trouble Installing TTX/FontTools (asks for .NET Framework Packages)

2005-04-18 Thread weston
I'm trying to install FontTools ("a library for manipulating fonts, written in Python") on a Win XP box, and I'm given a bit of pause that this process seems to require downloading some MS .NET framework packages -- at least, this is what the "setup.py" script has told when I've tried to run it: "

Re: Updating Windows File Summary Data

2005-04-18 Thread Roger Upole
Pywin32 has functions to read and write these properties. Take a look at testStorage.py in the \win32\test directory for an example of how to use them. Roger "Denrael" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I am looking for a way in Python to update Windows File

Re: Tkinter Event Types

2005-04-18 Thread Jeff Epler
The "type" field is related to the definition of different events in X11. In Xlib, the event structure is a "C" union with the first (common) field giving the type of the event so that the event-dependant fields can be accessed through the proper union member. Generally, you won't use this field

Re: Removing dictionary-keys not in a set?

2005-04-18 Thread Raymond Hettinger
[Klaus Alexander Seistrup] > >>> d1 = {1:'a', 2:'b', 3:'c', 4:'d', 5:'e'} > >>> s1 = set(d1) > >>> s1 > set([1, 2, 3, 4, 5]) > >>> s2 = set([1, 3, 5]) > >>> s1-s2 > set([2, 4]) > >>> for k in s1-s2: > ... del d1[k] > ... FWIW, if s2 is not already a set object, it need not be transformed befor

Re: fpectl

2005-04-18 Thread Jeff Epler
It looks like the automatic build of the 'fpectl' module was broken somewhere along the line, perhaps when the transition from Modules/Setup to setup.py took place. Once I made the change below and rebuilt, I got the fpectl module. Furthermore, it appeared to "do something" on my Linux/x86 system:

Re: Behaviour of str.split

2005-04-18 Thread Raymond Hettinger
[Will McGugan] > >I'm curious about the behaviour of the str.split() when applied to empty > >strings. > > > >"".split() returns an empty list, however.. > > > >"".split("*") returns a list containing one empty string. [John Machin] > You are missing a perusal of the documentation. Had you done so

Re: New Python regex Doc (was: Python documentation moronicities)

2005-04-18 Thread Jeff Epler
On Mon, Apr 18, 2005 at 01:40:43PM -0700, Xah Lee wrote: > i have rewrote the Python's re module documentation. > See it here for table of content page: > http://xahlee.org/perl-python/python_re-write/lib/module-re.html For those who have long ago consigned Mr. Lee to a killfile, it looks like he'

Re: Updating Windows File Summary Data

2005-04-18 Thread Trent Mick
[Denrael wrote] > I am looking for a way in Python to update Windows File Summary > Metadata. By that I mean the data (Title, Subject, Keywords, Comments) > found when you right click a windows file, select properties and then > summary. Can anyone point me in the right direction? I'm not sure if

Re: Wrapping C++ Class Heirachy in Python

2005-04-18 Thread Steve Juranich
On 4/18/05, Andrew Wilkinson <[EMAIL PROTECTED]> wrote: > I'm trying to wrap a C++ class hierarchy with Python types and I'd like to > maintain the hierarchy in the types. I'm fairly sure this is possible, > isn't it? Yes. > Are there any documents explaining how to do this, the standard Python >

Re: def a((b,c,d),e):

2005-04-18 Thread Diez B. Roggisch
AdSR wrote: >> Yes, but usually not so much in function arguments but more in >> list-comprehensions or other places where unpacking was useful. I > love the >> feature - I just don't have nested enough data to use it more :) > > I use tuple unpacking in its typical uses, it's one of the first >

Re: Enumerating formatting strings

2005-04-18 Thread Michael Spencer
Steve Holden wrote: I've been wondering whether it's possible to perform a similar analysis on non-mapping-type format strings, so as to know how long a tuple to provide, or whether I'd be forced to lexical analysis of the form string. regards Steve I do not know if it is possible to do that. B

Re: Compute pi to base 12 using Python?

2005-04-18 Thread [EMAIL PROTECTED]
Nick Craig-Wood wrote: > [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Nick Craig-Wood wrote: > > > [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > I'm using GMPY (see code). > > > [snip] > > > > > > If you are using gmpy you might as well do it like this. > > > > > > gmpy.pi() uses

Re: def a((b,c,d),e):

2005-04-18 Thread John Machin
On 18 Apr 2005 13:05:57 -0700, "AdSR" <[EMAIL PROTECTED]> wrote: >Fellow Pythonistas, > >Please check out > >http://spyced.blogspot.com/2005/04/how-well-do-you-know-python-part-3.html > >if you haven't done so yet. It appears that you can specify a function >explicitly to take n-tuples as argument

strange error in socket.py

2005-04-18 Thread nw_moriarty
Folks I'm getting a very strange error when I'm using the SocketServer. Has anybody got any ideas? Nigel File "/scratch1/nigel/c6/phenix-1.08a/build/intel-linux/python/lib/python2.4/SocketServer.py", line 468, in process_request_thread File "/scratch1/nigel/c6/phenix-1.08a/build/intel-linux

Re: def a((b,c,d),e):

2005-04-18 Thread François Pinard
[Diez B. Roggisch] > AdSR wrote: > > It appears that you can specify a function explicitly to take > > n-tuples as arguments. [...] Has anyone actually used it in real > > code? I do not use it often in practice, but sometimes, yes. If the feature was not there, it would be easy to do an explici

Re: def a((b,c,d),e):

2005-04-18 Thread AdSR
> Yes, but usually not so much in function arguments but more in > list-comprehensions or other places where unpacking was useful. I love the > feature - I just don't have nested enough data to use it more :) I use tuple unpacking in its typical uses, it's one of the first language features I lear

Dr. Dobb's Python-URL! - weekly Python news and links (Apr 18)

2005-04-18 Thread Simon Brunning
QOTW: "Darn. I finally say something that gets into Quote of the Week, and it's attributed to someone else!" -- Greg Ewing (we think) http://groups-beta.google.com/group/comp.lang.python/msg/15b836a557afccb2 "If there were something wrong with the API, Guido would have long since fired up the

Re: def a((b,c,d),e):

2005-04-18 Thread Diez B. Roggisch
AdSR wrote: > Fellow Pythonistas, > > Please check out > > http://spyced.blogspot.com/2005/04/how-well-do-you-know-python-part-3.html > > if you haven't done so yet. It appears that you can specify a function > explicitly to take n-tuples as arguments. It actually works, checked > this myself.

Re: pre-PEP: Suite-Based Keywords

2005-04-18 Thread Ron_Adam
On Mon, 18 Apr 2005 14:06:08 -0700, "Robert Brewer" <[EMAIL PROTECTED]> wrote: >Reinhold Birkenfeld wrote: >> >y = (f(11, 22, x=1, y='y for f') * >> > g(*args_from_somewhere, >> > x='x for g', y='y for g', >> > foo=lambda: return 'foo for g')) >> > >> >would be my current way to ex

Re: Wrapping C++ Class Heirachy in Python

2005-04-18 Thread Diez B. Roggisch
> PyType_Ready but in Python the base class isn't recognised. Is there > anything obvious I'm missing? Maybe - I'd go for one of the several available python wrapper generators. I personally had good experiences with SIP. But you might also try boost python or SWIG. The python C-API is great - f

Re: Behaviour of str.split

2005-04-18 Thread John Machin
On Mon, 18 Apr 2005 16:16:00 +0100, Will McGugan <[EMAIL PROTECTED]> wrote: >Hi, > >I'm curious about the behaviour of the str.split() when applied to empty >strings. > >"".split() returns an empty list, however.. > >"".split("*") returns a list containing one empty string. > >I would have expect

Re: Tiny fonts in wxPython app

2005-04-18 Thread Jeff Reavis
Sven, It may be the default gtk font settings. This can be changed in the .gtkrc file. -jjr -- http://mail.python.org/mailman/listinfo/python-list

Wrapping C++ Class Heirachy in Python

2005-04-18 Thread Andrew Wilkinson
Hi, I'm trying to wrap a C++ class hierarchy with Python types and I'd like to maintain the hierarchy in the types. I'm fairly sure this is possible, isn't it? Are there any documents explaining how to do this, the standard Python manual doesn't go into enough detail about creating types for this

Updating Windows File Summary Data

2005-04-18 Thread Denrael
I am looking for a way in Python to update Windows File Summary Metadata. By that I mean the data (Title, Subject, Keywords, Comments) found when you right click a windows file, select properties and then summary. Can anyone point me in the right direction? -- http://mail.python.org/mailman/listi

Re: Can a function be called within a function ?

2005-04-18 Thread Peter Moscatt
Thanks Guys, I didn't think it was calling the function so I will put some test code and print something to the screen just to ensure it's entering the function. Thanks for all ya help. Pete Peter Moscatt wrote: > > Is it possible to write code and allow a function to be called within > an

Re: Parse command line options

2005-04-18 Thread hue
Thanks for your reply, I have used some of your ideas in my Code. -- http://mail.python.org/mailman/listinfo/python-list

Re: Parse command line options

2005-04-18 Thread hue
Thanks for your reply, I have used some of your ideas in my Code. -- http://mail.python.org/mailman/listinfo/python-list

Re: Slight discrepancy with filecmp.cmp

2005-04-18 Thread Dan Sommers
On Mon, 18 Apr 2005 09:02:44 -0600, Ivan Van Laningham <[EMAIL PROTECTED]> wrote: > ... Shows how much you need another set of eyeballs to debug your > brain;-) +1 QOTW > ... And my wife never sees anything the way I do;-) There's probably a rude joke in there somewhere about your wife's eyes d

Re: Tkinter Event Types

2005-04-18 Thread tiissa
codecraig wrote: Hi, When I do something like. s = Scale(master) s.bind("", callback) def callback(self, event): print event.type I see "7" printed out. Where are these constants defined for various event types? Basically i want to do something like... 7 must be for KeyPressed. That's the t

Re: def a((b,c,d),e):

2005-04-18 Thread AdSR
> if you think this is an "atrocity", maybe programming isn't for you. My resume might suggest otherwise but I guess that's not the main topic here. Maybe I got carried away -- this one took me completely by surprise. Anyway, this gets interesting: def z(((a, b), (c, d)), (e, f)): pass alth

Re: Tkinter & Tkconstants

2005-04-18 Thread codecraig
nevermind, i should access it by HORIZONTAL not Tkinter.HORIZONTAL since I imported everything from Tkinter already. Thanks anyway -- http://mail.python.org/mailman/listinfo/python-list

RE: pre-PEP: Suite-Based Keywords

2005-04-18 Thread Robert Brewer
Reinhold Birkenfeld wrote: > >y = (f(11, 22, x=1, y='y for f') * > > g(*args_from_somewhere, > > x='x for g', y='y for g', > > foo=lambda: return 'foo for g')) > > > >would be my current way to express this. But still, the less lines, > >the less confusing it is. And Ron Adam repli

Re: Apache mod_python

2005-04-18 Thread Sizer
Dan <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > My question is, how mature/stable is mod_python? Is it suitable for a > production environment? The documentation is a bit lacking, and I've I use mod_python for all my web stuff, including several live production sites - no problems

Tkinter Event Types

2005-04-18 Thread codecraig
Hi, When I do something like. s = Scale(master) s.bind("", callback) def callback(self, event): print event.type I see "7" printed out. Where are these constants defined for various event types? Basically i want to do something like... def callback(self, event): if event.type == ENT

Re: def a((b,c,d),e):

2005-04-18 Thread Fredrik Lundh
Michael Spencer wrote: See also the source of inspect.getargs for just how much this complicates the argument-passing logic! it doesn't complicate the argument-passing in any way at all -- it complicates the reverse engineering code a bit, though, since it has to convert the bytecode for def f

New Python regex Doc (was: Python documentation moronicities)

2005-04-18 Thread Xah Lee
i have rewrote the Python's re module documentation. See it here for table of content page: http://xahlee.org/perl-python/python_re-write/lib/module-re.html The doc is broken into 4 sections: * regex functions (node111.html) * regex OOP (re-objects.html) * matched objects (match-objects.html) * re

Re: ANN: Veusz 0.5 - a scientific plotting package

2005-04-18 Thread jdh2358
Hi Jeremy, I'm the matplotlib author -- I'm writing under a different email address since my email server seems to be dying... I'll start by saying that I for one won't criticize you for rolling you own plotting package rather than join forces with an existing project. I've been accused of the sa

Re: Tkinter & Tkconstants

2005-04-18 Thread tiissa
codecraig wrote: from Tkinter import * you have access to the constants in Tkconstants, since Tkinter imports it automatically. Yes However, in the shell if I do.. from Tkinter import * print Tkinter.HORIZONTAL I get an error..NameError: Tkinter is not defined Sure, you ask for Tkinter.HORIZONTAL.

Tiny fonts in wxPython app

2005-04-18 Thread Sven Kobow
Hello, I'm not yet a python programmer but a python user. I faced a problem with tiny fonts in a wxPython app on a GNU/Debian system. Under Gentoo Linux the fonts are displayed in a normal readable size. Only on that Debian system fonts in the whole app are rather tiny. I spend quite a long time g

Re: def a((b,c,d),e):

2005-04-18 Thread Fredrik Lundh
"AdSR" <[EMAIL PROTECTED]> wrote: Small wonder since it looks like one of those language features that make committing atrocities an order of magnitude easier. eh? def f((a, b)): ... is short for def f(tmp): a, b = tmp ... if you think this is an "atrocity", maybe program

Re: EasyDialogs module problem with python 2.4.1

2005-04-18 Thread "Martin v. Löwis"
scott wrote: > MacOS.Error: (-1713, 'no user interaction is allowed') Try pythonw. Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: def a((b,c,d),e):

2005-04-18 Thread Michael Spencer
AdSR wrote: Fellow Pythonistas, Please check out http://spyced.blogspot.com/2005/04/how-well-do-you-know-python-part-3.html if you haven't done so yet. It appears that you can specify a function explicitly to take n-tuples as arguments. It actually works, checked this myself. If you read the refere

Enumerating formatting strings

2005-04-18 Thread Steve Holden
I was messing about with formatting and realized that the right kind of object could quite easily tell me exactly what accesses are made to the mapping in a string % mapping operation. This is a fairly well-known technique, modified to tell me what keys would need to be present in any mapping u

Re: Can a function be called within a function ?

2005-04-18 Thread Steve Horsley
Peter Moscatt wrote: Is it possible to write code and allow a function to be called within another like I have shown below ? Pete def populatelist(): f=open(_globals.appath + "dxcluster.svr","r") while true: text = f.readline() if text =="":

Re: def a((b,c,d),e):

2005-04-18 Thread Simon Percivall
You can always unpack a tuple that way, like in: .>>> import sys .>>> for (index, (key, value)) in enumerate(sys.modules.iteritems()): pass -- http://mail.python.org/mailman/listinfo/python-list

Tkinter & Tkconstants

2005-04-18 Thread codecraig
Hi, I was reading through the Tkinter tutorial at http://www.pythonware.com/library/tkinter/introduction/index.htm ...and it mentions that by doing, from Tkinter import * you have access to the constants in Tkconstants, since Tkinter imports it automatically. However, in the shell if I do.. f

def a((b,c,d),e):

2005-04-18 Thread AdSR
Fellow Pythonistas, Please check out http://spyced.blogspot.com/2005/04/how-well-do-you-know-python-part-3.html if you haven't done so yet. It appears that you can specify a function explicitly to take n-tuples as arguments. It actually works, checked this myself. If you read the reference manua

Re: fpectl

2005-04-18 Thread tiissa
Matt wrote: Sébastien Boisgérault wrote: My platform is Linux (Mandrake 10.x) I'm assuming that means you can't use it on a Windows platform It's harsh to say Mandrake is a Windows platform. ;o) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.4 killing commercial Windows Python development ?

2005-04-18 Thread Jarek Zgoda
Roger Binns napisał(a): The distutils approach is mainly useful for packages and libraries, not for applications. And of course it still has the prerequisites issues mentioned earlier. This reminds me, that there is still no clear direction as to where install Python applications on Linux if one

Re: Parse command line options

2005-04-18 Thread thomasadunham
Hue, It looks like you may have options and arguments confused. Arguments are the pieces of information that your program needs to run. Options are used to tune the behaviour of your program. For example: grep -i foo bar Tries to match the expression "foo" in the file "bar", ignoring the case of t

Re: Do You Want To Know For Sure That You Are Going To Heaven? The reason some people don't know for sure if they are going to Heaven when they die is because they just don't know. The good news is that you can know for sure that you are going to Heaven wh

2005-04-18 Thread sheltech
No, but I know some cowboys who are ... (how can I put this delicately?) er... inclined towards the bovine , who yell "Bramah !" . Did I say I knew them?... I meant "knew OF" them. Yeah , "OF". HTH DS "Mike brown" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > In article <[EMAIL PR

Twisted for online games

2005-04-18 Thread sir.shz
Hi, I'm just starting to play with Twisted, and planning to use it for sone online games (e.g., casino games, etc.), have people done that before, are there any pointers? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: packages

2005-04-18 Thread tiissa
Jaime Wyant wrote: What I *dont* like about the example is the PascalStyleCasing used for the package names. Is their not some *suggested* standard on naming conventions? There is: see PEP 8. http://www.python.org/peps/pep-0008.html However, I understood there was no definitive convention hence va

Re: packages

2005-04-18 Thread F. Petitjean
Le Mon, 18 Apr 2005 20:29:39 +0200, Mage a écrit : >Hello, > > I read about modules and packages in the tutorial. I think I understand > how to use packages and modules, even I know how to create a module (as > far I understand it's a simple .py) file , but I don't know how can I > create

Re: Pattern Matching Given # of Characters and no String Input; use RegularExpressions?

2005-04-18 Thread tiissa
Synonymous wrote: tiissa <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... tiissa wrote: If you know the number of characters to match can't you just compare slices? If you don't, you can still do it by hand: In [7]: def cmp(s1,s2): : diff_map=[chr(s1[i]!=s2[i]) for i in r

Re: Replaying multimedia data.

2005-04-18 Thread Diez B. Roggisch
> When I am done gathering data, I read them offline using nearly the > same script as the one I used to gather them. While I don't have a > problem with reading them in a text format, I would like to display > them to others than myself in a way that is visually appealing. > Something along the li

Replaying multimedia data.

2005-04-18 Thread [EMAIL PROTECTED]
Hello, On a robotic project I am working on, I am taking data through different sensors (cameras, acceleration, gyroscopes,) and store the attendant data into files for further processing. When I am done gathering data, I read them offline using nearly the same script as the one I used to gat

Re: packages

2005-04-18 Thread Jaime Wyant
A package is a collection of related modules. The modules are 'collected' in a directory that contains a special __init__.py script. Put this directory some where in your PYTHONPATH and you can do stuff like -> from mypackage.mymodule import MyObject The tutorial uses a sound package as its exam

Re: packages

2005-04-18 Thread Chris Cioffi
Check out http://docs.python.org/tut/node8.html#SECTION00840 Basically a package is a directory with one or more Python modules along with the "special" module called __init__.py. Chris On 18/04/05, Mage <[EMAIL PROTECTED]> wrote: > Hello, > > I read about modules and pack

Re: Removing dictionary-keys not in a set?

2005-04-18 Thread Oren Tirosh
"Tim N. van der Leeuw" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > Hi, > > I'd like to remove keys from a dictionary, which are not found in a > specific set. Here's my magic English-to-Python translator: "I'd like to ... keys which ..." -> "for key in" "keys from a di

packages

2005-04-18 Thread Mage
Hello, I read about modules and packages in the tutorial. I think I understand how to use packages and modules, even I know how to create a module (as far I understand it's a simple .py) file , but I don't know how can I create a package and when should I do it. Where should I look for mor

Re: Behaviour of str.split

2005-04-18 Thread runes
[Tim N. van der Leeuw] > Fortunately, this is easy to write as: list("mystring"). Sure, and map(None, "mystring") Anyways, I have settled with this bevaviour, more or less ;-) Rune -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: Python 2.3.2 for PalmOS available

2005-04-18 Thread Fraca7
On Fri, 15 Apr 2005 16:40:05 -0700, [EMAIL PROTECTED] wrote: > Hello, > While talking with Facundo while in a PyAr meeting (python-argentina, > http://www.python.org/ar ) he told me that there is some interest in > this platform. You bet there is. i almost bought a Pocket PC instead of my Clié T

Re: Behaviour of str.split

2005-04-18 Thread Tim N. van der Leeuw
runes wrote: > The behaviour of "".split("*") is not that strange as the splitpoint > always disappear. The re.split() have a nice option to keep the > splitpoint which the str.split should have, I think. > > One expectation I keep fighting within myself is that I expect > > "mystring".split('') t

Re: Removing dictionary-keys not in a set?

2005-04-18 Thread Steven Bethard
Tim N. van der Leeuw wrote: In my taste, using generator expressions with conditions actually doesn't look very readable; it hides the set-membership test under the syntactic clutter. You might try different indentation. I find that I write a lot of my list comprehensions and generator expression

Re: How to get a Function object from a Frame object

2005-04-18 Thread Steven Bethard
Gigi wrote: I need access to a function object that corresponds to a frame object in a certain case from inside the function. I can get the frame object using: f = sys._getframe(0) But the resulting frame object doesn't contain the information I need. There is a lot of information in the code ob

Re: Problem with unpack hex to decimal

2005-04-18 Thread [EMAIL PROTECTED]
Thank you all very much. It looked like I was not the only one confused. Jake. -- http://mail.python.org/mailman/listinfo/python-list

Re: Removing dictionary-keys not in a set?

2005-04-18 Thread Tim N. van der Leeuw
Hi Klaus, I think I like the looks of your version the best, so far. Readable and clear, to me. cheers and thanks, --Tim -- http://mail.python.org/mailman/listinfo/python-list

Re: Removing dictionary-keys not in a set?

2005-04-18 Thread Tim N. van der Leeuw
Hi Aahz, The problem with using the builtin set operations is, that the dictionary keys don't represent a set, so you can't directly create a new dictionary using set methods. So I'm looking for what's a concise way to update a dictionary, or create a new dictionary, using basically an intersecti

Re: EasyDialogs module problem with python 2.4.1

2005-04-18 Thread scott
scott wrote: First my setup: I'm using the framework build of Python 2.4.1 ( http://bob.pythonmac.org/archives/2005/03/31/macpython-241-installer/ ) on an ibook G4 running Mac OS 10.3.8. I installed wxPython 2.5.5.1 ( Unicode runtime 2.5.5.1 for the Panther version of Macpython-OSX 2.4 ) ( http:/

Re: EasyDialogs module problem with python 2.4.1

2005-04-18 Thread "Martin v. Löwis"
scott wrote: > EasyDialogs module > > ( http://www.python.org/doc/2.4.1/mac/module-EasyDialogs.html ) > > works with pyshell (interactive python program included with wxPython) > but not with python launched at the terminal: Could you be more precise what "works not" means? What do you expect t

Re: compiling python 2.4.1 on Linux_X86_64 using PGI compiler fails

2005-04-18 Thread "Martin v. Löwis"
Berthold Höllmann wrote: > Has anyone compiled python successfully using PGI compilers under 64 > bit Linux. If yes, what are the neccesarry switches? As a starting point, I would try to compile without optimization. If the compiler has something similar to gcc's -fno-strict-aliasing, you should

  1   2   >