Re: question about smtplib

2005-10-03 Thread Tim Roberts
[EMAIL PROTECTED] wrote: >cool. so this line >server = smtplib.SMTP(localhost) >is when i connect ? Use the source, Luke. Source code for every standard module is included on your hard disk. If you look in the __init__ for "class SMTP", your question will be answered. -- - Tim Roberts, [EMAIL

Re: Controlling who can run an executable

2005-10-03 Thread Svennglenn
> What I want: > - the simplest thing that could possibly work! > Have the program check for a file hidden somewhere on the computer. For instance, if the file dummyfile.dll doesn't exist in the windows/system32 folder the program just doesn't start. And when you install the program on her compute

Re: Recursive Property of Octal Numbers

2005-10-03 Thread Tim Roberts
James Stroud <[EMAIL PROTECTED]> wrote: > >I'm very curious about what is going on here. I'm sure my curiosity has >something to do with ignorance of some fundamental concept of computer >science (maybe that 8 is just a vertical infinity?): > >py> b = '\xb6' 8 doesn't have anything to do with it

Re: Background process for ssh port forwarding

2005-10-03 Thread Juho Schultz
Jesse Rosenthal wrote: > Hello all, > > I'm writing a script which will backup data from my machine to a server > using rsync. It checks to see if I am on the local network. If I am, it > runs rsync over ssh to 192.168.2.6 using the pexpect module to log in. > That's the easy part. > > Now, when

Re: semi-newbie module namespace confusion

2005-10-03 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > The main jist of the problem is that I'm trying add data from one > module to a list and a dictionary in another module, and it doesn't > seem to stick over there. > > The programs below seem to illustrate the issue. (The results follow > the programs). > Why are the re

Re: question about smtplib

2005-10-03 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > cool. so this line > server = smtplib.SMTP(localhost) > is when i connect ? http://www.python.org/doc/lib/module-smtplib.html "If the optional host and port parameters are given, the SMTP connect() method is called with those parameters during initiali

Re: Where to find python c-sources

2005-10-03 Thread Fredrik Lundh
Peter Hansen wrote: > Sorry, but this defense is less than weak. Using "python > socketmodule.c" you actually get the right answer as the third result, > while with the even-more-obvious-to-a-rookie "socketmodule.c" you get it > as the *first* result. using just "python" gives you a link to the

Re: Controlling who can run an executable

2005-10-03 Thread Myles Strous
Mike Meyer wrote: > You don't need to install special hardware to get that. There are a > number of pieces of hardware that you can find in a modern computer > that may have a unique serial number you can use as a > dongle. Possibilities include a CPU serial number, an HD serial > number, and the

Re: Python Debug Build

2005-10-03 Thread Fredrik Lundh
"Celine & Dave" wrote: > What happens if I build Python with debug option > (--with-pydebug)? Do I see any changes in my program > output? What is --with-pydebug good for? from the README: --with-pydebug: Enable additional debugging code to help track down memory management problems. T

semi-newbie module namespace confusion

2005-10-03 Thread pnau
I've stuck my neck out and am in the integration stage of a rather important project at my company, which wears dot net blinders. The program is not too big: I've cranked out 3K lines of code, quite a bit of which is unit tested, but my eyes are starting to glaze, and now I'm stuck (and not just m

Converting C++ array into Python

2005-10-03 Thread Deshdeep, Singh (IE10)
I am extending C++ application with python. I am not able to convert a C++ array in Python.   If anyone has the experience of the below :- 1)   How to handle the C++ array in the Python code and how to input that from the script ?   Awaiting for the solution   Regards DD  

Re: help w/ simple GPIB prog.

2005-10-03 Thread Torsten Bronger
Hallöchen! "whoopsi" <[EMAIL PROTECTED]> writes: >Could someone give me some simple commands for communicating with > GPIB devices. If you find a file called visa32.dll on your system, you can just use . NI ships this file bundled with their GPIB hardware, and

Re: Controlling who can run an executable

2005-10-03 Thread Paul Rubin
"Cigar" <[EMAIL PROTECTED]> writes: > Now that I'm three months into the development of this program, my > client tells me she would like to protect her investment by preventing > her employees from doing the same to her. (Going to the competition > and using her program.) Exactly what is the thr

Re: Controlling who can run an executable

