Re: Looking for info on Python's memory allocation

2005-10-10 Thread Sybren Stuvel
Steven D'Aprano enlightened us with: > he says that every time you try to append to a list that is already > full, Python doubles the size of the list. This wastes no more than > 50% of the memory needed for that list, but has various advantages > -- and I'm damned if I can remember exactly what th

Re: Let My Terminal Go

2005-10-10 Thread Sybren Stuvel
[EMAIL PROTECTED] enlightened us with: > When gVim is launched from a shell terminal, it completely frees the > terminal. [...] How do I implement this in my application written in > python? Using fork() and by catching the HUP signal. Sybren -- The problem with the world is stupidity. Not sayin

Re: Batteries Included?

2005-10-10 Thread Sybren Stuvel
Alex enlightened us with: > Python's moto is "Batteries Included", but where are the batteries > for making exe files and making an installer file? Those aren't "batteries". Those are things you can do with the program, but are outside the programming language. Writing and distributing software is

Re: Let My Terminal Go

2005-10-10 Thread marduk
On Mon, 2005-10-10 at 22:58 -0700, [EMAIL PROTECTED] wrote: > Hello, > > A user of my application points me to a behavior in gVim, > the text editor, that I would like to implement in my > application. > > When gVim is launched from a shell terminal, it completely > frees the terminal. You can co

Re: how to capture key pressing

2005-10-10 Thread Tim Roberts
"billie" <[EMAIL PROTECTED]> wrote: > >> Look at curses. > >I was searching for something portable on multiple platforms. Keyboard access is not portable. It is quite system-specific, even in C. >Curses doesn't work on Windows. Sure it does. You can find curses implementations for Windows. Ho

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

2005-10-10 Thread Eric Nieuwland
Dave Hansen wrote: > And Basic, and Fortran, and Lisp, and just about any programming > language you care to name, including python (if Condition: Affirmative > else: Negative). > > Not to mention that the sequence is identical to execution order. > It's just plain goofy to have to scan to the midd

Let My Terminal Go

2005-10-10 Thread [EMAIL PROTECTED]
Hello, A user of my application points me to a behavior in gVim, the text editor, that I would like to implement in my application. When gVim is launched from a shell terminal, it completely frees the terminal. You can continue to use the terminal for whatever purpose you wish, including closing

Batteries Included?

2005-10-10 Thread Alex
One of the first things I wanted to do when I start learning Python was to produce a simple standalone application that I could distribute to my users (windows users). Python's moto is "Batteries Included", but where are the batteries for making exe files and making an installer file? I had to down

Re: Python reliability

2005-10-10 Thread Ville Voipio
In article <[EMAIL PROTECTED]>, Peter Hansen wrote: > Other than that, we had no real issues and definitely felt the choice of > Python was completely justified. I have no hesitation recommending it, > other than to caution (as I believe Paul R did) that use of new features > is "dangerous" in

Re: Python reliability

2005-10-10 Thread Ville Voipio
In article <[EMAIL PROTECTED]>, Thomas Bartkus wrote: > > All in all, it would seem that the reliability of the Python run time is the > least of your worries. The best multi-tasking operating systems do a good > job of segragating different processes BUT what multitasking operating > system meet

Re: Why asci-only symbols?

2005-10-10 Thread Do Re Mi chel La Si Do
Hi ! I agree with you; I will adore capacity to call functions named in Unicode. @-salutations Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

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

2005-10-10 Thread George Sakkis
"Dave Hansen" <[EMAIL PROTECTED]> wrote: > On Mon, 10 Oct 2005 16:42:34 -0500, Terry Hancock > <[EMAIL PROTECTED]> wrote: > > >On Sunday 09 October 2005 07:50 am, phil hunt wrote: > >> On Fri, 7 Oct 2005 01:05:12 -0500, Terry Hancock <[EMAIL PROTECTED]> wrote: > >> >GvR's syntax has the advantage

Re: Comparing lists

2005-10-10 Thread Christian Stapfer
"Steve Holden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Christian Stapfer wrote: >> "George Sakkis" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >> >>>"Christian Stapfer" <[EMAIL PROTECTED]> wrote: <[EMAIL PROTECTED]> wrote: >try to use set. >>>

