Re: Pystone benchmark: Win vs. Linux (again)

2005-01-29 Thread Paul Rubin
Franco Fiorese <[EMAIL PROTECTED]> writes: > * Windows XP Pro: 16566.7 pystones/second > * Linux (kernel 2.6.9 NPTL): 12346.2 pystones/second > > I have repeated the test, on Linux, also with other distributions and > kernel but a relevant difference still exists with Windows offering a > bet

Re: Who should security issues be reported to?

2005-01-29 Thread Nick Coghlan
Paul Rubin wrote: More significantly, any security problem is likely to be with a specific function or object that has been implemented in C. False; the Cookie module example we talked about was caused by an unforeseen interaction between pure Python modules (Cookie and pickle). Fair cop on the C

Re: boa constructor & mysql

2005-01-29 Thread F. GEIGER
Look at the wx demos. Another idea: Use a virtual list control. In the OnGetItemText() you could do the appropriate SQL query. Workedpretty well for me. HTH Franz GEIGER "Michele" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > I've search a lot to found how visualize a mysql

Re: what's OOP's jargons and complexities?

2005-01-29 Thread Keith Thompson
jacob navia <[EMAIL PROTECTED]> writes: > Good post. > > First article that demistifies this OO centered approach > in quite a long time. I have no idea whether it was "good" or not, but it was blatantly off-topic in at least comp.lang.c, and probably all the other newsgroups to which it was cross

Re: limited python virtual machine

2005-01-29 Thread Alex Martelli
Nick Coghlan <[EMAIL PROTECTED]> wrote: > Alex Martelli wrote: > > Steven Bethard <[EMAIL PROTECTED]> wrote: > >... > > > >>If I could see how to go from 'object' (or 'int', 'str', 'file', etc.) > >>to 'eval' or '__import__', that would help out a lot... > > > object.__subclasses__()

Re: Pystone benchmark: Win vs. Linux (again)

2005-01-29 Thread Alex Martelli
Paul Rubin wrote: > Franco Fiorese <[EMAIL PROTECTED]> writes: > > * Windows XP Pro: 16566.7 pystones/second > > * Linux (kernel 2.6.9 NPTL): 12346.2 pystones/second > > > > I have repeated the test, on Linux, also with other distributions and > > kernel but a rele

Coding style article with interesting section on white space

2005-01-29 Thread Nick Coghlan
Thought some folks here might find this one interesting. No great revelations, just a fairly sensible piece on writing readable code :) The whole article: http://www.acmqueue.com/modules.php?name=Content&pa=showpage&pid=271&page=1 The section specifically on white space: http://www.acmqueue.com/m

Re: Dynamic class methods misunderstanding

2005-01-29 Thread Alex Martelli
Bill Mill <[EMAIL PROTECTED]> wrote: ... > > class Test: > > def __init__(self, method): > > self.m = new.instancemethod(method, self, Test) > > Beautiful! thank you very much. Looking into the "new" module in > python 2.4, that's equivalent to: > > self.m = type(self.__init__)(met

Re: Installing Numeric with ATLAS and LAPACK

2005-01-29 Thread Fernando Perez
drife wrote: > Could you clarify this please? > > Let's say that I want to make a call to the LAPACK > routine sspevd, and pass it a matrix, and get the result. How do I > accomplish this? I just had a quick look, and it seems that sspevd is NOT one of the already wrapped LAPACK functions. Try

Re: Who should security issues be reported to?

2005-01-29 Thread Paul Rubin
Nick Coghlan <[EMAIL PROTECTED]> writes: > Fair cop on the C thing, but that example otherwise illustrates my > point perfectly. I'm not sure what point you mean. > Unpickling untrusted data is just as dangerous as evaluating or > executing untrusted data. > > This is *still* dangerous, because

Re: Pystone benchmark: Win vs. Linux (again)

2005-01-29 Thread Paul Rubin
[EMAIL PROTECTED] (Alex Martelli) writes: > ...or (just as hypothetically) purchasing some commercial compiler might > help, under the assumption that the optimization and code generation of > the compiler are the issues here. I have nothing but hearsay to go on, > but IBM's compiler for PPC chips

Re: What's so funny? WAS Re: rotor replacement