2005-10-03 Thread Mike Meyer
"Cigar" <[EMAIL PROTECTED]> writes: > Now that I'm three months into the development of this program, my > client tells me she would like to protect her investment by preventing > her employees from doing the same to her. (Going to the competition > and using her program.) First thing to know; yo

Controlling who can run an executable

2005-10-03 Thread Cigar
I am developing a program for a client. She runs a shop where her clients bring in items for sale or short term buyback. Development of the program has been going great but she's mentioned that there is a 'feature' coming up in the next couple of weeks that she'd like me to implement that has me

help w/ simple GPIB prog.

2005-10-03 Thread whoopsi
Hi, Could someone give me some simple commands for communicating with GPIB devices. All I want is to aquire values from a multimeter/fiber optic attenuator/and a power meter. Nothing too complex. I was able to do so using Matlab (however, I was using the serail port) and communicating via SCPI l

help w/ simple GPIB prog.

2005-10-03 Thread whoopsi
Hi, Could someone give me some simple commands for communicating with GPIB devices. All I want is to aquire values from a multimeter/fiber optic attenuator/and a power meter. Nothing too complex. I was able to do so using Matlab (however, I was using the serail port) and communicating via SCPI l

Re: Thread's, async_chat and asyncore

2005-10-03 Thread Jos
Gaaa, i just did a run with 999 threads pushing data, and i'm getting "IndexError: deque" problems, so i'm guessing its _not_ thread safe... Bummer. jos -- http://mail.python.org/mailman/listinfo/python-list

Thread's, async_chat and asyncore

2005-10-03 Thread Jos
Hello. I'm using the asyncore and _chat modules to create a network server. I also have, running in a separate thread(s), a "producer" which needs to "push" data onto the network connection(s). (This is all for a multi-player game server, so the threads would be individual games, that need to upda

Re: Will python never intend to support private, protected and public?

2005-10-03 Thread Bengt Richter
On 03 Oct 2005 14:45:43 -0700, Paul Rubin wrote: >Mike Meyer <[EMAIL PROTECTED]> writes: >> > If you have a java class instance with a private member that's (say) a >> > network socket to a special port, access to the port is controlled >> > entirely by that class. >> >

Re: Reply-To header

2005-10-03 Thread Andrew Gwozdziewycz
On Oct 3, 2005, at 7:10 PM, [EMAIL PROTECTED] wrote:On Monday 03 October 2005 11:50, Roel Schroeven wrote: Peter Decker wrote:Unfortunately AFAIK most of the popular mail clients don't offer a'Reply to list' button. Even mutt only offers that functionality of you Of course if you have kmail it has

Re: "no variable or argument declarations are necessary."

2005-10-03 Thread marduk
> egold = 0: > while egold < 10: > if test(): > ego1d = egold + 1 > Both pylint and pychecker pick this up. I wrapped the code in a function (to prevent importing from running in an infinite loop) and ran both pylint and pychecker: plyint: W: 5:myfunc: Unused variable 'ego1d' py

Re: Where to find python c-sources

2005-10-03 Thread Peter Hansen
Michael wrote: > John J. Lee wrote: >>You believe that Tor is dumb enough not to think of searching for >>"socketmodule.c" when, um, searching for socketmodule.c? > > He said he had tried google - OK, not in the first post but early in this > thread - I don't equate that with being dumb - just du

Re: packaging a python project and associated graphics files

2005-10-03 Thread Robert Kern
Rajarshi Guha wrote: > Hi, I've been trying to package a python project and I'm a little confused > about how I distribute some PNG's that the program uses as icons. > > Using distutils I can set the data_files argument of setup() and get my > data files located in, say, /usr/local/mydata. > > Ho

Re: Exception raising, and performance implications.

2005-10-03 Thread jepler
On Mon, Oct 03, 2005 at 02:34:40PM -0700, leo wrote: > I come from a java background, where Exceptions are a big Avoid Me, but > are the performance implications the same in Python? We're expecting a > big load on our app (100,000 users/hour) , so we'd like to be as tuned > as possible. I don't kn

Re: Python Debug Build

2005-10-03 Thread sszmidt
On Monday 03 October 2005 17:41, Steve Holden wrote: > Celine & Dave wrote: > > Hi, > > > > What happens if I build Python with debug option > > (--with-pydebug)? Do I see any changes in my program > > output? What is --with-pydebug good for? > > It's used for debugging the Python interpreter itsel

