Re: Winpdb question

2005-11-12 Thread nir1408
Hello Bryan, You can restrict the number of variables displayed in the globals name-space viewer with the filter button located second from the right on the tool bar. This will filter out modules, classes, and function names from the list. Nir -- http://mail.python.org/mailman/listinfo/python-li

Re: circle and point

2005-11-12 Thread Ben Bush
On 11/12/05, Robert Kern <[EMAIL PROTECTED]> wrote: Ben Bush wrote:> is there any code to decide whether a point is located within the circle> by three other points? # Converted from my C++ code.# C.f. http://www.ics.uci.edu/~eppstein/junkyard/circumcenter.htmldef circumcenter(x0, y0, 

Re: Copyright [was Re: Python obfuscation]

2005-11-12 Thread Mike Meyer
"The Eternal Squire" <[EMAIL PROTECTED]> writes: >>Copyright is a gift granted by the government, not the natural state of >>the world. When kings and emperors and presidents give commercial and >>economic gifts, like monopolies, they rarely are for the benefit of the >>majority. > Last I knew, we

Re: circle and point

2005-11-12 Thread Robert Kern
Ben Bush wrote: > is there any code to decide whether a point is located within the circle > by three other points? # Converted from my C++ code. # C.f. http://www.ics.uci.edu/~eppstein/junkyard/circumcenter.html def circumcenter(x0, y0, x1, y1, x2, y2): x0m2

Re: Copyright [was Re: Python obfuscation]

2005-11-12 Thread The Eternal Squire
>Perhaps there is no way to make a living from writing novels without >copyright. There is no way to make a living from playing solitaire either >-- should the government pass a law giving a legal monopoly on playing red >queen on a black king to my granny, so that everyone playing that move >has t

Installing tkinter with Python 2.4.2 on FC4

2005-11-12 Thread Paul Watson
I cannot yet get tkinter working on 2.4.2. I have installed the tk rpms from FC4. I have checked to see that TKPATH is available in Modules/Setup. How can I verify that I have tcl/tk installed correctly and it is the correct version (8+)? -- http://mail.python.org/mailman/listinfo/python-l

circle and point

2005-11-12 Thread Ben Bush
is there any code to decide whether a point is located within the circle by three other points?Thanks!B. Bush -- http://mail.python.org/mailman/listinfo/python-list

Re: triangulation

2005-11-12 Thread Ben Bush
Is there any pure python ocde there thoguh it is slow? Not many people know C very well and it will be great to have some python code even for education use. Ben   I know someone once mentioned that they tried writing one of theDelaunay triangulation algorithms in pure Python and abandoned it forbe

the button of cancel

2005-11-12 Thread Ben Bush
When I click the button of cancel, I got the follwoing message. I want to see "Goodbye" on the console screen.What to do?   Traceback (most recent call last):  File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript    exec codeObject in __main__.__dict

Re: Hash map with multiple keys per value ?

2005-11-12 Thread Tom Anderson
On Fri, 11 Nov 2005, Chris Stiles wrote: > Is there an easier and cleaner way of doing this ? Is there example > code floating around that I might have a look at ? I'm not aware of a way which can honestly be called better. However, i do feel your pain about representing the alias relationship

Re: directory listing

2005-11-12 Thread Shi Mu
thanks a lot! On 11/11/05, Michael Konrad <[EMAIL PROTECTED]> wrote: > > This is what I decided on for a solution. I haven't tested it > cross-platform yet. > > import os > > def dirListing(directory='/Users/mkonrad'): >"""Returns a list of directories.""" >#variabl

Inheritence Problem

2005-11-12 Thread graemeharnish
Hello. I'm trying to mod an open source app called TinyERP and inherit from a parent object, and in essence change how _column is defined. I found sample code of: class custom_product(osv.osv): __inherits__ = "product.product" __name__ = "product.product" _columns = { 'color' : fields.

Re: Python obfuscation

2005-11-12 Thread Alex Martelli
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > In a competitive marketplace, why would I choose to buy DRMed software if > there is a non-DRMed equivalent with the same functionality and equivalent > cost? The only explanation I can think of is, their marketing must be AWEsome!-) Alex -- http://

Re: Hash map with multiple keys per value ?