2005-01-29 Thread "Martin v. Löwis"
Paul Rubin wrote: Oops, sorry, it's in the os module: http://docs.python.org/lib/os-miscfunc.html The difference is simply a matter of the packaging. No, it's not. It also is a matter of code size, and impact. Small additions can be reviewed and studied more easily, and need to be tested on less

Re: what's OOP's jargons and complexities?

2005-01-29 Thread CBFalconer
jacob navia wrote: > > Good post. > > First article that demistifies this OO centered approach > in quite a long time. > > This approach has its strength, but also has it weakness, > it is not the solution for every problem appearing in > data processing. Xah Lee is a known troll, who likes to

Re: limited python virtual machine

2005-01-29 Thread Aahz
In article <[EMAIL PROTECTED]>, Alex Martelli <[EMAIL PROTECTED]> wrote: >Steven Bethard <[EMAIL PROTECTED]> wrote: >> >> If I could see how to go from 'object' (or 'int', 'str', 'file', etc.) >> to 'eval' or '__import__', that would help out a lot... > object.__subclasses__() >[, , , , >, , ,

Re: Textual markup languages (was Re: What YAML engine do you use?)

2005-01-29 Thread Aahz
In article <[EMAIL PROTECTED]>, Alan Kennedy <[EMAIL PROTECTED]> wrote: > >I think that is where a lot of markup languages fall down, in that they >end trying to develop a sophisticated metadata model that can capture >that kind of information, and re-engineering the markup to support it. >This

Marketing reST (was Re: What YAML engine do you use?)

2005-01-29 Thread Aahz
In article <[EMAIL PROTECTED]>, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > >I've read many specs; YAML (both the spec and the format) is easily >among the worst ten-or-so specs I've ever seen. > >ReST and YAML share the same deep flaw: both formats are marketed as >simple, readable formats, and at

Re: cookielib and urllib2: thread-safe?

2005-01-29 Thread John J. Lee
Alex Hunsley <[EMAIL PROTECTED]> writes: > I'm writing a test script in python for pulling web pages from a web > server using urllib2 and cookielib. Since the main thing I am testing > is what happens when concurrent requests are made to the web server, I > need to make several requests concurren

Re: What's so funny? WAS Re: rotor replacement

2005-01-29 Thread Paul Rubin
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: > Indeed, if it was a single new function to an existing module, I would > not require that this be delivered to users first. It is entire new > libraries that I worry about. Why is it different if a single new function is added to an existing module,

Re: what's OOP's jargons and complexities?

2005-01-29 Thread PA
On Jan 29, 2005, at 04:28, [EMAIL PROTECTED] wrote: Plus, a man which such cinematographic tastes [1] cannot be entirely bad :P http://xahlee.org/PageTwo_dir/Personal_dir/favorite_movies.html The site proves he is evil. Grep "Titus" if you have a strong stomach. I'm sure you did not get that far. I

Re: An mysql-python tutorial?

2005-01-29 Thread EuGeNe
Dfenestr8 wrote: Hi. Been told by the admin of my (free!) server that he'd rather I should learn to use mysql if I want to continue writing cgi scripts there. Not even sure exactly what mysql is. Is there a simple tutorial anywhere on the web about using python + mysql? http://www.devshed.com/c/a

future of computing languages

2005-01-29 Thread jelle
Quite suprised while reading the Amazin c2.com Wiki: http://c2.com/cgi/wiki?FutureOfProgrammingLanguages Take a look, and feel incredible good about yourself & your decision to opt for python. Did work for me. Cheers, Jelle. -- http://mail.python.org/mailman/listinfo/python-list

Re: Maximum Number of Class Attributes

2005-01-29 Thread Bob Parnes
On Wed, 26 Jan 2005 10:03:47 +0100, Sylvain Thenault <[EMAIL PROTECTED]> wrote: > On Wed, 26 Jan 2005 02:03:12 +, Bob Parnes wrote: > >> In its default configuration, my version of pylint (0.5.0) sets the >> maximum number of class attributes at 7. This seems low to me, but I can >> see how a

Re: Help with web dashboard

2005-01-29 Thread Fuzzyman
Chris wrote: > In article <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] says... > > Ifd you want to use standard CGI I've written a CGI user > > authentication/management module called logintools. > > > > Would this be preferred (or easier) than using an application server > (ie. Zope or Webware)? > >

Re: what's OOP's jargons and complexities?