Re: Reply-To header

2005-10-03 Thread sszmidt
On Monday 03 October 2005 11:50, Roel Schroeven wrote: > Peter Decker wrote: > Unfortunately AFAIK most of the popular mail clients don't offer a > 'Reply to list' button. Even mutt only offers that functionality of you Of course if you have kmail it has full list support and allows you to do tha

Re: packaging a python project and associated graphics files

2005-10-03 Thread Mike Meyer
Rajarshi Guha <[EMAIL PROTECTED]> writes: > Hi, I've been trying to package a python project and I'm a little confused > about how I distribute some PNG's that the program uses as icons. > > Using distutils I can set the data_files argument of setup() and get my > data files located in, say, /usr/

Re: question about smtplib

2005-10-03 Thread nephish
cool. so this line server = smtplib.SMTP(localhost) is when i connect ? i had my syntax wrong anyway, i was using server.close() instead of server.quit() thanks much -- http://mail.python.org/mailman/listinfo/python-list

Re: Will python never intend to support private, protected and public?

2005-10-03 Thread Mike Meyer
Paul Rubin writes: >> A couple of other things to think about: >> Are you sure you want to use the C++ model for privilege separation? > I'm not sure what you mean by the C++ model. If you mean the Java > model, as I keep saying, applet sandbox security relies on it, so

packaging a python project and associated graphics files

2005-10-03 Thread Rajarshi Guha
Hi, I've been trying to package a python project and I'm a little confused about how I distribute some PNG's that the program uses as icons. Using distutils I can set the data_files argument of setup() and get my data files located in, say, /usr/local/mydata. However when I write my code, it woul

Re: Reply-To header

2005-10-03 Thread Mike Meyer
Roel Schroeven <[EMAIL PROTECTED]> writes: > Is that really the desired behaviour? IMO the least you can do if you're > searching for help is subscribing to the mailing list on which you're > looking for help. Me and many others don't like to receive replies > directly instead of via the mailing li

Re: PEP 350: Codetags

2005-10-03 Thread Magnus Lie Hetland
In article <[EMAIL PROTECTED]>, Terry Hancock wrote: [snip] >The <> terminator is evil. People will hate that. If there are no fields, >you should just be able to leave it off. This will have an additional >advantage in that many will already have compliant codetags if you leave >off this requirem

Re: Reply-To header

2005-10-03 Thread Steve Holden
Roel Schroeven wrote: > Mike Meyer wrote: > >>Peter Decker <[EMAIL PROTECTED]> writes: >> >> >>>Setting the default Reply-To: to the list means that 'Reply' sends >>>just to the list (the desired behavior most of the time), and 'Reply >>>to all' sends 2 copies. >> >> >>No, it sends one copy to the

Re: Exception raising, and performance implications.

2005-10-03 Thread Tony Nelson
In article <[EMAIL PROTECTED]>, "leo" <[EMAIL PROTECTED]> wrote: > Hello all - > > I was wondering about the performance implications of explicitly > raising exceptions to get information about the current frame. > Something like what the inspect module does, with: Python uses exceptions intern

Re: Exception raising, and performance implications.

2005-10-03 Thread jepler
As for performance, you'll need to benchmark it. However, I think the functionality you're asking for is available as inspect.currentframe(), and if the implementation is in "C" it may have a tiny performance advantage over the Python version. Jeff pgpENIs7apfaF.pgp Description: PGP signature -

Re: Exception raising, and performance implications.

2005-10-03 Thread Paul Rubin
"leo" <[EMAIL PROTECTED]> writes: > I come from a java background, where Exceptions are a big Avoid Me, but > are the performance implications the same in Python? Well, you could measure it experimentally pretty easily, but anyway, Python exceptions are much less expensive than Java exceptions. -

Re: Python Debug Build

2005-10-03 Thread Steve Holden
Celine & Dave wrote: > Hi, > > What happens if I build Python with debug option > (--with-pydebug)? Do I see any changes in my program > output? What is --with-pydebug good for? > It's used for debugging the Python interpreter itself. regards Steve -- Steve Holden +44 150 684 7255 +1

Re: Will python never intend to support private, protected and public?