2005-11-12 Thread Alex Martelli
Chris Stiles <[EMAIL PROTECTED]> wrote: ... > > alias insertion just be of the form "x aliases to y" rather than "x > > names object XXX"? > > In this case, strictly speaking there are no such thing as an 'object XXX', > all the aliases are names for the object, each as important as each other.

Re: Iterator addition

2005-11-12 Thread bearophileHUGS
Tom Anderson: > And we're halfway to looking like perl already! Perhaps a more pythonic > thing would be to define a "then" operator: > all_lines = file1 then file2 then file3 Or a "chain" one: > all_lines = file1 chain file2 chain file3 Bearophile -- http://mail.python.org/mailman/listinfo/pyt

Re: tutorial example

2005-11-12 Thread Steven D'Aprano
On Sat, 12 Nov 2005 13:42:37 +, Max Erickson wrote: > > Not in python. > > For example, what would you call the following? > > def rsum(n, m): > print n+m > return n+m > > > In python a method is callable attached to an object. A function is a > callable object constructed with a

Re: Proposal for adding symbols within Python

2005-11-12 Thread Steven D'Aprano
On Sat, 12 Nov 2005 18:59:39 +0100, Pierre Barbier de Reuille wrote: > 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. I think your chances of convincing Gu

tutorial example?????

2005-11-12 Thread john boy
OK...I have the following program   i = 1 while i <= 6:     print 2 * i,'   ',     i = i + 1 print   this is supposed to give you a "new" blank line after the program runs instead it just gives: 2   4   6   8   10   12 >>>   instead of: 2   4   6   8   10   12   >>>   to get the above return I have

[OT] Copyright [was Re: Python obfuscation]

2005-11-12 Thread Steven D'Aprano
On Fri, 11 Nov 2005 23:22:45 -0800, The Eternal Squire wrote: > Without copyright, how could one possibly earn a living writing a > novel? I don't know. How did William Shakespeare make a living from writing plays and sonnets and poems? How did Sir Walter Scott make a living from writing novels

Re: Multikey Dict?