Re: Python, COM Servers, and Multi-Threading

2005-10-10 Thread Steve Holden
Carl Waldbieser wrote: > I have been considering using Python and the Reportlab library for > generating PDF reports for the back-end of a web based application. The > application runs most of its background tasks on a dedicated server that is > Windows based (Win2K or Win2k3). The program that l

Re: Python name lookups

2005-10-10 Thread Steve Holden
Dave wrote: > Hello All, > > As far as I understand, Python deals with a lot of > string objects, i.e. it looks up all names. Is there a > way to find out how many name lookup operations take > place in a Python program? Is it the name lookup > operation or hash operation that degrades performance

Re: Python's Performance

2005-10-10 Thread Steve Holden
Peter Hansen wrote: > Harald Armin Massa wrote: > >>""" >>What is Python? >> >>Python is an interpreted, interactive, object-oriented programming >>language. It is often compared to Tcl, Perl, Scheme or Java. >>""" >>taken from >>http://www.python.org/doc/Summary.html >> >>maybe someone could upda

Re: Newbie needs help. Setting PYTHONDOCS to read HTML.

2005-10-10 Thread moondusterone
Brett, I did that and now when I enter "keywords" I get a list of words. And it says that I can enter any of the words to get more help. I enter "class" and I get "could not read docs from C:/Python24/ref/if.html". "Brett Hoerner" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >

Re: Looking for info on Python's memory allocation