2005-10-03 Thread Paul Rubin
Mike Meyer <[EMAIL PROTECTED]> writes: > > If you have a java class instance with a private member that's (say) a > > network socket to a special port, access to the port is controlled > > entirely by that class. > > Are you sure? My understanding was that Java's introspection mechanism > could be

Re: Dynamical loading of modules

2005-10-03 Thread Steve Holden
Carsten Haese wrote: > On Mon, 2005-10-03 at 16:41, Carsten Haese wrote: > >>On Mon, 2005-10-03 at 15:52, Jacob Kroon wrote: >> >>>Hi, I'm having some problems with implementing dynamical module loading. >>>First let me >>>describe the scenario with an example: >>> >>>modules/ >>>fruit/ >>>

Re: Reply-To header

2005-10-03 Thread Roel Schroeven
Mike Meyer wrote: > Peter Decker <[EMAIL PROTECTED]> writes: > >>Setting the default Reply-To: to the list means that 'Reply' sends >>just to the list (the desired behavior most of the time), and 'Reply >>to all' sends 2 copies. > > > No, it sends one copy to the list, and one copy to the origin

Re: Python based unacceptable language filter

2005-10-03 Thread Erik Max Francis
Andrew Gwozdziewycz wrote: > I think he may be referring to "bad" words, and 'filthy' language. At > least that's what i got from the question. > There are many PHP implementations on the web, which could be adapted > to python fairly easily. Most of which are probably not the most > ideal s

Exception raising, and performance implications.

2005-10-03 Thread leo
Hello all - I was wondering about the performance implications of explicitly raising exceptions to get information about the current frame. Something like what the inspect module does, with: --- def currentframe(): """Return the frame object for the caller's stack frame.""" try: r

Re: Reply-To header

2005-10-03 Thread Roel Schroeven
Mike Meyer wrote: > Roel Schroeven <[EMAIL PROTECTED]> writes: > >>Peter Decker wrote: >> >>>Setting the default Reply-To: to the list means that 'Reply' sends >>>just to the list (the desired behavior most of the time), and 'Reply >>>to all' sends 2 copies. >> >>The thing is: Reply-to has legitim

Re: question about smtplib

2005-10-03 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Hey there, > > i am using the smtplib module in python 2.3 > > my question is, this works: > > server = smtplib.SMTP(localhost) > > then server.sendmail(to address, from address, message) > > > what i want to know is, how does the connection work? > > when i do ser

Re: Unicode charmap decoders slow

2005-10-03 Thread Tony Nelson
In article <[EMAIL PROTECTED]>, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > Tony Nelson wrote: > > I had seen iconv. Even if my system supports it and it is faster than > > Python's charmap decoder, it might not be available on other systems. > > Requiring something unusual in order to do

Re: Reply-To header

2005-10-03 Thread Mike Meyer
Roel Schroeven <[EMAIL PROTECTED]> writes: > Peter Decker wrote: >> Setting the default Reply-To: to the list means that 'Reply' sends >> just to the list (the desired behavior most of the time), and 'Reply >> to all' sends 2 copies. > The thing is: Reply-to has legitimate uses. I don't really unde

Re: Convert hex to string

2005-10-03 Thread Larry Bates
It contains non-printing and non-ASCII characters so it can't be printed lie you want. The best Python can do is to show you the hexadecimal of those bytes (as it has done). Printable ASCII characters lie in the range 32 decimal (20 hex) to 125 decimal (7F hex). Those characters in that range ar

Python Debug Build

2005-10-03 Thread Celine & Dave
Hi, What happens if I build Python with debug option (--with-pydebug)? Do I see any changes in my program output? What is --with-pydebug good for? Thanks. __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com -- http://mail.p

Re: Reply-To header

2005-10-03 Thread Mike Meyer
Peter Decker <[EMAIL PROTECTED]> writes: > Setting the default Reply-To: to the list means that 'Reply' sends > just to the list (the desired behavior most of the time), and 'Reply > to all' sends 2 copies. No, it sends one copy to the list, and one copy to the original author. This is the behavio

Re: Dynamical loading of modules

2005-10-03 Thread Carsten Haese
On Mon, 2005-10-03 at 16:41, Carsten Haese wrote: > On Mon, 2005-10-03 at 15:52, Jacob Kroon wrote: > > Hi, I'm having some problems with implementing dynamical module loading. > > First let me > > describe the scenario with an example: > > > > modules/ > > fruit/ > > __init__.py > >