2005-11-12 Thread Bruno Desthuilliers
Sam Pointon a écrit : >>If I could just say to Python: john and graham (and ...) are all a part >>of a "superdict" and either their id or their name can be used as keys. > > >>Can I do that somehow? > > > Sure you can. There are two obvious ways to do this - enlist the aid of > a Superdict (or

Re: Multikey Dict?

2005-11-12 Thread Bruno Desthuilliers
David Rasmussen a écrit : > If I have a collection of dicts like: > > john = {'id': 1, 'name': "John Cleese", 'year': 1939} > graham = {'id': 2, 'name': "Graham Chapman", 'year': 1941} > > I could store all of them in a list. But for easy lookup, I might store > all these in a dict instead, like

Re: Multikey Dict?

2005-11-12 Thread Mike Meyer
David Rasmussen <[EMAIL PROTECTED]> writes: > If I have a collection of dicts like: > john = {'id': 1, 'name': "John Cleese", 'year': 1939} > graham = {'id': 2, 'name': "Graham Chapman", 'year': 1941} > I could store all of them in a list. But for easy lookup, I might > store all these in a dict i

Re: elementtree.ElemenTree barfs on my Safari Cookies file

2005-11-12 Thread skip
skip> I had no trouble decoding that string as unicode. *sigh* I need some new proofreading glasses. Should be "... string as utf-8". S -- http://mail.python.org/mailman/listinfo/python-list

Re: derived / base class name conflicts

2005-11-12 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > Your suggestion ('_name' -> implementation, 'name' -> API) This is not "my" convention, it's *the* (mostly agreed upon) Python convention. Like 'self', or CONSTANT, or a whole lot of things in Python. > makes sense > as a convention between programmers that know a

elementtree.ElemenTree barfs on my Safari Cookies file

2005-11-12 Thread skip
Safari stores its cookies in XML format. Looking to try and add support for it to cookielib I started by first trying to parse it with Fredrik Lundh's elementtree package. It complained about an invalid token. Looking at the spot it indicated in the file, I found a non-ASCII, but (as far as I c

Re: Multikey Dict?

2005-11-12 Thread Sam Pointon
> If I could just say to Python: john and graham (and ...) are all a part > of a "superdict" and either their id or their name can be used as keys. > Can I do that somehow? Sure you can. There are two obvious ways to do this - enlist the aid of a Superdict (or similar) class to take care of the d

Re: Iterator addition

2005-11-12 Thread Tom Anderson
On Thu, 9 Nov 2005, it was written: > [EMAIL PROTECTED] (Alex Martelli) writes: > >>> Is there a good reason to not define iter1+iter2 to be the same as >> >> If you mean for *ALL* built-in types, such as generators, lists, files, >> dicts, etc, etc -- I'm not so sure. > > Hmm, there might also be

Re: Python obfuscation

2005-11-12 Thread Steven D'Aprano
On Sat, 12 Nov 2005 12:22:21 -0500, Mike Meyer wrote: > And if instead you lose one customer because you've denied them their > fair use rights, then your copy protection has lost you more in the > form of a cost that you overlooked than all the costs you actually > considered. In a competitive m

Re: gmpy 1.01 rc near... anybody wanna test>

2005-11-12 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: > [EMAIL PROTECTED] wrote: > > What processor are you running? > > Drat, didn't see this before I left work. I'm fairly certain it was a > Pentium 4, definitely 1.7GHz, Win2000 and Python 2.3. > > So I thought I would run the test again on my home computers, > a Pentium 4 1

ANN: askmgr

2005-11-12 Thread aum
Hi all, I've just released a gui-based management utility for Active Spam Killer (ASK) installations. ASKmgr gives a quick and convenient way to manage one's ASK installation, including whitelists, ignorelists, blacklists, message queue and message log. (Fqr those not familiar, ASK is a powerful

Multikey Dict?

2005-11-12 Thread David Rasmussen
If I have a collection of dicts like: john = {'id': 1, 'name': "John Cleese", 'year': 1939} graham = {'id': 2, 'name': "Graham Chapman", 'year': 1941} I could store all of them in a list. But for easy lookup, I might store all these in a dict instead, like people = {'1': john, '2': graham} or

Re: gmpy 1.01 rc near... anybody wanna test>

2005-11-12 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: > What processor are you running? Drat, didn't see this before I left work. I'm fairly certain it was a Pentium 4, definitely 1.7GHz, Win2000 and Python 2.3. So I thought I would run the test again on my home computers, a Pentium 4 1.5 GHz WinXP Python 2.3 and a laptop w

Re: UART parity setting as "mark" or "space" (using Pyserial???)

2005-11-12 Thread Petr Jakes
To provide feedback: I have found the way how to control serial port parity bit on the Linux (how to set the parity bit to the "mark" or "space" parity) within Python using termios module. With the help of: http://www.lothosoft.ch/thomas/libmip/markspaceparity.php

Re: XUL behavior in Python via XPCOM, Mozilla

2005-11-12 Thread Terry Hancock
On 12 Nov 2005 12:47:58 -0800 "Devan L" <[EMAIL PROTECTED]> wrote: > Nufox? > http://trac.nunatak.com.au/projects/nufox Nufox is a server-side tool to *generate* XUL from Python. Luxor http://luxor-xul.sourceforge.net/ is a XUL-interpreter written in Python, which therefore *replaces* Mozilla for

Re: XUL behavior in Python via XPCOM, Mozilla

2005-11-12 Thread Terry Hancock
On Sat, 12 Nov 2005 15:27:01 -0500 Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On Sat, 12 Nov 2005 14:25:51 -0600, Terry Hancock > <[EMAIL PROTECTED]> wrote: > >I recently saw a claim that Mozilla XUL behaviors > >(normally scripted in Javascript) can (or perhaps will) > >be scriptable in Pyt

Re: Proposal for adding symbols within Python

2005-11-12 Thread Bengt Richter
On Sat, 12 Nov 2005 16:52:12 -0500, Mike Meyer <[EMAIL PROTECTED]> wrote: [...] >Personally, I think that the LISP quote mechanism would be a better >addition as a new syntax, as it would handle needs that have caused a >number of different proposals to be raised. It would require that >symbol kno

Re: weird problem with os.chmod

2005-11-12 Thread Fredrik Lundh
Bengt Richter wrote: > >*) unless you're living in sweden, in which case "08" is quite often used > >as an insult. > > I am always curious about languages, and considering my name, I think I'd > like to know this definition ;-) Is it telephone-exchange-related? it's the area code for Stockholm. I

Re: Can't uninstall wxPython