2005-01-29 Thread PA
On Jan 29, 2005, at 08:34, jacob navia wrote: First article that demistifies this OO centered approach in quite a long time. http://www.google.com/search?q=OOP+criticism&ie=UTF-8&oe=UTF-8 http://www.google.com/search?hl=en&lr=&q=OOP+debunked&btnG=Search Cheers -- PA, Onnay Equitursay http://alt.tex

Re: What's so funny? WAS Re: rotor replacement

2005-01-29 Thread Skip Montanaro
>> http://www.python.org/pypi >> THIS IS ALL PYTHON. Paul> No. Those are programs people have written in Python or as Python Paul> extensions. What's your point? That I have to download and perhaps install them to use them? In that case, how are these two scenarios different:

Re: Who should security issues be reported to?

2005-01-29 Thread Skip Montanaro
Nick> Upgrading your Python interpreter (even to a new maintenance Nick> branch release) in a production environment is usually a fairly Nick> involved exercise requiring a significant amount of testing, and Nick> the fact of the matter is, you're unlikely to do so unless there

Re: What's so funny? WAS Re: rotor replacement

2005-01-29 Thread Skip Montanaro
>> What matters is the code complexity, not whether something is in a >> separate module or not. Martin> A module *is* typically more complex than a single function. And one that deals with cryptography is likely to be even more complex. Skip -- http://mail.python.org/mailman/list

The next Xah-lee post contest

2005-01-29 Thread Steve
Hi All, For sometime now, I have just been a passive lurker on this list. Of late I saw an increase in the number of posts by Xah Lee, and I have to admit, what he lacks in understanding of the various programming languages he talks about, he makes up for in creativity. So, I was wondering, h

Re: Coding style article with interesting section on white space

2005-01-29 Thread Rakesh Kumar
Thanx Nick -- http://mail.python.org/mailman/listinfo/python-list

Re: The next Xah-lee post contest

2005-01-29 Thread PA
On Jan 29, 2005, at 14:35, Steve wrote: Write up the next Xah Lee post ! The requirement are: a) The post should talk about a single language, although the example code needn't adhere to that restriction. b) It should explain the style, structure and design of some code snippet/program, though not

Re: The next Xah-lee post contest

2005-01-29 Thread PA
On Jan 29, 2005, at 14:35, Steve wrote: Here's my contribution (tho' I'm not really in my most creative frame of mind): Not being very creative myself, here is a contribution "by proxy": "Unlike Java programmers, who are hip on the outside, dreary conformists on the inside, Smalltalk programmers

Re: The next Xah-lee post contest

2005-01-29 Thread rbt
Steve wrote: Hi All, For sometime now, I have just been a passive lurker on this list. Of late I saw an increase in the number of posts by Xah Lee, and I have to admit, what he lacks in understanding of the various programming languages he talks about, he makes up for in creativity. So, I was

Re: limited python virtual machine

2005-01-29 Thread Alex Martelli
Aahz <[EMAIL PROTECTED]> wrote: ... > object.__subclasses__() ... > One thing my company has done is written a ``safe_eval()`` that uses a > regex to disable double-underscore access. will the regex catch getattr(object, 'subclasses'.join(['_'*2]*2)...?-) Alex -- http://mail.python.o

Re: The next Xah-lee post contest

2005-01-29 Thread Stephen Thorne
On Sat, 29 Jan 2005 19:05:55 +0530, Steve <[EMAIL PROTECTED]> wrote: > Hi All, > For sometime now, I have just been a passive lurker on this > list. Of late I saw an increase in the number of posts by Xah Lee, and > I have to admit, what he lacks in understanding of the various > programming

Re: The next Xah-lee post contest

2005-01-29 Thread PA
On Jan 29, 2005, at 15:32, rbt wrote: Unix donkey! You not elegant. You have poor design. Sloppy Perl monkey! You be lazy! You code very very bad. Xah know all! Follow The True Path, follow The Xah Way To Enlightenment: "The Unix Pestilence" http://www.xahlee.org/UnixResource_dir/freebooks.html Che

Re: Textual markup languages (was Re: What YAML engine do you use?)

2005-01-29 Thread Tim Parkin
On Sun, 2005-01-23 at 13:41 +0100, Fredrik Lundh wrote: > Alan Kennedy wrote: > > If I can't find such a markup language, then I might instead end up using a > > WYSIWYG editing > > component that gives the user a GUI and generates (x)html. > > > > htmlArea: http://www.htmlarea.com/ > > Editlet:

Re: limited python virtual machine

2005-01-29 Thread Skip Montanaro
>> One thing my company has done is written a ``safe_eval()`` that uses >> a regex to disable double-underscore access. Alex> will the regex catch getattr(object, Alex> 'subclasses'.join(['_'*2]*2)...?-) Now he has two problems. ;-) Skip -- http://mail.python.org/mailman/listin

Re: Coding style article with interesting section on white space

2005-01-29 Thread beliavsky
Nick Coghlan wrote: > Thought some folks here might find this one interesting. No great revelations, > just a fairly sensible piece on writing readable code :) > > The whole article: > http://www.acmqueue.com/modules.php?name=Content&pa=showpage&pid=271&page=1 > > The section specifically on white

Re: limited python virtual machine

2005-01-29 Thread Stephen Thorne
On Sat, 29 Jan 2005 08:53:45 -0600, Skip Montanaro <[EMAIL PROTECTED]> wrote: > > >> One thing my company has done is written a ``safe_eval()`` that uses > >> a regex to disable double-underscore access. > > Alex> will the regex catch getattr(object, > Alex> 'subclasses'.join(['_'

Re: What's so funny? WAS Re: rotor replacement

2005-01-29 Thread Paul Rubin
Skip Montanaro <[EMAIL PROTECTED]> writes: > What's your point? That I have to download and perhaps install them to use > them? In that case, how are these two scenarios different: > > * I have to download and build the MySQLdb package to talk to MySQL > servers from Python code > >

Re: What's so funny? WAS Re: rotor replacement

2005-01-29 Thread Paul Rubin
Skip Montanaro <[EMAIL PROTECTED]> writes: > And one that deals with cryptography is likely to be even more complex. No. The AES module would have about the same complexity as the SHA module. -- http://mail.python.org/mailman/listinfo/python-list

Re: What's so funny? WAS Re: rotor replacement

2005-01-29 Thread Paul Rubin
Paul Rubin writes: > actually: mxCrypto is the most capable of these packages and might be > the one with the most users, but it's completely unsuitable for the > core because of its size). Oops, I should say, mxCrypto itself isn't that large; the issue is that it needs

Re: An mysql-python tutorial?

2005-01-29 Thread Andy Dustman
It's a pretty good tutorial, thought I would recommend you forget about the fetchone() example. The example below demonstrates three additional features that will make your life easier: MySQL option files, tuple unpacking, and cursors as iterators (fourth feature: the default host is localhost; thi

Line graphics on Linux console

2005-01-29 Thread frank
Hi all I don't think this is strictly a Python problem, but as it manifests itself in one of my Python programs, I am hoping that somebody in this group can help me. The following is a message I sent to co.os.linux.setup - "My question concerns line graphics on a text-based console. ­My actual p

Re: limited python virtual machine

2005-01-29 Thread Alex Martelli
Stephen Thorne <[EMAIL PROTECTED]> wrote: > On Sat, 29 Jan 2005 08:53:45 -0600, Skip Montanaro <[EMAIL PROTECTED]> wrote: > > > > >> One thing my company has done is written a ``safe_eval()`` that uses > > >> a regex to disable double-underscore access. > > > > Alex> will the regex c

Re: limited python virtual machine

2005-01-29 Thread Aahz
In article <[EMAIL PROTECTED]>, Alex Martelli <[EMAIL PROTECTED]> wrote: >Aahz <[EMAIL PROTECTED]> wrote: >> Alex Martelli deleted his own attribution: >>> >>> >>> object.__subclasses__() >> >> One thing my company has done is written a ``safe_eval()`` that uses a >> regex to disable double-undersc

Re: Who should security issues be reported to?

2005-01-29 Thread Aahz
In article <[EMAIL PROTECTED]>, Skip Montanaro <[EMAIL PROTECTED]> wrote: > >Nick> Upgrading your Python interpreter (even to a new maintenance >Nick> branch release) in a production environment is usually a fairly >Nick> involved exercise requiring a significant amount of testing, and

Re: future of computing languages

2005-01-29 Thread Peter Hansen
jelle wrote: Quite suprised while reading the Amazin c2.com Wiki: http://c2.com/cgi/wiki?FutureOfProgrammingLanguages Take a look, and feel incredible good about yourself & your decision to opt for python. Did work for me. Cheers, Jelle. Sorry, but it's an annoyingly long page filled with what appe

Re: Coding style article with interesting section on white space

2005-01-29 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote: . . . >One ought to do a little research before publishing an article. >Apparently, many authors and editors are too lazy to do so. > ... and/or ignorant or unculture

ANN: eric3 3.6.1 released

2005-01-29 Thread Detlev Offenbach
Hi, this is to let all of you know, that eric3 3.6.1 has just been released. It fixes a few nasty bugs, which were reported since the last release. It is available via http://www.die-offenbachs.de/detlev/eric3.html Eric3 is an Integrated Development Environment for Python. For details please se

Re: What's so funny? WAS Re: rotor replacement

2005-01-29 Thread "Martin v. Löwis"
Paul Rubin wrote: An AES or DES addition to an existing module that implements just one call: ECB(key, data, direction) would be a huge improvement over what we have now. Apparently, people disagree on what precisely the API should be. E.g. cryptkit has obj = aes(key) obj.encrypt(data) I think I

Re: What's so funny? WAS Re: rotor replacement

2005-01-29 Thread "Martin v. Löwis"
Paul Rubin wrote: (And actually: mxCrypto is the most capable of these packages and might be the one with the most users, but it's completely unsuitable for the core because of its size). mxCrypto is primarily unsuitable for the core because Marc-Andre Lemburg will never ever contribute it. He is v

Description Field in WinXP Services

2005-01-29 Thread rbt
How does one associate a "Description" with a Windows service written in Python? I've just started experimenting with Python services. Here's my code... copied straight from Mr. Hammond's "Python Programming on Win32": import win32serviceutil import win32service import win32event class test_

Re: An mysql-python tutorial?

2005-01-29 Thread Dfenestr8
On Sat, 29 Jan 2005 06:41:37 +, Kartic wrote: [snip] > And here is one more site, good stuff here too:- > http://www.kitebird.com/articles/pydbapi.html > Hi. I followed the instructions there, tried out the test script they recommend. Can you tell me why this command, in the python interp

Independence of programs!

2005-01-29 Thread blade8472
Hey all, hope all is fine, I have a question; I am new in python programming, I write the programs to a text doc then I run them with the interpreter, so I wanna know whether I can save the programs as exe so that they can be run independently on other PCs without the python interpreter. hope

tk global bindings

2005-01-29 Thread Gabriel B.
I'm starting to write a POS application UI's module. There's no mouse, just a bunch of global shortcuts. the problem is that TK doesn't have global shortcuts! Is there a work-around or i will have to attach 80 or so bindings for every input element? Thanks, Gabriel -- http://mail.python.org/mai

Re: Independence of programs!

2005-01-29 Thread David Douard
blade8472 wrote: > > Hey all, hope all is fine, I have a question; I am new in python > programming, I write the programs to a text doc then I run them with > the interpreter, so I wanna know whether I can save the programs as > exe so that they can be run independently on other PCs without the >

Redirecting stdout/err under win32 platform

2005-01-29 Thread David Douard
Hi everybody, let me explain by problem: I am working on an application which consists in a C++ dll (numeric computations) and a Python IHM (Python/Tk), which must run under Linux and win32. My problem is the C++ lib does write stuffs on its stdout, and I would like to print those messages in a T

Re: [perl-python] 20050127 traverse a dir

2005-01-29 Thread Jeremy Bowers
On Thu, 27 Jan 2005 15:01:12 -0500, Chris Mattern wrote: > Is it just me, or is the disappointing lack of flamewars > slowly ratcheting up the level of vitriol in his posts? What flabbergasts me is the stunning failure in trolling that XL is. I've accidentally trolled (if you can extend the trol

Weekly Python Patch/Bug Summary

2005-01-29 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 280 open ( +7) / 2747 closed ( +1) / 3027 total ( +8) Bugs: 803 open ( +6) / 4799 closed (+10) / 5602 total (+16) RFE : 167 open ( +1) / 141 closed ( +0) / 308 total ( +1) New / Reopened Patches __ tarfile.E

Re: tk global bindings

2005-01-29 Thread vincent wehren
Gabriel B. wrote: I'm starting to write a POS application UI's module. There's no mouse, just a bunch of global shortcuts. the problem is that TK doesn't have global shortcuts! Is there a work-around or i will have to attach 80 or so bindings for every input element? In Tk here are three levels of

Re: tk global bindings

2005-01-29 Thread vincent wehren
vincent wehren wrote: Gabriel B. wrote: I'm starting to write a POS application UI's module. In Tk here are three levels of binding: instance binding, class binding, and application binding represented by the bind, bind_class, and bind_all methods. You're probably looking for the the bind_all me

Re: limited python virtual machine

2005-01-29 Thread Bernhard Herzog
[EMAIL PROTECTED] (Alex Martelli) writes: > OK then -- vars(type(object)) is a dict which has [[the unbound-method > equivalent of]] object.__subclasses__ at its entry for key > '__subclasses__'. Scratch 'vars' in addition to 'getattr'. And 'eval' > of course, or else building up the string 'obj

ASPy package

2005-01-29 Thread Salvador Fandino
Hello, I have been trying to download ASPy (an old jython package implementing ASP pages support) from the Internet but it is not available anymore from its home page. Does anybody have it and could link it in some public place? Best Regards - Salvador -- http://mail.python.org/mailman/listinf

Re: What's so funny? WAS Re: rotor replacement

2005-01-29 Thread Nick Craig-Wood
Paul Rubin wrote: > An AES or DES addition to an existing module that implements just one > call: > ECB(key, data, direction) > would be a huge improvement over what we have now. A more complete > crypto module would have some additional operations, but ECB is the > only one that's reall

Registration is accepted

2005-01-29 Thread Jceasar
Before use read the help The file Jol03.cpl attached to this message posed a potential virus risk to the network and has been removed. If you need to receive a .zip file from an external source, you may request an exception by emailing [EMAIL PROTECTED] Thank you, Risk Mgmt-Info Sec--

Re: Pystone benchmark: Win vs. Linux (again)

2005-01-29 Thread Franco Fiorese
Fredrik Lundh wrote: Franco Fiorese wrote: I am relatively new about Python benchmarks. After some experiments I found that Python on my PC Windows XP has a relevant higher performance than on Linux. The simple test using pystone.py shows this: * Windows XP Pro: 16566.7 pystones/second * Linux

Re: limited python virtual machine

2005-01-29 Thread Skip Montanaro
Alex> I dunno, maybe I'm just being pessimistic, I guess... No, I think you are being realistic. I thought one of the basic tenets of computer security was "that which is not expressly allowed is forbidden". Any attempt at security that attempts to find and plug the security holes while leav

Re: What's so funny? WAS Re: rotor replacement

2005-01-29 Thread Skip Montanaro
Paul> I've had this discussion here before, maybe not with you. What I Paul> really want is zero installations of anything. Fine. Go build a sumo distribution and track the normal CPython. The problem isn't all that new. (Take a look at scipy.org for one take on that theme. Of cours

Re: Marketing reST (was Re: What YAML engine do you use?)

2005-01-29 Thread richard
Aahz wrote: > While I can see how you'd get that impression of reST, it's not true: > like Python, reST is intended to be simpl*er* and readable, but not > simple.  The joy of reST is that I can concentrate on writing instead of > formatting, just as I do when writing Usenet posts.  ;-)  Even after

Re: Description Field in WinXP Services

2005-01-29 Thread Roger Upole
ChangeServiceConfig2 is the api functions that sets the description, but it's not in the win32service module (yet). Roger "rbt" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > How does one associate a "Description" with a Windows service written in > Python? I've just sta

re: Marketing reST (was Re: What YAML engine do you use

2005-01-29 Thread ajsiegel
Aahz writes - >While I can see how you'd get that impression of reST, it's not true: >like Python, reST is intended to be simpl*er* and readable, but not >simple. Really? ;) Thanks for taking this one on. I was tempted. But scared ;) I find reST quite useful. Not a very sophisticated way

scope rules in nested functions

2005-01-29 Thread Andrew Collier
Hello, I was writing a program which used some nested functions, and came across a behaviour which I was unable to explain. I can summarise it with the example below: #!/usr/bin/env python def evalfunction0(a): print "Call by eval - Success! arg =",a def evalfunction3(a): def evalfun

Re: limited python virtual machine

2005-01-29 Thread Alex Martelli
Skip Montanaro <[EMAIL PROTECTED]> wrote: > Alex> I dunno, maybe I'm just being pessimistic, I guess... > > No, I think you are being realistic. I thought one of the basic tenets of > computer security was "that which is not expressly allowed is forbidden". > Any attempt at security that att

Re: limited python virtual machine (WAS: Another scripting language implemented into Python itself?)

2005-01-29 Thread Christophe Cavalaria
Steven Bethard wrote: > Fuzzyman wrote: > > Cameron Laird wrote: > > [snip..] > > > >>This is a serious issue. > >> > >>It's also one that brings Tcl, mentioned several > >>times in this thread, back into focus. Tcl presents > >>the notion of "safe interpreter", that is, a sub- > >>ordin

bound vs unbound functions

2005-01-29 Thread Michael Tobis
I'm trying to do metaprogramming. I'm sure I've got this all wrong wrong wrong, but somehow my approach hasn't yet hit a brick wall. Anyway, I'd like to dynamically add a method to an instance at instantiation time. Something like ## In [71]: class quux(object): : def __init__(self,st

Re: bound vs unbound functions

2005-01-29 Thread Steven Bethard
Michael Tobis wrote: Anyway, I'd like to dynamically add a method to an instance at instantiation time. Something like Nearly identical question from yesterday and a series of answers: http://mail.python.org/pipermail/python-list/2005-January/263024.html Steve -- http://mail.python.org/mailman/list

[perl-python] sending email

2005-01-29 Thread Xah Lee
# -*- coding: utf-8 -*- # Python # Suppose you want to spam your friend, and you have lots of # friends. The solution is to write a program to do it. After a gander # at python docs, one easily found the module for the job. # see http://python.org/doc/2.3.4/lib/SMTP-example.html # the code is a b

Proxy

2005-01-29 Thread Ali Polatel
is it possible to connect to somewhere through a proxy while using sockets module of Python to connect? If yes can you show me some basic examples? regards Do you Yahoo!? Yahoo! Search presents - Jib Jab's 'Second Term'-- http://mail.python.org/mailman/listinfo/python-list

Re: Description Field in WinXP Services

2005-01-29 Thread rbt
Roger Upole wrote: ChangeServiceConfig2 is the api functions that sets the description, but it's not in the win32service module (yet). Roger OK, I can use _winreg to add the 'Description' field under the appropriate registry key. -- http://mail.python.org/mailman/listinfo/python-list

naive doc question

2005-01-29 Thread Gabriel B.
Is it just me that can't find a full reference in the docs? I wanted a list of all the methods of dict for example... where can i find it? Thanks, and sorry if this question is just dumb, i really can't find it -- http://mail.python.org/mailman/listinfo/python-list

Re: naive doc question

2005-01-29 Thread Brian van den Broek
Gabriel B. said unto the world upon 2005-01-29 19:38: Is it just me that can't find a full reference in the docs? I wanted a list of all the methods of dict for example... where can i find it? Thanks, and sorry if this question is just dumb, i really can't find it It's just you ;-) Try the Library

Re: naive doc question

2005-01-29 Thread Michael Hartl
i.e., http://docs.python.org/lib/typesmapping.html -- http://mail.python.org/mailman/listinfo/python-list

tutorial idea

2005-01-29 Thread ElctrcElctrcgtr1
have a java applet that runs python code, with a tutorial that goes along with it. that way you just have to go to a website to learn it, instead of downloading and installing a few programs. (i would make it so it assumes that you don't know how to program anything.) -- http://mail.python.org/mai

cx_freeze error

2005-01-29 Thread zyqnews
I am new to Python. I made a script, and compiled it with cx_freeze, but I got the following message from it: [cxfreeze]$./FreezePython hello.py Traceback (most recent call last): File "initscripts/ConsoleKeepPath.py", line 15, in ? exec code in m.__dict__ File "FreezePython.py", line 1, in ? File

{Spam?} Re: bound vs unbound functions

2005-01-29 Thread Terry Reedy
"Michael Tobis" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'd like to dynamically add a method to an instance at > instantiation time. No can do. A method is function that is an attribute of a class, even if accessed via an instance. A function added to an instance as an

Re: tutorial idea

2005-01-29 Thread Nick Coghlan
ElctrcElctrcgtr1 wrote: have a java applet that runs python code, with a tutorial that goes along with it. that way you just have to go to a website to learn it, instead of downloading and installing a few programs. (i would make it so it assumes that you don't know how to program anything.) Someth

Re: naive doc question

2005-01-29 Thread Dan Perl
"Michael Hartl" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > i.e., http://docs.python.org/lib/typesmapping.html > If you look on the index page of the Python Library Reference (http://docs.python.org/lib/genindex.html), you will find "dictionary object", which will take you ex

Re: Hey, get this! [was: import from database]

2005-01-29 Thread Steve Holden
Peter Otten wrote: Steve Holden wrote: This is even stranger: it makes it if I import the module a second time: [second import seems to succeed] Maybe you are experiencing some version confusion? What you describe looks much like the normal Python 2.3 behaviour (with no import hook involved) wher

Re: naive doc question

2005-01-29 Thread Michael Tobis
I wouldn't call the responses here helpful; they seem overspecific. I had a similar problem which led to the follwing code. After I came up with this I saw a very similar utility was derived in Dive into Python. see http://diveintopython.org/power_of_introspection/index.html#apihelper.divein Any

{Spam?} Re: naive doc question

2005-01-29 Thread Terry Reedy
"Gabriel B." <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I wanted a list of all the methods of dict for example... where can i > find it? Lib Ref 2.3.8 Mapping Types. Do browse chapter 2 so you know what is there. Terry J. Reedy -- http://mail.python.org/mailman/listinfo/

Re: Coding style article with interesting section on white space

2005-01-29 Thread Nick Coghlan
[EMAIL PROTECTED] wrote: The suggestions in the cited article, "How Not to Write FORTRAN in Any Language", are reasonable but elementary and can be followed in Fortran 90/95/2003 as well as any other language. What infuriates me is that the author writes as if Fortran has not evolved since the 1960

Re: limited python virtual machine

2005-01-29 Thread Nick Coghlan
Alex Martelli wrote: It didn't seem to me that Steven's question was so restricted; and since he thanked me for my answer (which of course is probably inapplicable to some custom interpreter that's not written yet) it appears to me that my interpretation of his question was correct, and my answer u

Re: [perl-python] sending email

2005-01-29 Thread Dan Perl
I recommend the example in the Python Library Reference as a better example: http://www.python.org/doc/lib/SMTP-example.html. You can also find the entire description of the smtplib module in the same section (http://www.python.org/doc/lib/module-smtplib.html). Xah Lee's example is missing:

Re: Description Field in WinXP Services

2005-01-29 Thread rbt
rbt wrote: Roger Upole wrote: ChangeServiceConfig2 is the api functions that sets the description, but it's not in the win32service module (yet). Roger OK, I can use _winreg to add the 'Description' field under the appropriate registry key. Here's an example of it... kludgey but it works

[Tkinter] problem

2005-01-29 Thread Club-B42
when i start opt_newlogin.py directly it works fine(outputs '1 1 1 1'), but if i start it from options.py there is an error(outputs ''). opt_newlogin.py from config import * from Tkinter import * from opt_newlogin import newlogin def OptionsWindow(): """ """ root =

Re: What's so funny? WAS Re: rotor replacement

2005-01-29 Thread Paul Rubin
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: > Apparently, people disagree on what precisely the API should be. E.g. > cryptkit has > > obj = aes(key) > obj.encrypt(data) I don't disagree about the API. The cryptkit way is better than ECB example I gave, but the ECB example shows it's possible

Re: What's so funny? WAS Re: rotor replacement

2005-01-29 Thread Paul Rubin
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: > mxCrypto is primarily unsuitable for the core because Marc-Andre Lemburg > will never ever contribute it. He is very concerned about including > crypto code with the Python distribution, so he certainly won't > contribute his own. Oh wait, I confused

is this sort method the same as the one in python 2.4

2005-01-29 Thread Lowell Kirsh
I'm trying to emulate the sorted() method introduced in python 2.4. The only difference is that it takes a sequence as one of its arguments rather than being a method of the sequence class. Does my method do the same as the sorted()? The obvious difference is that my method is called as sort(se

Re: What's so funny? WAS Re: rotor replacement

2005-01-29 Thread Paul Rubin
Nick Craig-Wood <[EMAIL PROTECTED]> writes: > I would hate to see a module which only implemented ECB. Sure its the > only operation necessary to build the others out of, but its the least > secure mode of any block cipher. It's intended as a building block for other modes. Most applications sho

  1   2   >