Re: Dynamical loading of modules

2005-10-03 Thread Carsten Haese
On Mon, 2005-10-03 at 15:52, Jacob Kroon wrote: > Hi, I'm having some problems with implementing dynamical module loading. > First let me > describe the scenario with an example: > > modules/ > fruit/ > __init__.py > apple.py > banana.py > > apple.py defines a class '

Re: Convert hex to string

2005-10-03 Thread jepler
it *is* a string. because most of the characters are not printable, they're presented using hex notation when you repr() the string. That's what entering an expression in the interactive interpreter does (except that it never prints 'None'). If you really want to write whatever those bytes are,

Convert hex to string

2005-10-03 Thread Java and Swing
I have some output stored in a string that looks like.. >> x '\x01\xee\x1eo\xc3+\x8b\x83\xfad\xf6E\xaa\x0ea/I\x96\x83\xf5G\xa3\rQ\xfcH\xee\r' According to, http://docs.python.org/lib/typesseq-strings.html, this is "Unsigned Hexidecimal (lowercase)". How can I get this into normal Ascii so that

Re: Unicode charmap decoders slow

2005-10-03 Thread Martin v. Löwis
Tony Nelson wrote: > I had seen iconv. Even if my system supports it and it is faster than > Python's charmap decoder, it might not be available on other systems. > Requiring something unusual in order to do a trivial LUT task isn't an > acceptable solution. If I write a charmap decoder as an

Re: "no variable or argument declarations are necessary."

2005-10-03 Thread Ron Adam
Steven D'Aprano wrote: > On Mon, 03 Oct 2005 06:59:04 +, Antoon Pardon wrote: > > x = 12.0 # feet > # three pages of code > y = 15.0 # metres > # three more pages of code > distance = x + y > if distance < 27: > fire_retro_rockets() > > And lo, one multi-billion dollar Mars lander starts

Re: Dynamical loading of modules

2005-10-03 Thread Jp Calderone
On Mon, 03 Oct 2005 21:52:21 +0200, Jacob Kroon <[EMAIL PROTECTED]> wrote: >Hi, I'm having some problems with implementing dynamical module loading. >First let me >describe the scenario with an example: > >modules/ >fruit/ >__init__.py >apple.py >banana.py > >apple.py

Re: Where to find python c-sources

2005-10-03 Thread Szabolcs Nagy
if u just want to browse the code online then use this: http://fisheye.cenqua.com/viewrep/python/python/dist/src *much* nicer than sourceforge cvs viewer nsz -- http://mail.python.org/mailman/listinfo/python-list

Dynamical loading of modules

2005-10-03 Thread Jacob Kroon
Hi, I'm having some problems with implementing dynamical module loading. First let me describe the scenario with an example: modules/ fruit/ __init__.py apple.py banana.py apple.py defines a class 'Apple', banana defines a class 'Banana'. The problem lies in the fact

Re: python getopt functionality

2005-10-03 Thread Micah Elliott
On Oct 03, M.N.A.Smadi wrote: > It is not clear to me if i can define `mandatory' options? That sounds > strange but let say that the command `requires ' a value for -z or > --zoo (either or should be find but one and only one of them MUST be > present). Can i do that with resorting to using if st

Re: "no variable or argument declarations are necessary."

2005-10-03 Thread Mike Meyer
Steven D'Aprano <[EMAIL PROTECTED]> writes: > On Mon, 03 Oct 2005 06:59:04 +, Antoon Pardon wrote: > Declared variables have considerable labour costs, and only marginal > gains. Since the steps you take to protect against other errors will also > protect against mistyping variables, declaratio

simple AJAX with JSON

2005-10-03 Thread Wensheng
I just post a cookbook recipe on simple ajax. http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/440637 Hope someone find it's useful. Wensheng Wang -- http://mail.python.org/mailman/listinfo/python-list

Re: Reply-To header

2005-10-03 Thread Rocco Moretti
Roel Schroeven wrote: > Peter Decker wrote: > >>On 10/3/05, Roel Schroeven <[EMAIL PROTECTED]> wrote: >> >>On lists like this, where everyone benefits by sharing information, it >>seems pretty lame to hide behind purist arguments about Reply-To: >>headers. The default behavior should be the one mo

Re: python getopt functionality