2005-11-12 Thread Robert Hicks
Justin wrote: > I have two versions of wxPython installed on my Mac (OS X Tiger). One > is version 2.6.1.0 and the other is version 2.6.0.0. I want to keep > the newer version, but I can't seem to uninstall either one using the > uninstall_wxPython.py script. > > When I run that script, I get th

Re: Proposal for adding symbols within Python

2005-11-12 Thread Mike Meyer
Pierre Barbier de Reuille <[EMAIL PROTECTED]> writes: > Please, note that I am entirely open for every points on this proposal > (which I do not dare yet to call PEP). > > Abstract > > > This proposal suggests to add symbols into Python. You're also proposing adding a syntax to generate s

How to avoid "f.close" (no parens) bug?

2005-11-12 Thread o
plez send me   -- http://mail.python.org/mailman/listinfo/python-list

Re: Proposal for adding symbols within Python

2005-11-12 Thread Ben Finney
Pierre Barbier de Reuille <[EMAIL PROTECTED]> wrote: > This proposal suggests to add symbols into Python. I still don't think "symbol" is particularly descriptive as a name; there are too many other things already in the language that might also be called a "symbol". > Symbols are objects whose r

Re: tutorial example

2005-11-12 Thread Colin J. Williams
Max Erickson wrote: > Not in python. > > For example, what would you call the following? > > def rsum(n, m): > print n+m > return n+m > I would call it a python function with a side-effect. Colin W. > > In python a method is callable attached to an object. A function is a > callable o

Re: XUL behavior in Python via XPCOM, Mozilla

2005-11-12 Thread Devan L
Terry Hancock wrote: > I recently saw a claim that Mozilla XUL behaviors (normally > scripted in Javascript) can (or perhaps will) be scriptable > in Python. > > Also, "other languages such as Java or Python are supported > through XPCOM", said about Mozilla (from Luxor website). > > Yes, I know se

Re: XUL behavior in Python via XPCOM, Mozilla

2005-11-12 Thread Fredrik Lundh
Terry Hancock wrote: >I recently saw a claim that Mozilla XUL behaviors (normally > scripted in Javascript) can (or perhaps will) be scriptable > in Python. > > Also, "other languages such as Java or Python are supported > through XPCOM", said about Mozilla (from Luxor website). > > Yes, I know se

Re: XUL behavior in Python via XPCOM, Mozilla

2005-11-12 Thread Jean-Paul Calderone
On Sat, 12 Nov 2005 14:25:51 -0600, Terry Hancock <[EMAIL PROTECTED]> wrote: >I recently saw a claim that Mozilla XUL behaviors (normally >scripted in Javascript) can (or perhaps will) be scriptable >in Python. > >Also, "other languages such as Java or Python are supported >through XPCOM", said abo

Re: SciPy python 2.4 wintel binaries

2005-11-12 Thread Peter Maas
jelle schrieb: > I dearly miss having the power of SciPy on my python 2.4 installation. > The topic of SciPy python 2.4 wintel binaries has been discussed before > on this list, but I haven't been able to find a compiled binary. If you really need SciPy, you should install Python 2.3 (Enthought Ed

XUL behavior in Python via XPCOM, Mozilla

2005-11-12 Thread Terry Hancock
I recently saw a claim that Mozilla XUL behaviors (normally scripted in Javascript) can (or perhaps will) be scriptable in Python. Also, "other languages such as Java or Python are supported through XPCOM", said about Mozilla (from Luxor website). Yes, I know several ways to *generate* XUL from P

Problem with __str__ if baseclass is list

2005-11-12 Thread Edward C. Jones
#! /usr/bin/env python class A(list): def __init__(self, alist, n): list.__init__(self, alist) self.n = n def __str__(self): return 'AS(%s, %i)' % (list.__str__(self), self.n) def __repr__(self): return 'AR(%s, %i)' % (list.__repr__(self), self.

Re: how to present Python's OO feature in design?

2005-11-12 Thread Florian Diesch
Ben Sizer <[EMAIL PROTECTED]> wrote: > I don't know if there are any tools that convert UML to Python code, dia2code Floriaa -- Einen Troll zu füttern ist das gleiche als würde man einen Haufen Hundescheisse sehen, absichtlich reinsteigen und sich dann besch

Re: directory listing

