Re: Symlinks already present

2020-10-28 Thread none
In article , Cameron Simpson wrote: > >Yeah, makes me ill. That's because these days "pwd" is usually a shell >builtin with funny semantics and a cache/sanity=check against $PWD >(which gets computed as you cd around, typically). And if has a -P >option and friends explicitly because of this

Re: Symlinks already present

2020-10-28 Thread none
In article , Grant Edwards wrote: >On 2020-09-01, Richard Damon wrote: > >> Remember, we are talking about a hypothetical OS that handles hardlinks >> to directories, and defines that .. will point to the parent used to >> come to it, NOT just having current *NIX allowing hardlinks to >>

[issue25451] PhotoImage transparency methods

2015-10-21 Thread None Becoming
New submission from None Becoming: The transparency methods of tkinter.PhotoImage seem to be missing. Presumably, they would go something like: def transparency_get(self, x, y): """Returns a boolean indicating if the pixel at (x,y) is transparent. """

how update MultipartPostHandler pypi

2011-06-04 Thread none
class Callable: def __init__(self, anycallable): @@ -86,22 +90,23 @@ if boundary is None: boundary = mimetools.choose_boundary() if buffer is None: -buffer = '' +buffer = StringIO() for(key, value) in vars: -buffer

Re: str(int_var) formatted

2010-10-29 Thread none
On 29/10/10 16:59, Tracubik wrote: Hi all, i've to convert integer x to string, but if x 10, the string have to be '0x' instead of simple 'x' for example: x = 9 str(x) -- '09' x = 32 str(x) -- '32' x represent hour/minute/second. I can easily add '0' with a if then block, but is there a

python module for data comparison of 2 MySQL servers

2009-09-01 Thread none
I have 2 MySQL servers in 2 different data centers. Between them, there is data replication setup. Is there a python tool so I can do data comparison for daily records? Basically, just access both servers and do a diff in memory and print out records. Thanks --

How to Teach Python Variables

2007-11-25 Thread none
Hello, IIRC, I once saw an explanation how Python doesn't have variables in the sense that, say, C does, and instead has bindings from names to objects. Does anyone have a link? Thanks, Ami -- http://mail.python.org/mailman/listinfo/python-list

Re: How to Teach Python Variables

2007-11-25 Thread none
Aurélien Campéas wrote: none a écrit : Hello, IIRC, I once saw an explanation how Python doesn't have variables in the sense that, say, C does, and instead has bindings from names to objects. Does anyone have a link? Thanks, Ami That's something I've often heard

Re: How to Teach Python Variables

2007-11-25 Thread none
Aahz wrote: In article [EMAIL PROTECTED], none atavory\@(none) wrote: IIRC, I once saw an explanation how Python doesn't have variables in the sense that, say, C does, and instead has bindings from names to objects. Does anyone have a link? http://starship.python.net/crew/mwh/hacks

Re: How to Teach Python Variables

2007-11-25 Thread none
Ben Finney wrote: none atavory\@(none) writes: IIRC, I once saw an explanation how Python doesn't have variables in the sense that, say, C does, and instead has bindings from names to objects. Does anyone have a link? In addition to the good answers you've had already, I highly recommend

Python and Combinatorics