2005-10-03 Thread M.N.A.Smadi
It is not clear to me if i can define `mandatory' options? That sounds strange but let say that the command `requires ' a value for -z or --zoo (either or should be find but one and only one of them MUST be present). Can i do that with resorting to using if statements? thanks moe smadi Fredrik

question about smtplib

2005-10-03 Thread nephish
Hey there, i am using the smtplib module in python 2.3 my question is, this works: server = smtplib.SMTP(localhost) then server.sendmail(to address, from address, message) what i want to know is, how does the connection work? when i do server.sendmail, does it connect then ? or did it connec

Re: Python TNEF (winmail.dat attachment access) library?

2005-10-03 Thread Larry Bates
Why not write Python class that uses CTypes and make it available as a recipe? From a performance standpoint it is unlikely you can do better than to call the .dll and have it do the work for you. Just a suggestion. -Larry Bates Petri Savolainen wrote: > Hello, > > has anyone seen such a beast

Re: Graphical debugger/code explorer

2005-10-03 Thread Larry Bates
Eclipse - http://www.eclipse.org/ http://wiki.python.org/moin/EclipsePythonIntegration Florian Lindner wrote: > Hello, > in order to understand python code from a larger project (Zope 3) I'm > looking for a tool that helps me with that. It should also help > What (graphical) application running o

Re: Reply-To header

2005-10-03 Thread Roel Schroeven
Peter Decker wrote: > On 10/3/05, Roel Schroeven <[EMAIL PROTECTED]> wrote: > > >>The default of this list is not to make conversations private; in fact >>the list doesn't have any default. It's you who chooses to send replies >>to the original author, to the list, or both, by choosing which butt

Re: Will python never intend to support private, protected andpublic?

2005-10-03 Thread Kent Johnson
Mike Meyer wrote: > Paul Rubin writes: > That's not what privilege separation means. It means that the privileged objects stay secure even when the unprivileged part of the program is completely controlled by an attacker. >>> >>>In which case, what's "privat

Re: [Info] PEP 308 accepted - new conditional expressions

2005-10-03 Thread Michael
Christophe wrote: > Michael a écrit : >> Rocco Moretti wrote: >> >> >>>That is, what would happen with the following constructs: >>> >>>A if B else C if D else F >>>A if B if C else D else F >> >> >> The correct answer should be the person who wrote it would get told off >> for writing code th

Re: python getopt functionality

2005-10-03 Thread Michael
M.N.A.Smadi wrote: > I have a perl script that I need to port to python. The script takes > input from the command line. Is there a standard way of processing > command line arguments based on the -flag preceeding the argument? Yes. # pydoc getopt Help on module getopt: NAME getopt - Parse

Re: python getopt functionality

2005-10-03 Thread Fredrik Lundh
"M.N.A.Smadi" wrote: > I have a perl script that I need to port to python. The script takes > input from the command line. Is there a standard way of processing > command line arguments based on the -flag preceeding the argument? http://docs.python.org/lib/module-getopt.html http://docs.python.o

python getopt functionality

2005-10-03 Thread M.N.A.Smadi
hi; I have a perl script that I need to port to python. The script takes input from the command line. Is there a standard way of processing command line arguments based on the -flag preceeding the argument? thanks moe smadi -- http://mail.python.org/mailman/listinfo/python-list

RE: Py2Exe + kinterbasdb