2005-11-12 Thread [EMAIL PROTECTED]
Shi Mu: Before all you were doing was defining a function with: import os def buildList( directory='c:\TEMP' ): dirs = [ ] listing = os.listdir(directory) for x in listing: x = os.path.join(directory, x) print x if os.path.isdir(x): dirs.append(x)

Re: Tkinter and the re/sizing of columns in a grid

2005-11-12 Thread jepler
Normally, an entry widget requests horizontal space equal to the value of the width= option times the "average" character width of the font it displays. Setting it to 0 makes the entry request exactly enough width to show the string it contains. Making them sticky to the east and west sides of th

Re: weird problem with os.chmod

2005-11-12 Thread Bengt Richter
On Sat, 12 Nov 2005 12:53:17 +0100, "Fredrik Lundh" <[EMAIL PROTECTED]> wrote: [...] >int is designed for humans, not C programmers. humans tend to view >e.g. "08" as a valid decimal number (*), not a ValueError. [...] > > >*) unless you're living in sweden, in which case "08" is quite often used

Re: Hash map with multiple keys per value ?

2005-11-12 Thread Bengt Richter
On Fri, 11 Nov 2005 22:55:53 +, Chris Stiles <[EMAIL PROTECTED]> wrote: >Hi -- > >I'm working on something that includes the concept of multiple aliases for a >particular object, where a lookup for any of the aliases has to return all the >others. The hack way of doing this was to have a dict

Re: Hash map with multiple keys per value ?

2005-11-12 Thread Alex Martelli
Chris Stiles <[EMAIL PROTECTED]> wrote: > "snoe" <[EMAIL PROTECTED]> writes: > > Are you looking for this type of thing? > > > > class Test: > > value = 900 > > No, what I'm trying to do is this, assume two sets of aliases: > > a, b, c, d and e > > x, y and z > > a returns b c d and e, b r

Re: weird problem with os.chmod

2005-11-12 Thread Mardy
On Fri, 11 Nov 2005 16:49:23 -0800, James Colannino wrote: > Ok, so now I have a very interesting problem, this time related to > os.chmod. I have the following in a text file: 0600. My script reads > that number as a string and converts it to an integer for use with > chmod. However, when I

Re: Python obfuscation

2005-11-12 Thread Mike Meyer
Paul Rubin writes: > "The Eternal Squire" <[EMAIL PROTECTED]> writes: >> Without copyright, how could one possibly earn a living writing a >> novel? > This guy seems to be doing ok: http://craphound.com > His publishers are the only ones allowed to sell his novels comm

Re: newbie how do I interpret this?

2005-11-12 Thread bobueland
Thanks for the reply I didn't realise the meaning of ""built-in function". Also I thought that help( ) mirrored the info in reference manual, which it obviously does not. Thanks again for a good answer and the link. Bob -- http://mail.python.org/mailman/listinfo/python-list

Proposal for adding symbols within Python

2005-11-12 Thread Pierre Barbier de Reuille
Please, note that I am entirely open for every points on this proposal (which I do not dare yet to call PEP). Abstract This proposal suggests to add symbols into Python. Symbols are objects whose representation within the code is more important than their actual value. Two symbols needs

Re: newbie how do I interpret this?

2005-11-12 Thread Mike Meyer
[EMAIL PROTECTED] writes: > Here's a small session > import re p=re.compile('[a-z]+') m=p.match('abb1a') dir(m) > ['__copy__', '__deepcopy__', 'end', 'expand', 'group', 'groupdict', > 'groups', 'span', 'start'] help(m.groups) > Help on built-in function groups: > > groups(

Re: Python obfuscation

2005-11-12 Thread Alex Martelli
Paul Rubin wrote: > "The Eternal Squire" <[EMAIL PROTECTED]> writes: > > Without copyright, how could one possibly earn a living writing a > > novel? > > This guy seems to be doing ok: http://craphound.com > His publishers are the only ones allowed to sell his novels

Re: Python obfuscation

2005-11-12 Thread Alex Martelli
Yu-Xi Lim <[EMAIL PROTECTED]> wrote: > I hadn't seen any damage done from misusing "it's". Certainly not on par You should see my pharmacy bill for Maalox... and my liver ain't too happy about it either;-) Alex -- http://mail.python.org/mailman/listinfo/python-list

Re: Python obfuscation