2005-10-10 Thread jepler
While there may be a discussion somewhere in the archives, the comments in listobject.c are enlightening too. /* Ensure ob_item has room for at least newsize elements, and set * ob_size to newsize. If newsize > ob_size on entry, the content * of the new slots at exit is undefined heap trash; it

Re: Looking for info on Python's memory allocation

2005-10-10 Thread R Toop
http://mail.python.org/pipermail/python-list/2003-December/198141.html wherein Tim gently corrects my brash guess that Python lists are pointer-linked. The example's linearly-constructed list is allocated by doubling storage, copying & freeing (cf realloc). The result that the process virtual memo

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

2005-10-10 Thread Peter Hansen
Sebastian Bassi wrote: > I don't understand why there is a new expression, if this could be > accomplished with: > > if C: > X > else: > Y > > What is the advantage with the new expression? It actually is an expression, whereas your example shows a statement (so "this" could _not_ be accompli

Re: Why asci-only symbols?

2005-10-10 Thread Peter Hansen
Mike Meyer wrote: > Out of random curiosity, is there a PEP/thread/? that explains why > Python symbols are restricted to 7-bit ascii? And of equally random curiosity :-), what alternative(s) can you suggest would have been appropriate? (I note that Unicode, for example, dates from around the t

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

2005-10-10 Thread Sebastian Bassi
On 9/30/05, Reinhold Birkenfeld <[EMAIL PROTECTED]> wrote: > after Guido's pronouncement yesterday, in one of the next versions of Python > there will be a conditional expression with the following syntax: > X if C else Y I don't understand why there is a new expression, if this could be accomplis

Re: Library functions

2005-10-10 Thread Peter Hansen
Tuvas wrote: > How exactly do you do that? Just to get some kind of an idea, perhaps > you could share bits of code? Thanks! Did you check out the ctypes web site before asking? See http://starship.python.net/crew/theller/ctypes/ and at least read through the helpful tutorial before asking ques

Re: Send password over TCP connection

2005-10-10 Thread Peter Hansen
dcrespo wrote: > Two copies of the password: one on the client, the other on the server. [snip] > I think it is a very good solution, Isn't it? Ignoring all the other issues, any solution which actually requires the password to be stored on the server is a bad solution. Administrators should no

Looking for info on Python's memory allocation

2005-10-10 Thread Steven D'Aprano
Can somebody help me please? I've spent a fruitless hour googling with no luck. I'm discussing memory allocation techniques with somebody, and I'm trying to find a quote from -- I think -- Tim Peters where he discusses the way Python allocates memory when you append to lists. In basic terms,

Re: Newbie needs help. Setting PYTHONDOCS to read HTML.

2005-10-10 Thread Brett Hoerner
You can use Python regardless of the docs... of course. Not sure what you mean there. As far as setting an Environment Variable, though: (1) Right-Click My Computer, go to Properties (2) Go to the Advanced tab (3) Click Environment Variables (bottom middle-ish) (4) Under "User Variables" clic

Re: Why asci-only symbols?

2005-10-10 Thread jepler
I'm not aware of any PEPs on the subject, but google groups turns up some past threads. Here's one from February 2004: http://groups.google.com/group/comp.lang.python/browse_frm/thread/d5fcc1c8825a60dc/96856af647ce71d5 I didn't immediately find this message of Guido's that everyone's talk

Re: Python reliability

2005-10-10 Thread Peter Hansen
Ville Voipio wrote: > I am not building a redundant system with independent > instruments voting. At this point I am trying to minimize > the false alarms. This is why I want to know if Python > is reliable enough to be used in this application. > > By the postings I have seen in this thread it se

Re: pyparallel and MAKE controller board for CRYDOM AC/DC switches

2005-10-10 Thread jepler
Recalling the parallel pinout, pin 3 is data bit 2. Have you tried def BIT(x): return 1< pgprfRaNUTBBH.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: rrdtool?

2005-10-10 Thread Grig Gheorghiu
I don't know of any, so maybe it's time to roll our sleeves :-) Actually, a while ago I started a python project called perfstats () which uses SNMP to retrieve various system performance metrics, stores them into a Firebird database, then displays them u

Re: Python's Performance

2005-10-10 Thread Terry Hancock
On Monday 10 October 2005 01:21 pm, Donn Cave wrote: > In article <[EMAIL PROTECTED]>, > I am not very well acquainted with these technologies, but it sounds > like variations on the implementation of an interpreter, with no > really compelling distinction between them. When a program is deployed

Re: Newbie needs help. Setting PYTHONDOCS to read HTML.

2005-10-10 Thread Ivan Shevanski
You can still use it, but you can't use the help. I don't know but this has always been better than the help for me! =D-- -Ivan -- http://mail.python.org/mailman/listinfo/python-list

pyparallel and MAKE controller board for CRYDOM AC/DC switches

2005-10-10 Thread Richard Siderits
Greetings. I am trying to write a small application for controlling CRYDOM AC and DC switches from the parallel port using pyparallel. The project is described in the latest issue of MAKE magazine Vol.3 pg 86. All of the examples are in C, VB, Linux, Unix but not a thing in Python. Seems lik

Newbie needs help. Setting PYTHONDOCS to read HTML.

2005-10-10 Thread moondusterone
I have installed Python 2.4.2 from Python.org. I type "help()" and I get basic help. In help, I type "keywords" and I get an error saying, "Sorry, topic and keyword documentation is not available because the Python HTML documentation files could not be found. If you have installed them, please

Re: Python's Performance

2005-10-10 Thread Peter Hansen
Harald Armin Massa wrote: > """ > What is Python? > > Python is an interpreted, interactive, object-oriented programming > language. It is often compared to Tcl, Perl, Scheme or Java. > """ > taken from > http://www.python.org/doc/Summary.html > > maybe someone could update that??? Maybe we shou

Re: how do you pronounce wxpython

2005-10-10 Thread Peter Hansen
Peter wrote: > Although the wxPyWiki seems to be pronounced wix-pee-wi-kee (as it says > on the front page) so maybe it is pronounced wix-Python... you never > know... That's _definitely_ how it's pronounced. Here. Where I am. When I'm speaking. If, however, we're near Mike Fletcher and he's

Why asci-only symbols?

2005-10-10 Thread Mike Meyer
Out of random curiosity, is there a PEP/thread/? that explains why Python symbols are restricted to 7-bit ascii? http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python-

Re: Continuous system simulation in Python

2005-10-10 Thread hrh1818
In your simulator how much do you want Python to do? I ask this because your subject title implies you want to write your simulation code in Python but a simulator written entirely in Python would be very slow. Python is an interpreted language and pure Python code is not suitable for simulating

Re: read serial data from a barcode reader/scanner using python

2005-10-10 Thread Benji York
Edgar wrote: > is there a way to program python to read serial data from a barcode > reader/scanner http://pyserial.sourceforge.net/ > and then using the parallel port of the PC to activate an > electromagnetic door lock. http://pyserial.sourceforge.net/pyparallel.html For other options see Go

Re: convert char to byte representation

2005-10-10 Thread Mike Meyer
[Format recovered from top posting.] Larry Bates <[EMAIL PROTECTED]> writes: > Grant Edwards wrote: >> On 2005-10-10, Larry Bates <[EMAIL PROTECTED]> wrote: I am trying to xor the byte representation of every char in a string with its predecessor. But I don't know how to convert a char int

Re: Changing console text color

2005-10-10 Thread Steve M
Thank you. I appreciate the help. Steve Larry Bates wrote: > You can use this module to control console windows background and > text colors. > > http://www.effbot.org/zone/console-index.htm > > -Larry Bates > > Steve M wrote: >> Hello, >> >> I've been trying to change the text color

Re: Python on the Power PC

2005-10-10 Thread Peter Milliken
Unfortunately I am completely new to using the Pocket PC - the Python error message appear to come up in 2 "waves" or screens - the first screen contains the error message re can't find tkinter and is only visible for a fraction of a second (repeated running and trying to get the eyes to focus on e

Form Filling in XML

2005-10-10 Thread heel_spain_scarlet
if i have the following chunck of code how can I look at the Text Nodes of Fillin and compare them with the Element Nodes of Form and if they are equal put the Text Node of Fillin into the Text Node of Form ie)=Monday so put maandag it between and so maantag thanks for the insight import xml.d

Re: rrdtool?

2005-10-10 Thread Dan Stromberg
On Mon, 10 Oct 2005 13:18:29 -0700, Grig Gheorghiu wrote: > By sheer coincidence I was looking into the same thing today. I just > downloaded the latest rrdtool release (rrdtool-1.2.11) and I noticed a > /bindings/python subdirectory. I haven't played with it yet, as I still > need to install tons

Re: Python's Performance

2005-10-10 Thread Mike Meyer
Donn Cave <[EMAIL PROTECTED]> writes: > In article <[EMAIL PROTECTED]>, Mike Meyer <[EMAIL PROTECTED]> > wrote: > >> Donn Cave <[EMAIL PROTECTED]> writes: >> > I agree that there are many shades of grey here, but there's also a >> > real black that's sharply distinct and easy to find -- real nativ

Re: Library functions

2005-10-10 Thread Tuvas
How exactly do you do that? Just to get some kind of an idea, perhaps you could share bits of code? Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: Function decorator that caches function results

2005-10-10 Thread Paul Rubin
Tom Anderson <[EMAIL PROTECTED]> writes: > Okay, a crack at a definition: a closure is a function in which some > of the variable names refer to variables outside the function. That's misleading, I'd say a closure is a combination of a function (executable code) and a lexical environment (the valu

Re: Send password over TCP connection

2005-10-10 Thread Dan Stromberg
On Tue, 11 Oct 2005 01:21:55 +0200, Michael Ströder wrote: > Dan Stromberg wrote: >> [quoted text muted] > > http://www.faqs.org/rfcs/rfc2945.html > > Ciao, Michael. OK, thanks for the reference. I guess I neglected to stress that we're talking about using random strings of characters, not dic

Re: Send password over TCP connection

2005-10-10 Thread Paul Rubin
Dan Stromberg <[EMAIL PROTECTED]> writes: > > No. It's vulnerable to dictionary search. Use SRP if you can. > Where can I learn more about this? http://srp.stanford.edu as already mentioned. Also, RFC 2945 describes an older version (still ok). -- http://mail.python.org/mailman/listinfo/python-

Re: Works only in interactive mode

2005-10-10 Thread qwweeeit
Hi Sam, thank you very much. Your diagnosis was perfect! Bye. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's Performance

2005-10-10 Thread Paul Boddie
Dennis Lee Bieber wrote: > I'd consider that BASIC to be a fully interpreted language, as the > tokens are still a one-for-one equivalence of the source code. Python, > UCSD, and Java are not one-for-one, so on that basis, they fit the > definition of a compiled language... That's an interesting d

Python, COM Servers, and Multi-Threading

2005-10-10 Thread Carl Waldbieser
I have been considering using Python and the Reportlab library for generating PDF reports for the back-end of a web based application. The application runs most of its background tasks on a dedicated server that is Windows based (Win2K or Win2k3). The program that launches the tasks requires a CO

Re: Function decorator that caches function results

2005-10-10 Thread Tom Anderson
On Mon, 10 Oct 2005, Steven D'Aprano wrote: > On Sun, 09 Oct 2005 17:39:23 +0200, Fredrik Lundh wrote: > >> only if you're obsessed with CPython implementation details. > > No. I'm obsessed with finding out what closures are, since nobody seems > to have a good definition of them! On the contrar

WMI - Restore Setting in Python

2005-10-10 Thread saw huan chng
Hi,I am beginner in Python. I have some questions on WMI Service in Python. I was able to use properties of Class Restore in WMI, but not able to use the method. Here is the sample code that I done, anyone can help me?import win32com.clientstrComputer = "."objWMIService = win32com.client.Dispatch("

Re: Wanted: Python module allowing direct access to raw sectors ofharddrives (MFT, boot sector, etc.) in MS Windows

2005-10-10 Thread sam
The following site contains my routines to access information from the Microsoft SCSIPASSTHROUGH layer under windows. These routines allow you to access the storage devices mounted under windows using SCSI commands. The dll that I provide will work with Python 2.3 http://starship.python.net/crew/s

Re: Send password over TCP connection

2005-10-10 Thread Michael Ströder
Dan Stromberg wrote: > On Mon, 10 Oct 2005 15:13:14 -0700, Paul Rubin wrote: >> >>Use SRP if you can. > > Where can I learn more about this? http://www.faqs.org/rfcs/rfc2945.html Ciao, Michael. -- http://mail.python.org/mailman/listinfo/python-list

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

2005-10-10 Thread Dave Hansen
On Mon, 10 Oct 2005 16:42:34 -0500, Terry Hancock <[EMAIL PROTECTED]> wrote: >On Sunday 09 October 2005 07:50 am, phil hunt wrote: >> On Fri, 7 Oct 2005 01:05:12 -0500, Terry Hancock <[EMAIL PROTECTED]> wrote: >> >GvR's syntax has the advantage of making grammatical sense in English (i.e. >> >read

Re: Works only in interactive mode

2005-10-10 Thread Sam Pointon
That looks like a different module named pcop getting in the way. If there's another pcop.py in the directory where you're running it as a script, then that gets priority and you'll end up with an error like the one you got. However, if you run it interactively, then that directory is not checked,

Re: convert char to byte representation

2005-10-10 Thread Larry Bates
I've always read it written that the number that is returned by ord(c) is the "decimal" (not hex, not octal) representation of the ASCII/UNICODE character that is stored in memory location pointed to by variable c. While the result is an integer (as it couldn't really be anything else), I believe

Re: Send password over TCP connection

2005-10-10 Thread Dan Stromberg
On Mon, 10 Oct 2005 15:13:14 -0700, Paul Rubin wrote: > "dcrespo" <[EMAIL PROTECTED]> writes: >> [quoted text muted] > > No. It's vulnerable to dictionary search. Use SRP if you can. Where can I learn more about this? Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: Wanted: Python module allowing direct access to raw sectors ofharddrives (MFT, boot sector, etc.) in MS Windows

2005-10-10 Thread Claudio Grondi
Thank you Jeff very much for your quick reply. It saved me really much time of digging in the wrong direction. <[EMAIL PROTECTED]> wrote in news:<[EMAIL PROTECTED]>... >> I took the advice from this web page: >> http://support.microsoft.com/kb/q100027/ Ok, I had found this page myself during Googl

RE: TurboGears slashdotted

2005-10-10 Thread Delaney, Timothy (Tim)
Grig Gheorghiu wrote: > "TurboGears: Python on Rails?" post: > > http://developers.slashdot.org/developers/05/10/10/0650207.shtml?tid=156 Actually, since the submitter used a coral URL (.nyud.net:8090) the TurboGears site survived remarkably well. Tim Delaney -- http://mail.python.org/mailman/

Re: Changing console text color

2005-10-10 Thread Larry Bates
You can use this module to control console windows background and text colors. http://www.effbot.org/zone/console-index.htm -Larry Bates Steve M wrote: > Hello, > > I've been trying to change the text color on a windows console > program I've been working on with no luck. I should menti

Re: Python's Performance

2005-10-10 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Mike Meyer <[EMAIL PROTECTED]> wrote: > Donn Cave <[EMAIL PROTECTED]> writes: > > I agree that there are many shades of grey here, but there's also a > > real black that's sharply distinct and easy to find -- real native > > code binaries are not interpreted. > >

Re: Python name lookups

2005-10-10 Thread jepler
On Mon, Oct 10, 2005 at 03:02:30PM -0700, Dave wrote: > Hello All, > > As far as I understand, Python deals with a lot of > string objects, i.e. it looks up all names. Is there a > way to find out how many name lookup operations take > place in a Python program? Is it the name lookup > operation o

Re: Question about StringIO

2005-10-10 Thread Diez B. Roggisch
> Thanks, Steve and Diez, for the replies. I didn't think it was > possible, but it was worth asking :-) > > I will try to explain my experience with popen() briefly. > > I have some sql scripts to create tables, indexes, procedures, etc. At > present there are about 50 scripts, but this number w

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-10 Thread DaveM
On Fri, 7 Oct 2005 15:57:14 -0500, Terry Hancock <[EMAIL PROTECTED]> wrote: >In a Texas dialect, "their" is construed to mean "singular third person >of indeterminate gender". It's considered rude to use "it" to apply to >a sentient, and "his or her" is "PC" (and therefore a great sin ;-) ). Work

Re: Wanted: Python module allowing direct access to raw sectors of harddrives (MFT, boot sector, etc.) in MS Windows

2005-10-10 Thread jepler
I took the advice from this web page: http://support.microsoft.com/kb/q100027/ (I don't know how this extends to floppies, and the 9x family of OSes isn't listed in "applies to", so this may not help your case) Here, I open "physical drive 0" and see that the magic number indicates a valid

Re: Python's Performance

2005-10-10 Thread Diez B. Roggisch
Mike Meyer wrote: > Donn Cave <[EMAIL PROTECTED]> writes: > >>I agree that there are many shades of grey here, but there's also a >>real black that's sharply distinct and easy to find -- real native >>code binaries are not interpreted. > > > Except when they are. Many machines are microcoded, wh

Re: Python's garbage collection was Re: Python reliability

2005-10-10 Thread Paul Rubin
Tom Anderson <[EMAIL PROTECTED]> writes: > Has anyone looked into using a real GC for python? I realise it would > be a lot more complexity in the interpreter itself, but it would be > faster, more reliable, and would reduce the complexity of extensions. The next PyPy sprint (this week I think) is

Re: Send password over TCP connection

2005-10-10 Thread dcrespo
> Sounds like it, but how is it different from what I just described? :) That's right, but I wanted to rewrite it... I was for confirm my recent acquired knowlegde :) With "alphanumeric" I meant the md5 hash (for example). -- http://mail.python.org/mailman/listinfo/python-list

Re: Send password over TCP connection

2005-10-10 Thread Paul Rubin
"dcrespo" <[EMAIL PROTECTED]> writes: > 3. Both Client and Server creates a hash string from > > 4. Client sends the hash string to the server > 5. Server compares his hash result with the hash string received from > de client. > > I think it is a very good solution, Isn't it? No. It's vulnerabl

Re: Learning Python

2005-10-10 Thread Jeff Fox
Lots of links to all levels of tutorials and documentation here: http://www.awaretek.com/plf.html Python Podcast too! -- http://mail.python.org/mailman/listinfo/python-list

Re: Send password over TCP connection

2005-10-10 Thread Paul Rubin
"dcrespo" <[EMAIL PROTECTED]> writes: > Hi. I found TSL, a Python Library that supports SRP. > Do you know where can I find a sample client and server code? Thanks > for your help. I don't know about TSL, but TLSLite (www.trevp.net/tlslite) supports SRP. -- http://mail.python.org/mailman/listinfo

Changing console text color

2005-10-10 Thread Steve M
Hello, I've been trying to change the text color on a windows console program I've been working on with no luck. I should mention that I'm a novice so please dummy up your replies. Thanks-in-Advance Steve -- http://mail.python.org/mailman/listinfo/python-list

Python name lookups

2005-10-10 Thread Dave
Hello All, As far as I understand, Python deals with a lot of string objects, i.e. it looks up all names. Is there a way to find out how many name lookup operations take place in a Python program? Is it the name lookup operation or hash operation that degrades performance? What function does Pytho

Re: Learning Python

2005-10-10 Thread Terry Hancock
On Monday 10 October 2005 11:50 am, Paul DiRezze wrote: > I'm spending the next two weeks off and I'm looking to take a crack at > learning how to program in Python. [...] > > I'm looking for additional resources (links, names of books, > whatever...) that you think may help me out. > > I'm a

Re: Send password over TCP connection

2005-10-10 Thread Dan Stromberg
On Mon, 10 Oct 2005 14:29:20 -0700, dcrespo wrote: > ¡Beautiful and elegant solution! > > Two copies of the password: one on the client, the other on the server. > > 1. Client wants to connect > 2. Server generates a random_alphanumeric_string and sends it to the > client > 3. Both Client and Se

Re: Send password over TCP connection

2005-10-10 Thread Tim Williams (gmail)
On 10 Oct 2005 13:31:51 -0700, dcrespo <[EMAIL PROTECTED]> wrote: > Hi. I found TSL, a Python Library that supports SRP. > Do you know where can I find a sample client and server code? Thanks > for your help. http://trevp.net/tlslite/ It comes with examples. I use it in several servers and clie

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

2005-10-10 Thread Terry Hancock
On Sunday 09 October 2005 07:50 am, phil hunt wrote: > On Fri, 7 Oct 2005 01:05:12 -0500, Terry Hancock <[EMAIL PROTECTED]> wrote: > >GvR's syntax has the advantage of making grammatical sense in English (i.e. > >reading it as written pretty much makes sense). > > I know, let's re-write Python to

Re: how to check if file is in use?

2005-10-10 Thread Micah Elliott
On Oct 10, Stefan Siegel wrote: > can anybody give me (a python newbie) give a hint how to check in > python wether a file is in use by another program? This was previously discussed on c.l.py. In short, "you can't". A detailed answer is in this thread: http://mail.python.org/pipermail/python-l

Re: Send password over TCP connection

2005-10-10 Thread dcrespo
¡Beautiful and elegant solution! Two copies of the password: one on the client, the other on the server. 1. Client wants to connect 2. Server generates a random_alphanumeric_string and sends it to the client 3. Both Client and Server creates a hash string from 4. Client sends the hash string to

Wanted: Python module allowing direct access to raw sectors of harddrives (MFT, boot sector, etc.) in MS Windows

2005-10-10 Thread Claudio Grondi
Googling for keywords like "direct access sector harddrive Python module Windows" seems to give no useful results. Any hints(best if cross-platform)? Claudio -- http://mail.python.org/mailman/listinfo/python-list

Works only in interactive mode

2005-10-10 Thread qwweeeit
Hi all, using Python 2.4 under Linux (SUSE 9.3) I was developping a script to get various lists related with DCOP. In interactive Python all is working correctly: import pcop # application's registration with DCOP x=pcop.register_as('kate') print x kate-7497 # list of DCOP registered applica

Re: Creating internet shortcuts

2005-10-10 Thread Richard Townsend
On Sun, 9 Oct 2005 23:08:45 -0400, Roger Upole wrote: > Pythoncom doesn't directly support the necessary interfaces, > but you can use the Shell COM interfaces to create them. > > import win32com.client > wsh=win32com.client.gencache.EnsureDispatch('wscript.shell') > s=wsh.CreateShortcut('c:\\pyt

Re: When someone from Britain speaks, Americans hear a "Britishaccent"...

2005-10-10 Thread Terry Hancock
On Saturday 08 October 2005 09:29 am, Duncan Smith wrote: > Yes, although I'm not actually sure where the 'royal we' comes from; I have heard the explanation, that the "royal we" refers to two people, the office of the monarch being one, and the person of the monarch being the other. But I only r

Re: Python's Performance

2005-10-10 Thread Terry Hancock
On Saturday 08 October 2005 01:54 pm, Fredrik Lundh wrote: > Dave wrote: > > Yes, I would like to know how many internal string operations are done > > inside > > the Python interpreter. > > when you're doing what? > > how do you define "internal string operations", btw? He's got to be talking

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-10 Thread Terry Hancock
On Friday 07 October 2005 05:28 pm, Grant Edwards wrote: > Cool. While we're on the topic, has anybody else noticed that > "guys" is acceptible and commonly used to refer to a group of > women, Yeah, though it depends on where you are. > but the singular "guy" is never used to refer to a > sing

Re: non descriptive error

2005-10-10 Thread Terry Hancock
On Sunday 09 October 2005 06:12 pm, Timothy Smith wrote: > Terry Hancock wrote: > >By looking at the source code for DutyShift.py? > > > well DUH thank you captain obvious! Well, since you apparently missed the subtlety, you DID NOT GIVE ADEQUATE INFORMATION if you expected to get some kind of a

Re: Python reliability

2005-10-10 Thread Thomas Bartkus
"Ville Voipio" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > In article <[EMAIL PROTECTED]>, Paul Rubin wrote: > I would need to make some high-reliability software > running on Linux in an embedded system. Performance > (or lack of it) is not an issue, reliability is. > The soft

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-10 Thread Terry Hancock
On Saturday 08 October 2005 04:35 am, Steve Holden wrote: > I must have been working at NASA at the time; they are well known for > embiggening prices. Not nearly as much as the DoD, from what I hear. Truthfully, I think those stories are bit exaggerated -- I think the real problem is somebody m

how to check if file is in use?

2005-10-10 Thread Stefan Siegel
Hi all, can anybody give me (a python newbie) give a hint how to check in python wether a file is in use by another program? Thanks for your effort, Stefan -- http://mail.python.org/mailman/listinfo/python-list

Re: Learning Python

2005-10-10 Thread gene tani
This should be good for a couple weeks http://www.awaretek.com/tutorials.html http://www.rexx.com/~dkuhlman/python_101/python_101.html http://www.rexx.com/~dkuhlman/python_201/python_201.html http://www.ibiblio.org/obp/py4fun/ http://the.taoofmac.com/space/Python/Grimoire http://mail.python.org/p

Re: how to capture key pressing

2005-10-10 Thread billie
> Look at curses. I was searching for something portable on multiple platforms. Curses doesn't work on Windows. -- http://mail.python.org/mailman/listinfo/python-list

Re: Send password over TCP connection

2005-10-10 Thread Dan Stromberg
On Mon, 10 Oct 2005 08:06:27 -0700, dcrespo wrote: > Hi all, > > I have a program that serves client programs. The server has a login > password, which has to be used by each client for logging in. So, when > the client connects, it sends a string with a password, which is then > validated on the

Re: Send password over TCP connection

2005-10-10 Thread dcrespo
Hi. I found TSL, a Python Library that supports SRP. Do you know where can I find a sample client and server code? Thanks for your help. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's garbage collection was Re: Python reliability

2005-10-10 Thread Mike Meyer
Tom Anderson <[EMAIL PROTECTED]> writes: > Has anyone looked into using a real GC for python? I realise it would > be a lot more complexity in the interpreter itself, but it would be > faster, more reliable, and would reduce the complexity of extensions. > > Hmm. Maybe it wouldn't make extensions e

Re: rrdtool?

2005-10-10 Thread Grig Gheorghiu
By sheer coincidence I was looking into the same thing today. I just downloaded the latest rrdtool release (rrdtool-1.2.11) and I noticed a /bindings/python subdirectory. I haven't played with it yet, as I still need to install tons of prerequisites before I can build rrdtool. Grig -- http://mai

Re: Jargons of Info Tech industry

2005-10-10 Thread Roedy Green
On Sun, 09 Oct 2005 19:07:42 -0400, Mike Meyer <[EMAIL PROTECTED]> wrote or quoted : > >HTML is a problem on *other* peoples crappy software as well. It >wasn't designed to carry code content, but has been hacked up to do >that. It seems to me it goes without saying that you cannot trust code fro

Re: Library functions

2005-10-10 Thread Grant Edwards
On 2005-10-10, Tuvas <[EMAIL PROTECTED]> wrote: > I am writing a program that mimics a program written in C, but using > Python-supiorior techniques. The C program calles a library function, > non-open source, I only know that it sends it a command > LINUX_CAN_Open() as for a few others as well.

  1   2   3   >