2005-10-03 Thread Jimmy Retzlaff
[EMAIL PROTECTED] wrote: > I compile an application (that working good in native python) to exe > with py2exe. > In native mode (python.exe ReportApp.py) it is working, the reports are > created good. > But when I try to create a report from the compiled exe, it is show an > error: > > Traceback (

Re: Will python never intend to support private, protected and public?

2005-10-03 Thread Mike Meyer
Paul Rubin writes: >> > That's not what privilege separation means. It means that the >> > privileged objects stay secure even when the unprivileged part of the >> > program is completely controlled by an attacker. >> In which case, what's "private" got to do with this?

Re: Where to find python c-sources

2005-10-03 Thread Michael
John J. Lee wrote: > [Tor Erik S�nvisen] >> socketmodule.c, but I can't locate this file... Where should I look? > > [John, finding 'socketmodule.c' responds well to "I'm Feeling Lucky"] >> Does google vary in its results across the globe? > > [Michael] >> The search terms might be obvious to yo

Re: "no variable or argument declarations are necessary."

2005-10-03 Thread George Sakkis
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote > [snipped] > No compiler will catch this error: > > x = 12.0 # feet > # three pages of code > y = 15.0 # metres > # three more pages of code > distance = x + y > if distance < 27: > fire_retro_rockets() Actually modern compilers can (http://www.bo

Re: morphological image processing in Python

2005-10-03 Thread D.Hering
Take a look at ADaM and it's python wrappers: http://datamining.itsc.uah.edu/adam/documentation.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Where to find python c-sources

2005-10-03 Thread John J. Lee
[Tor Erik S�nvisen] > socketmodule.c, but I can't locate this file... Where should I look? [John, finding 'socketmodule.c' responds well to "I'm Feeling Lucky"] > Does google vary in its results across the globe? [Michael] > The search terms might be obvious to you, but it simply means your googl

Re: "no variable or argument declarations are necessary."

2005-10-03 Thread en.karpachov
On Mon, 03 Oct 2005 17:43:35 +0100 Steve Holden wrote: > Hmm. Presumably introspection via getattr() is way too dangerous, then? Sure, it is dangerous. Not a showstopper, though. I mean, the absolute address access in the C is too dangerous, yes, but it doesn't make declarations in C any less u

Re: New project coming up...stay with Python, or go with a dot net language??? Your thoughts please!

2005-10-03 Thread Steven D'Aprano
On Mon, 03 Oct 2005 09:01:37 -0500, spiffo wrote: > The Main Issue in a nutshell > > I am a corporate developer, working for a single company. Got a new project > coming up and wondering if I should stay with Python for this new, fairly > large project, are jump back on the 'safe' M$ bandwagon us

Re: "no variable or argument declarations are necessary."

2005-10-03 Thread en.karpachov
On Tue, 04 Oct 2005 01:46:49 +1000 Steven D'Aprano wrote: > errors and not rely on the compiler. No compiler will catch this error: > > x = 12.0 # feet > # three pages of code > y = 15.0 # metres > # three more pages of code > distance = x + y > if distance < 27: > fire_retro_rockets() > > A

Re: Reply-To header

2005-10-03 Thread Peter Decker
On 10/3/05, Roel Schroeven <[EMAIL PROTECTED]> wrote: > The default of this list is not to make conversations private; in fact > the list doesn't have any default. It's you who chooses to send replies > to the original author, to the list, or both, by choosing which button > to press in your mail

Re: "no variable or argument declarations are necessary."

2005-10-03 Thread Steven D'Aprano
On Mon, 03 Oct 2005 20:30:35 +0400, en.karpachov wrote: > Some people just don't get the simple fact that declarations are > essentially kind of unit test you get for free (almost), and the compiler > is a testing framework for them. No. Some people just don't get it that declarations aren't almo

Python profiler

2005-10-03 Thread Celine & Dave
Hello All, I am trying to measure memory used in a Python program. Also, I would like to gather some statistics about object usages. For example, I would like to be able to see how much time it takes to search for an item in a dict object, how many times it has to access the symbol table to retri

Re: "no variable or argument declarations are necessary."

2005-10-03 Thread Steve Holden
[EMAIL PROTECTED] wrote: > On 3 Oct 2005 13:58:33 GMT > Antoon Pardon wrote: > > >>People often promote unittesting here. Writing all those unittest is >>an added burden too. But people think this burden is worth it. >> >>I think writing declaration is also worth it. The gain is not as >>much as

Re: Will python never intend to support private, protected and public?

2005-10-03 Thread bruno modulix
Paul Rubin wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: > >>No, but that is precisely why Python's semi-private variables are >>usually better. Names like _X and class.__X are warnings to the developer >>"use these at your own risk", without preventing developers who need them >>from using

Re: Unicode charmap decoders slow

2005-10-03 Thread Tony Nelson
In article <[EMAIL PROTECTED]>, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > Tony Nelson wrote: > > Is there a faster way to decode from charmaps to utf-8 than unicode()? > > You could try the iconv codec, if your system supports iconv: > > http://cvs.sourceforge.net/viewcvs.py/python-codecs/

Re: Graphical debugger/code explorer

2005-10-03 Thread benz
>>>PYTHON_IDE={ 'spe' : 'http://spe.pycs.net/', 'eric3' : 'http://www.die-offenbachs.de/detlev/eric3.html', 'drpython' : 'http://drpython.sourceforge.net/'} :) -- http://mail.python.org/mailman/listinfo/python-list