2005-11-12 Thread Alex Martelli
Yu-Xi Lim <[EMAIL PROTECTED]> wrote: > Alex Martelli wrote: > > There is no effective manner of protecting your code, except running it > > only on well-secured machines you control yourself. If you distribute > > your code, in ANY form, and it's at all interesting to people with no > > interest

Re: passing values from one form to another

2005-11-12 Thread Mike Meyer
[EMAIL PROTECTED] writes: > In main.py, i am able to check for the value of the user and password > field, eg > > if form.has_key("user") and form["button"].value == "Login" and > form.has_key("password"): > # show all fields > > how can i also check for the user field in the results.py script? i

Re: convert string to the "escaped string"

2005-11-12 Thread Petr Jakes
Fredrik, thanks for your posting. I really appretiate your reply and your way how you kindly answer even stupid newbie's questions on this mailing list. I was trying: int("0xf") but I did not have idea about the optional "base" parameter for the int function. Thanks a lot. Petr -- http://mail.py

Re: newbie how do I interpret this?

2005-11-12 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > >>> help(m.groups) > Help on built-in function groups: > > groups(...) > > >>> > > My question is. How do I interpret the hiven help info > groups(...) > > alt1. Tough luck. There's no help. People are to busy to write > reference manuals. they're busy writing reference

Re: changeing users on linux

2005-11-12 Thread Mike Meyer
[EMAIL PROTECTED] writes: > the password is for loging into root The setuid call will fail unless you're already root. You can't, as some user other than root, change your userid, so the answer to the original question with the added restriction is "You can't". http://www.

Re: Python obfuscation

2005-11-12 Thread Mike Meyer
Yu-Xi Lim <[EMAIL PROTECTED]> writes: > Indeed, everything has a cost, and I was wrong in saying > "free". However, if convenient language-supported transforms are used, > the direct cost of using obfuscation would be miniscule in comparison > to just about everything else. Implementing it should b

newbie how do I interpret this?

2005-11-12 Thread bobueland
Here's a small session >>> import re >>> p=re.compile('[a-z]+') >>> m=p.match('abb1a') >>> dir(m) ['__copy__', '__deepcopy__', 'end', 'expand', 'group', 'groupdict', 'groups', 'span', 'start'] >>> help(m.groups) Help on built-in function groups: groups(...) >>> My question is. How do I interpre

ANN: pynakotheka v1.0

2005-11-12 Thread Iñigo Serna
Hello out there, I'm really pleased to announce the first public release of Pynakotheka. Pynakotheka is a simple GPL-licensed python script which generates static HTML photo albums to be added to web sites or to be burnt in CDs. It includes some templates and it's easy to create more. It depends

Re: passing values from one form to another

2005-11-12 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > hi > > i have 3 python cgi scripts created, one is a login page(login.py), > another is the main page(main.py) with a lot of user inputs and the > last one is a python cgi script results.py to process main.py > > In main.py, i am able to check for the value of the user

Re: tutorial example

2005-11-12 Thread Roel Schroeven
Ruben Charles wrote: > That is the diference between a method and a function. > A method do something and a function return something. I'd rather say it's the difference between a procedure and a function, as it is used in e.g. Pascal. Procedures in Pascal don't return anything, more or less analo

Re: weird problem with os.chmod

2005-11-12 Thread Roel Schroeven
Gary Herron wrote: > James Colannino wrote: > >> James Colannino wrote: >> >> >> >>> So then I entered the command print 0600, and saw that the actual >>> number being output was 384 (why would it output 384?!) >>> >>> >>> >> >> >> Ok, so further research revealed that 0600 is actually the oc

Tkinter and the re/sizing of columns in a grid

2005-11-12 Thread noman
I'm using grid() to lay out a column of Labels and a column of Entries in a frame. If the user changes an Entry so that it's bigger than its allotted space, i'd like to widen that column to show the entire string. I've tried .columnconfigure(1, minsize=newSize), but that doesn't change anything. I

Re: Dynamically Update Class Definitions?

2005-11-12 Thread Chris Spencer
Jean-Paul Calderone wrote: > There are lots of cases where you cannot rebind the __class__ > attribute. For a comprehensive treatment of this idea (but still not a > completely functionality implementation), take a look at >

Re: What do you use as symbols for Python ?