2007-10-24 Thread none
Hello, Is there some package to calculate combinatorical stuff like (n over k), i.e., n!/(k!(n - k!) ? I know it can be written in about 3 lines of code, but still... Thanks, Ami -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and Combinatorics

2007-10-24 Thread none
[EMAIL PROTECTED] wrote: On Oct 24, 5:20 pm, none atavory\@(none) wrote: Hello, Is there some package to calculate combinatorical stuff like (n over k), i.e., n!/(k!(n - k!) ? Sure, the gmpy module. Excellent, many thanks! -- http://mail.python.org/mailman/listinfo

Re: problem with wxPanel derivation class ~ thanks

2007-10-12 Thread none
none wrote: wxGlade created a simple Frame with a panel a sizer and 3 wxControls , saticText, TextCtrl, and a Button. The resulting code works fine. Now the problem. I wish to make a separate class derrived from wxPanel that has the sized and controls as above. It jusst won't work

problem with wxPanel derivation class

2007-10-11 Thread none
.SetSizeHints(self) self.Layout() # end wxGlade # end of class MyFrameOne ## modified from BoaApp class App(wx.App): def OnInit(self): wx.InitAllImageHandlers() self.main = MyFrameOne(None) self.main.Show

Re: HTMLParser.HTMLParseError: EOF in middle of construct

2007-06-19 Thread none
Gabriel Genellina wrote: En Mon, 18 Jun 2007 16:38:18 -0300, Sergio Monteiro Basto [EMAIL PROTECTED] escribió: Can someone explain me, what is wrong with this site ? python linkExtractor3.py http://www.noticiasdeaveiro.pt test HTMLParser.HTMLParseError: EOF in middle of construct, at

Re: HTMLParser.HTMLParseError: EOF in middle of construct

2007-06-19 Thread none
Gabriel Genellina wrote: En Mon, 18 Jun 2007 16:38:18 -0300, Sergio Monteiro Basto [EMAIL PROTECTED] escribió: Can someone explain me, what is wrong with this site ? python linkExtractor3.py http://www.noticiasdeaveiro.pt test HTMLParser.HTMLParseError: EOF in middle of construct, at

Re: HTMLParser.HTMLParseError: EOF in middle of construct

2007-06-19 Thread none
Gabriel Genellina wrote: En Mon, 18 Jun 2007 16:38:18 -0300, Sergio Monteiro Basto [EMAIL PROTECTED] escribió: Can someone explain me, what is wrong with this site ? python linkExtractor3.py http://www.noticiasdeaveiro.pt test HTMLParser.HTMLParseError: EOF in middle of construct, at

Bitpacked Data

2007-03-11 Thread none
i need to interface python with a bitpacked data file, the structure recorded in the file is the following: struct { var_1 4bit var_2 6bit var_3 2bit var_3 4bit } how can read the struct and convert data into dictionary Thnx -- http://mail.python.org/mailman/listinfo/python-list

Re: deepcopy alternative?

2007-01-30 Thread none
Szabolcs Nagy wrote: I believe the only thing stopping me from doing a deepcopy is the function references, but I'm not sure. If so is there any way to transform a string into a function reference(w/o eval or exec)? what's your python version? for me deepcopy(lambda:1) does not work in

deepcopy alternative?

2007-01-29 Thread none
I have a very complex data structure which is basically a class object containing (sometimes many) other class objects, function references, ints, floats, etc. The man for the copy module states pretty clearly that it will not copy methods or functions. I've looked around for a while (prob

help with recursion on GP project

2007-01-14 Thread none
I'm trying to create a recursive function to evaluate the expressions within a list. The function uses eval() to evaluate the list. Like a lisp interpreter but very limited. What I'm looking for is a function to recursively traverse the list and provide answers in place of lists, so that ...

Re: Assignment in a while?

2006-04-02 Thread none
So it seems that I stumbled on the idiomatic way of doing this then. Well, as they say, When in Rome... :). Thanks for pointing out the FAQ. I'll be reading up on it. Cheers, Ben Paul Boddie wrote: none/Ben wrote: Assignment within a while loop seems like a pretty standard thing, so I'm

Assignment in a while?

2006-04-02 Thread none
') sth = dbh.cursor() sth.execute(SELECT * FROM capitals) #while 1: #results = sth.fetchone() #if results == None: #break #print results while results = sth.fetchone(): print results If I try to run the above code, I get a SyntaxError indicating that I can't do

Re: looking for help about python-sane

2006-03-01 Thread none
JW wrote: Every time, or just this run? every time -- http://mail.python.org/mailman/listinfo/python-list

Re: Is Python a Zen language?

2006-02-27 Thread none
Cameron Laird wrote: In article [EMAIL PROTECTED], Kay Schluehr [EMAIL PROTECTED] wrote: . . . Lucid in the mid 80s that gone down a few years later. As it turned out that time Lisp was not capable to survive in what we call

Problem with Property

2006-02-25 Thread none
I'm trying to implement a simple repeateable property mechansism so I don't have to write accessors for every single instance variable I have. classMyObject: def __init__ (self): self.initialize() def initialize(self): self._value=None def

Re: Problem with Property

2006-02-25 Thread none
André Malo wrote: * none wrote: classMyObject: [...] As you can see, the _getProperty() method gets called properly when I do 'o.value' but 'o.value = 123' does not seem to use the property stucture. I can't figure out why 'o.value=123' does not call _setProperty() Any ideas

Re: Problem with Property

2006-02-25 Thread none
André Malo wrote: * none wrote: classMyObject: [...] As you can see, the _getProperty() method gets called properly when I do 'o.value' but 'o.value = 123' does not seem to use the property stucture. I can't figure out why 'o.value=123' does not call _setProperty() Any ideas

Re: Problem with Property

2006-02-25 Thread none
Steve Holden wrote: none @bag.python.org wrote: It seems particularly odd to want to put getters and setters behind property access. What does the extra layer buy you? The purpose is that there is more to the accessors then I posted. The setters do some 'mark dirty' bookeeping whenever

Re: Is Python a Zen language?

2006-02-25 Thread none
John Coleman wrote: Bryan Olson wrote: John Coleman wrote: I have a rough classification of languages into 2 classes: Zen languages and tool languages. A tool language is a language that is, well, a *tool* for programming a computer. C is the prototypical tool language. Most languages in

Code to read Cobol data files

2005-09-21 Thread none
Hi, Any one know of some code to read cobol data files thanks timb -- http://mail.python.org/mailman/listinfo/python-list

Newer than a Newbe

2005-08-01 Thread None
Hello, I am just starting to look into python.I have been prog with php for several years.My question is: Can/Is Python used as a web scripting language , and if so do many hosts support it? Thanks Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Faster GUI text control

2005-05-15 Thread none
Fredrik Lundh wrote: none @bag.python.org wrote: no, it would mean writing some python code. if all you need is a scrolling text list, you can simply use the code on this page: http://effbot.org/zone/wck-4.htm (see A scrollable list view, with scrollbar support and, optionally

Re: Faster GUI text control

2005-05-14 Thread none
That's a good point about the amount of text available at once. As long as I could swap the visible section fast enough that might be a good solution. This will run mostly on Windows, but I'd like for it to be equally usable on Linux. --

Faster GUI text control

2005-05-13 Thread none
Hi, I wrote a program for work that processed and formatted some collected text data in a Tkinter based GUI display. I've found that as my data files get longer (a few thousand lines), there seems to be a real lag when it comes to clearing or updating the Text control, enough so that the

Re: Postgres COPY Command with python 2.3 pg

2005-02-15 Thread @(none)
Michael Lang wrote: using psql it works fine, but i dont know how to get it working in python. Ive already made the calls but the changes never apper, and no error. Which Postgres module are you using? I had the exct same problem when I first started using pyPgSQL, until I figured out that I

get the IP address of a host

2005-01-05 Thread none
I want to determine the outside (non local, a.k.a. 127.0.0.x) ip addresses of my host. It seems that the socket module provides me with some nifty tools for that but I cannot get it to work correctly it seems. Can someone enlightened show a light on this: import socket def

Re: Continuations Based Web Framework - Seaside.

2005-01-02 Thread @(none)
Mike Thompson wrote: 'Seaside' is a Smalltalk framework for what might be called Modal Web Development or Synchronous Web Programming, or even Continuation Based Web Apps. Continuation Based Frameworks seem to be getting quite some attention lately. For example in the Lisp world. Check out Bill