Re: "no variable or argument declarations are necessary."

2005-10-03 Thread en.karpachov
On 3 Oct 2005 13:58:33 GMT Antoon Pardon wrote: > People often promote unittesting here. Writing all those unittest is > an added burden too. But people think this burden is worth it. > > I think writing declaration is also worth it. The gain is not as > much as with unittesting but neither is th

Re: "no variable or argument declarations are necessary."

2005-10-03 Thread Steven D'Aprano
On Mon, 03 Oct 2005 13:58:33 +, Antoon Pardon wrote: > Op 2005-10-03, Duncan Booth schreef <[EMAIL PROTECTED]>: >> Antoon Pardon wrote: >> >>> A language where variable have to be declared before use, would allow >>> to give all misspelled (undeclared) variables in on go, instead of >>> just c

Re: pywordnet install problems

2005-10-03 Thread Steven Bethard
vdrab wrote: > I had WordNet 2.0 installed but just now I tried it with 1.7.1 as well > and the result was the same. It's a shame, glossing over the pywordnet > page really made me want to give it a try. > Are there any workarounds you can recommend ? What's your wordnet setup like? I have mine i

Re: New project coming up...stay with Python, or go with a dot net language??? Your thoughts please!

2005-10-03 Thread Rob Cowie
Perhaps with the time saved by using Python instead of C# or some such, you could help to improve adodbapi.py, ensuring support for the next version of MS SQLServer, although that might be of little help in the short term. Just a thought. Also, have a gander at http://www.object-craft.com.au/proje

Graphical debugger/code explorer

2005-10-03 Thread Florian Lindner
Hello, in order to understand python code from a larger project (Zope 3) I'm looking for a tool that helps me with that. It should also help What (graphical) application running on Linux can you recommend? Thanks, Florian -- http://mail.python.org/mailman/listinfo/python-list

Re: morphological image processing in Python

2005-10-03 Thread benzwt
Alexandre Fayolle 寫道: http://www.mmorph.com/resources.html check this page. Pymorph is a free. > Hello, > > I'm about to start a project which will involve some greyscale image > processing using morphological operators (erosion, dilation, distance > transforms...), and I was wondering if th

Python TNEF (winmail.dat attachment access) library?

2005-10-03 Thread Petri Savolainen
Hello, has anyone seen such a beast? I tried googling, PyPI, Parnassus etc. but could not find any pure-python code nor extensions to interface with any of the existing implementations. I am thinking about taking the Ruby code I found at http://www.zweknu.org/technical/index.rhtml?s=p%7c15 an

Re: New project coming up...stay with Python, or go with a dot net language??? Your thoughts please!

2005-10-03 Thread D H
spiffo wrote: > Ok, I LOVE python, so that is not the issue, but, I am getting very worried > about it's growth. I recently re-visted the web looking at alot of projects > I assumed would be up and running by now from over a year ago, such as Boa > Constructor, Iron Python etc... it seems all these

Re: Reply-To header

2005-10-03 Thread Roel Schroeven
Peter Decker wrote: > On 10/3/05, Roel Schroeven <[EMAIL PROTECTED]> wrote: > > >>Indeed, and that's by design: http://www.unicom.com/pw/reply-to-harmful.html > > > Of course, that's only one side of the argument: > > http://www.blackgate.net/consulting/reply-to_munging_useful.html > > On lis

Re: Will python never intend to support private, protected and public?

2005-10-03 Thread Steven D'Aprano
On Mon, 03 Oct 2005 09:14:34 +, Antoon Pardon wrote: > If you are in a project with > multiple authors, your usage of private variables can break code > that other people rely on. If you are in a project with multiple authors, your usage of PUBLIC variables can break code that other people re

Re: struct.unpack

2005-10-03 Thread g.franzkowiak
Peter Otten schrieb: > g.franzkowiak wrote: > > >>The dataObject was read from a named pipe as an byte stream >> >>state, dataObject = win32file.ReadFile(handle, nbytes, None) >>print repr(dataObject) >> ==> '\x01\x02\x03\x04\x00\x00\x00\x00\x00\x00\x0. >> >>With Frederiks help operates this

  1   2   >