2005-11-12 Thread Daniel Evers
Peter Otten wrote: > > You should ditch what follows and instead add just > > def __iter__(self): > return iter(self.__keys) Mhh. I should start learning the builtins ... :) > To see the problem with your original code (an object serving as its own > iterator) try the f

Re: tutorial example

2005-11-12 Thread Colin J. Williams
Ruben Charles wrote: > That is the diference between a method and a function. > A method do something and a function return something. > This is not quite correct. The difference between a method and a function is that the method is associated with a type or class object, a function is not. A m

Re: changeing users on linux

2005-11-12 Thread jepler
On Fri, Nov 11, 2005 at 11:25:56PM -0500, Mike Meyer wrote: > You didn't say what the password was for, so I skipped asking for it. You're a real comedian. Jeff pgpxqmFz5jalu.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: convert string to the "escaped string"

2005-11-12 Thread Fredrik Lundh
Petr Jakes wrote: > I am trying to convert string to the "escaped string". > example: from "0xf" I need "\0xf" > I am able to do it like: > > a="0xf" > escaped_a=("\%s" % a ).decode("string_escape") > > But it looks a little bit complicated in this beautiful language to me I suspect that optimiz

Re: convert string to the "escaped string"

2005-11-12 Thread Petr Jakes
small mistake in my previous posting, sorry from "0xf" I need "\xf" of course and mentioned code gives me "\0xf" of course. Thanks for your postings Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

convert string to the "escaped string"

2005-11-12 Thread Petr Jakes
Hi, I am trying to convert string to the "escaped string". example: from "0xf" I need "\0xf" I am able to do it like: a="0xf" escaped_a=("\%s" % a ).decode("string_escape") But it looks a little bit complicated in this beautiful language to me Regards Petr Jakes -- http://mail.python.org

SciPy python 2.4 wintel binaries

2005-11-12 Thread jelle
Hi, I dearly miss having the power of SciPy on my python 2.4 installation. The topic of SciPy python 2.4 wintel binaries has been discussed before on this list, but I haven't been able to find a compiled binary. I'm one of the 'compiled-challenged'; anything more complex than 'python setup.py buil

Re: tutorial example

2005-11-12 Thread Ruben Charles
On 11/12/05, Max Erickson <[EMAIL PROTECTED]> wrote: > > Not in python. > > For example, what would you call the following? > > def rsum(n, m): > print n+m > return n+m > > > In python a method is callable attached to an object. A function is a > callable object constructed with a def state

Re: about array,arange

2005-11-12 Thread Robert Kern
Shi Mu wrote: > On 11/12/05, Robert Kern <[EMAIL PROTECTED]> wrote: > >>Shi Mu wrote: >> >>>i got confused by the use of array and arange. >>>arange get array and range get list, why we need the two different types? >> >>When you're asking questions about a third-party module, it's a good >>idea t

Re: tutorial example

2005-11-12 Thread Max Erickson
Not in python. For example, what would you call the following? def rsum(n, m): print n+m return n+m In python a method is callable attached to an object. A function is a callable object constructed with a def statement. max -- http://mail.python.org/mailman/listinfo/python-list

Re: about array,arange

2005-11-12 Thread Shi Mu
On 11/12/05, Robert Kern <[EMAIL PROTECTED]> wrote: > Shi Mu wrote: > > i got confused by the use of array and arange. > > arange get array and range get list, why we need the two different types? > > When you're asking questions about a third-party module, it's a good > idea to mention the module.

Re: about widget construction kit

2005-11-12 Thread Fredrik Lundh
"Shi Mu" wrote: > > > I tried again and got the follwoing message: > > > *** cannot find Tcl/Tk headers and library files > > > change the TCL_ROOT variable in the setup.py file > > > but i have already installed TCL under python23 > > > > hmm. I still think it would be easier if you used a p

Re: What do you use as symbols for Python ?

2005-11-12 Thread Chris Smith
> "Gary" == Gary Herron <[EMAIL PROTECTED]> writes: Gary> Erik Max Francis wrote: >> Pierre Barbier de Reuille wrote: > > > >>When you need some symbols in your program, what do you use in >> Python ? >>> >>> For example, an object get a state. This state is more >>> r

Re: tutorial example

2005-11-12 Thread Ruben Charles
That is the diference between a method and a function. A method do something and a function return something. Example: def psum(n, m): print (n + m) def rsum(n, m): return (n +m) Then try this... >>> psum(2, 3) >>> a = psum(2, 3) >>> a >>> a = rsum(2, 3) >>> a You see it? -- ht

