IO
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:
-
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
>> directo
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 hide
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
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 getipaddr(hostname='de
I found that gDeskCal is also written in Python.
So if I have a theme used by gDesklets,
how can I make the whole thing standalone
so that it can be similar to the case of gDeskCal??
--
http://mail.python.org/mailman/listinfo/python-list
Bengt Richter wrote:
> On Wed, 13 Jul 2005 11:00:14 +1000, Simon Burton <[EMAIL PROTECTED]> wrote:
>
>
>>Hi,
>>
>>I'm after a no-op command, so that i can redirect
>>logging commands in performance critical code.
>>
>>Something like this:
>>
>>def log(*args): print args
>>def null_log(*args): pas
Probably a stupid question, but...
I was attempting to install the Tkinter 3000 WCK. It blew up trying to
build _tk3draw. The first error is a 'No such file or directory' for
tk.h. I can import and use Tkinter just fine, so I'm not sure what is
what here.
First few lines of install attempt
Christopher Subich wrote:
> none wrote:
>
>> Probably a stupid question, but...
>>
>> I was attempting to install the Tkinter 3000 WCK. It blew up trying
>> to build _tk3draw. The first error is a 'No such file or directory'
>> for tk.h. I ca
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
Hi,
Any one know of some code to read cobol data files
thanks
timb
--
http://mail.python.org/mailman/listinfo/python-list
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 neede
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
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.
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.
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 &
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. Mos
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
JW wrote:
> Every time, or just this run?
>
every time
--
http://mail.python.org/mailman/listinfo/python-list
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 pr
>
> 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,
> the virtual data modifications under "Displ
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.
--
http://mail.python.org/mailman/listinfo/python-lis
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/
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 c
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 c
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 c
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
er_1)
sizer_1.Fit(self)
sizer_1.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)
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 a
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
[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 mod
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 ...
E
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 ju
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 wor
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
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 l
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
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
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
ect(database = 'test')
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 Sy
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
--
http://mail.python.org/mailman/
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
42 matches
Mail list logo