Re: Python obfuscation

2005-11-12 Thread Ben Finney
Yu-Xi Lim <[EMAIL PROTECTED]> wrote: > Code obfuscation is a transformation of the program (whether at > source code level, intermediate object code level, binary executable > level, etc) to hinder (prevention seems impossible) reverse > engineering (attempts to determine the workings of the code,

Re: about widget construction kit

2005-11-12 Thread Shi Mu
On 11/12/05, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Shi Mu wrote: > > > I tried again and got the follwoing message: > > *** cannot find Tcl/Tk headers and library files > > change the TCL_ROOT variable in the setup.py file > > but i have already installed TCL under python23 > > hmm. I sti

Re: weird problem with os.chmod

2005-11-12 Thread Fredrik Lundh
Mike Meyer wrote: > Strange that int doesn't recognize the leading 0. But you can use the > second argument to int: > > >>> int("0600", 16) > 1536 > >>> int is designed for humans, not C programmers. humans tend to view e.g. "08" as a valid decimal number (*), not a ValueError. to get programme

Re: about array,arange

2005-11-12 Thread Shi Mu
On 11/12/05, Robert Kern <[EMAIL PROTECTED]> wrote: > Shi Mu wrote: > > i got confused by the use of array and arange. > > arange get array and range get list, why we need the two different types? > > When you're asking questions about a third-party module, it's a good > idea to mention the module.

Re: about array,arange

2005-11-12 Thread Robert Kern
Shi Mu wrote: > i got confused by the use of array and arange. > arange get array and range get list, why we need the two different types? When you're asking questions about a third-party module, it's a good idea to mention the module. In this case you're asking about scipy_core (hopefully) or els

Re: about try statement

2005-11-12 Thread Bengt Richter
On Sat, 12 Nov 2005 10:20:08 +0100, Sybren Stuvel <[EMAIL PROTECTED]> wrote: >Shi Mu enlightened us with: >> very hard for me to understand the difference between try...except >> and try...finally > >Within a 'try' block, if an exception is called and a matching >'except' block is found, that bloc

Re: Recommendation please: forming an XML toolkit

2005-11-12 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > I guess you're right... I think its just cold feet from the possibility > of getting involved and discovering specific gotchas later. > > What I'm hearing you tell me is *go and play it*. uche posted an interesting taxonomy here: http://article.gmane.org/gmane.comp

Re: JAPH

2005-11-12 Thread Szabolcs Nagy
charset, modulo, japh = " .JPacehknorstuy", 17, "" s = 69859911049503515105680510599913390885187193231927247909305172858127641629 for n in xrange(2,): if s%n==0: japh += charset[(n - 1) % modulo] s /= n if s==1: break print japh -- http://mail.python.org/mailma

911, need drvmcdb.sys desperately

2005-11-12 Thread James Hu
Hi, Sorry to post this message, but I need emergency help, please help me out! I couldn't get drvmcdb.sys from internet, which I accidentally deleted last night, my laptop (XP) couldn't reboot anymore, but I need to keep my data. If anybody can send me this file: which is located in c:\windo

Re: about widget construction kit

2005-11-12 Thread Fredrik Lundh
Shi Mu wrote: > I tried again and got the follwoing message: > *** cannot find Tcl/Tk headers and library files > change the TCL_ROOT variable in the setup.py file > but i have already installed TCL under python23 hmm. I still think it would be easier if you used a prebuilt version, like eve

Re: help make it faster please

2005-11-12 Thread Bengt Richter
On Sat, 12 Nov 2005 10:46:53 +0100, Sybren Stuvel <[EMAIL PROTECTED]> wrote: >Bengt Richter enlightened us with: >> I suspect it's not possible to get '' in the list from >> somestring.split() > >Time to adjust your suspicions: > ';abc;'.split(';') >['', 'abc', ''] I know about that one ;-) I

Re: Python obfuscation

2005-11-12 Thread Paul Rubin
"The Eternal Squire" <[EMAIL PROTECTED]> writes: > Without copyright, how could one possibly earn a living writing a > novel? This guy seems to be doing ok: http://craphound.com His publishers are the only ones allowed to sell his novels commercially, but you can download them all and print the

  1   2   >