Re: Send password over TCP connection

2005-10-11 Thread Laszlo Zsolt Nagy
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 Server creates a hash string from > >4. Client

Re: Batteries Included?

2005-10-11 Thread Mike Meyer
"Alex" <[EMAIL PROTECTED]> writes: > 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

Re: Send password over TCP connection

2005-10-11 Thread Laszlo Zsolt Nagy
>Ignoring all the other issues, any solution which actually requires the >password to be stored on the server is a bad solution. Administrators >should not have access to user passwords, and in addition users should >not be put in the position of having to trust your server-side security >to

Re: Batteries Included?

2005-10-11 Thread Paul Rubin
Sybren Stuvel <[EMAIL PROTECTED]> writes: > > I might be wrong expecting that a language whose moto is "Batteries > > Included" would be able to produce exe files. > > Indeed, you're wrong. Why would such an ability be included in Python? distutils.exe, included in Python, in fact does have the a

Re: Let My Terminal Go

2005-10-11 Thread Mike Meyer
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > 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

Re: Batteries Included?

2005-10-11 Thread Michele Simionato
Mike Meyer: > After you create a setup.py file for you program, doing > > "python setup.py bdist --formats=wininst" > > should do the trick. > > Of course, I don't own a Windows box, so I can't check it, but when I > ask a setup file for help on formats, it tells me the wininst format > is

Re: Send password over TCP connection

2005-10-11 Thread Laszlo Zsolt Nagy
>If you really want to do it right, use SRP, . > > This is a bit offtopic here. I read the RFC and I do not see why SRP is not vulnerable to dictionary attacks. If I have a working client software then I can use it to reveal passwords. Isn't it a dictionary attack? Can

LINDA WEST (925) 876-7441 of CHIPMAN UNITED VAN LINES likes to commit Fraud & Forgery and she likes to put peoples names on moving contracts with out there Knowledge.Caton Mayflower Moving & Storage D

2005-10-11 Thread Vulvazb
LINDA WEST (925) 876-7441 of CHIPMAN UNITED VAN LINES likes to commit Fraud & Forgery and she likes to put peoples names on moving contracts with out there Knowledge.Caton Mayflower Moving & Storage Dublin,ca & concord,ca (925) 876-7441, 925-887-5515, 925-825-5000, 800-825-3866,800-447-9771, 925-60

Re: Batteries Included?

2005-10-11 Thread Marco Aschwanden
> I might be wrong expecting that a language whose > moto is "Batteries Included" would be able to produce exe files. Are > there plans to do this in the future version of Python? Yes, you are wrong expecting that. Creating an exe-cutable is windows specific and python _tries_ to be platform neu

Re: Send password over TCP connection

2005-10-11 Thread Paul Rubin
Laszlo Zsolt Nagy <[EMAIL PROTECTED]> writes: > This is a bit offtopic here. I read the RFC and I do not see why SRP > is not vulnerable to dictionary attacks. > If I have a working client software then I can use it to reveal > passwords. Isn't it a dictionary attack? Dictionary attack in this con

Re: Question about StringIO

2005-10-11 Thread Frank Millman
Benjamin Niemann wrote: > Frank Millman wrote: > > > I will try to explain my experience with popen() briefly. > > > > I run through all the scripts and create a StringIO object with the > > string I want to pass. It is about 250 000 bytes long. If I run psql > > using popen(), and pass it the stri

Re: Question about StringIO

2005-10-11 Thread Frank Millman
Diez B. Roggisch wrote: > > 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

Re: Let My Terminal Go

2005-10-11 Thread en.karpachov
On 10 Oct 2005 22:58:08 -0700 [EMAIL PROTECTED] wrote: > How do I implement this in my application written in python? Google for "python daemonize". -- jk -- http://mail.python.org/mailman/listinfo/python-list

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

2005-10-11 Thread Antoon Pardon
Op 2005-10-10, Terry Hancock schreef <[EMAIL PROTECTED]>: > 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 p

mod_python

2005-10-11 Thread Python_it
Today I was busy to install mod_python. I have put the line LoadModule python_module libexec/mod_python.so into the httpd.conf file. It Works! Apache load mod_python /3.2.2.b Python2.4 But my problem is where I have to place te following code in de httpd.conf? AddHandler mod_pytho

Re: Send password over TCP connection

2005-10-11 Thread Laszlo Zsolt Nagy
Paul Rubin wrote: >Laszlo Zsolt Nagy <[EMAIL PROTECTED]> writes: > > >>This is a bit offtopic here. I read the RFC and I do not see why SRP >>is not vulnerable to dictionary attacks. >>If I have a working client software then I can use it to reveal >>passwords. Isn't it a dictionary attack? >>

Re: mod_python

2005-10-11 Thread deelan
Python_it wrote: (...) > But my problem is where I have to place te following code in de > httpd.conf? > > > AddHandler mod_python .py > PythonHandler mptest > PythonDebug On > > > Because al the tutorials write this. But where? try put it at the end of your htt

Re: Question about StringIO

2005-10-11 Thread Diez B. Roggisch
> Thanks for this pointer. I have read it, but I don't think it applies > to my situation, as it talks about 'reading' from the child's stdout > while the child is 'writing' to stderr. But that is exactly the point: the psql blocks because you don't read away the buffered data. Start a thread, re

SOAPpy, WSDL, non-standard types and my graying hair

2005-10-11 Thread Miki Tebeka
Hello, I'm trying to use SOAPpy with WSDL (talking to http://www.seapine.com/ttpro.html). proxy.show_methods for getRecordListForTable is: Method Name: getRecordListForTable In #0: cookie ((u'http://www.w3.org/2001/XMLSchema', u'long')) In #1: tablename ((u'http://www.w3.org/2001/XMLSc

Re: Question about StringIO

2005-10-11 Thread Diez B. Roggisch
> My scripts are used to create the tables in the database. I didn't > think that DB-API covered that. The DB-Api covers executin arbirary SQL - either DDL or DML. It is surely centered around DML, but that doesn't mean that its not usabel to issue "create ..." statements. >However, even if i

Re: mod_python

2005-10-11 Thread Python_it
Thanks for your replay. I put the handler code at the end of the file. No error! But if I go to my localhost\project\mptest.py The code of my function appears. I solve this by put the following code in the confige file: AllowOverride FileInfo -- http://mail.python.org/mailman/listinfo/python-l

Re: Question about StringIO

2005-10-11 Thread Frank Millman
Diez B. Roggisch wrote: > > Thanks for this pointer. I have read it, but I don't think it applies > > to my situation, as it talks about 'reading' from the child's stdout > > while the child is 'writing' to stderr. > > But that is exactly the point: the psql blocks because you don't read > away th

Re: Looking for info on Python's memory allocation

2005-10-11 Thread Lasse Vågsæther Karlsen
Sybren Stuvel wrote: > 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 > If, on the other hand, you double the memory every time you run out, > you have to copy much

Re: Learning Python

2005-10-11 Thread Chris Dewin
On Mon, 10 Oct 2005 17:20:35 +, dannypatterso wrote: [snip] >> I'm a hobby programmer using mostly BASIC(s) and some Java. I know >> procedural programming and I know what encapsulation, inheritance and >> polymorphism are but I have very little experience in using them as >> I've written ju

Re: Question about StringIO

2005-10-11 Thread Frank Millman
Diez B. Roggisch wrote: > > My scripts are used to create the tables in the database. I didn't > > think that DB-API covered that. > > The DB-Api covers executin arbirary SQL - either DDL or DML. It is > surely centered around DML, but that doesn't mean that its not usabel to > issue "create ..."

A faster shutil.rmtree or maybe a command.

2005-10-11 Thread martijn
H! Sometimes I must delete 2 very big directory's. The directory's have a very large tree with much small file's in it. So I use shutil.rmtree() But its to slow. Is there a faster method ? I use FreeBsd 5.4. --- is it maybe faster to walking in the directy en delete each file? Thanks, GC-Mart

Re: Learning Python

2005-10-11 Thread Paul Rubin
"Chris Dewin" <[EMAIL PROTECTED]> writes: > There was an excellent such primer on devshed, by Icarus, but they appear > to have taken it down. > > I saved a copy of it to my HD. Would there be anything morally, or legally > wrong with me uploading it to my site? A little googling shows it's still

Re: A faster shutil.rmtree or maybe a command.

2005-10-11 Thread Giovanni Bajo
[EMAIL PROTECTED] wrote: > Sometimes I must delete 2 very big directory's. > The directory's have a very large tree with much small file's in it. > > So I use shutil.rmtree() > But its to slow. > > Is there a faster method ? Is os.system("rm -rf %s" % directory_name) much faster? -- Giovanni Ba

A problem while using urllib

2005-10-11 Thread Johnny Lee
Hi, I was using urllib to grab urls from web. here is the work flow of my program: 1. Get base url and max number of urls from user 2. Call filter to validate the base url 3. Read the source of the base url and grab all the urls from "href" property of "a" tag 4. Call filter to validate every u

Idle bytecode query on apparently unreachable returns

2005-10-11 Thread sxanth
>What puzzles me, though, are bytecodes 17, 39 and 42 - surely these aren't >reachable? Does the compiler just throw in a default 'return None' >epilogue, with routes there from every code path, even when it's not >needed? If so, why? Hi. pyc (http://freshmeat.net/projects/pyc) can already rem

Re: Batteries Included?

2005-10-11 Thread en.karpachov
On 11 Oct 2005 00:10:01 -0700 Paul Rubin wrote: > Personally I think including a .exe packager in Python would be a > great idea. As a Linux user I can't easily run Windows-specific > utilities like Inno Setup. So I don't have a good way to make .exe's > from my Python code that Windows users ca

Re: A faster shutil.rmtree or maybe a command.

2005-10-11 Thread martijn
A little. I think its yust to big to handle it. I'm going to ask it in a freebsd forum, maybe they know how to speed up. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: mod_python

2005-10-11 Thread Peter
deelan wrote: >Python_it wrote: >(...) > > >>But my problem is where I have to place te following code in de >>httpd.conf? >> >> >>AddHandler mod_python .py >>PythonHandler mptest >>PythonDebug On >> >> >>Because al the tutorials write this. But where? >> >> >

strange import error with Python-2.4.1

2005-10-11 Thread Robin Becker
Whilst testing the excellent xlrd http://www.python.org/pypi/xlrd/0.3a1 I came across the following strangeness when trying to add an import of os to assist with debugging/tracing. At line 66 I replaced import sys with import sys, os and then ran python runxlrd.py --help and got this error wh

Re: Looking for info on Python's memory allocation

2005-10-11 Thread Peter Otten
Lasse Vågsæther Karlsen wrote: > If I have a generator or other iterable producing a vast number of > items, and use it like this: > > s = [k for k in iterable] > > if I know beforehand how many items iterable would possibly yield, would > a construct like this be faster and "use" less memory? >

Re: Batteries Included?

2005-10-11 Thread Paul Rubin
<[EMAIL PROTECTED]> writes: > Because you can't run it yourself? If you cannot run the > freshly-made exe yourself, why would you want to distrubute it, > without even trying? But if you can, then you can run the InnoSetup > as well. Obviously I'd want someone to test the .exe before putting it in

Re: Let My Terminal Go

2005-10-11 Thread Mystilleef
Hello, Thank you. That's all I needed. For some reason, I had always assumed forking was an expensive process. I guess I was ill-informed. -- http://mail.python.org/mailman/listinfo/python-list

Re: Let My Terminal Go

2005-10-11 Thread Mystilleef
Hello, Thanks to all the responders and helpers on the group. I'm learning everyday. Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: strange import error with Python-2.4.1

2005-10-11 Thread Steve Holden
Robin Becker wrote: > Whilst testing the excellent xlrd http://www.python.org/pypi/xlrd/0.3a1 > I came across the following strangeness when trying to add an import of os to > assist with debugging/tracing. > > > At line 66 I replaced > > import sys > > with import sys, os > > and then ran py

Re: strange import error with Python-2.4.1

2005-10-11 Thread Fredrik Lundh
Steve Holden wrote: > Can I ask if you are specifying a source encoding in your file with a > pragma (?) like > > # -*- coding: iso-8859-15 -*- > > I've noticed what appear to be spurious syntax errors from time to time > on such files, and have been attempting to debug the problem for some > time

Re: strange import error with Python-2.4.1

2005-10-11 Thread Richard Brodie
"Robin Becker" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > This behaviour doesn't occur with 2.4.2 or 2.4 only with 2.4.1. I looked for > some bug fix in the recently released 2.4.2 that related, but couldn't find > anything obvious. One of the various codecs fixes, I think. Bu

Re: Idle bytecode query on apparently unreachable returns

2005-10-11 Thread Raymond Hettinger
[Tom Anderson]: > What puzzles me, though, are bytecodes 17, 39 and 42 - surely these aren't > reachable? Does the compiler just throw in a default 'return None' > epilogue, with routes there from every code path, even when it's not > needed? If so, why? Since unreachable code is never executed, t

Re: Python's Performance

2005-10-11 Thread Peter Hansen
Steve Holden wrote: > And we definitely need "agile" in there. Bugger, I'll go out and come in > again ... Used in the same breath as the word "bugger", I'm not sure the phrase "go out and come in again" is entirely appropriate for a family forum. ;-) But I'm also not sure I ought to post that

Re: Merging sorted lists/iterators/generators into one stream of values...

2005-10-11 Thread Lasse Vågsæther Karlsen
Another idea for this method would be that in some cases I noticed that it was useful to know which source each element would come from as well, as well as removing duplicates from the results. For instance s1 = [1, 3, 5, 7] s2 = [2, 3, 4] for k, s in merge_by_sort(s1, s2): print k, "fr

Re: Send password over TCP connection

2005-10-11 Thread Peter Hansen
Laszlo Zsolt Nagy wrote: > Peter Hansen wrote: >> Ignoring all the other issues, any solution which actually requires >> the password to be stored on the server is a bad solution. >> Administrators should not have access to user passwords, and in >> addition users should not be put in the posi

Re: Python's Performance

2005-10-11 Thread Peter Hansen
Peter Hansen wrote: > But I'm also not sure I ought to post that to the group, so I'll spare > them and just inflict the thought on you! Or, maybe I'll just fail to trim the newsgroup line and accidentally post to the group anyway. Yes, that's just what I'll do. Sorry folks. :-) -Peter -- ht

Re: strange import error with Python-2.4.1

2005-10-11 Thread Steve Holden
Fredrik Lundh wrote: > Steve Holden wrote: > > >>Can I ask if you are specifying a source encoding in your file with a >>pragma (?) like >> >># -*- coding: iso-8859-15 -*- >> >>I've noticed what appear to be spurious syntax errors from time to time >>on such files, and have been attempting to deb

Re: subprocess and non-blocking IO (again)

2005-10-11 Thread Nick Craig-Wood
Marc Carter <[EMAIL PROTECTED]> wrote: > import subprocess,select,sys > > speakers=[] > lProc=[] > > for machine in ['box1','box2','box3']: > p = subprocess.Popen( ('echo '+machine+';sleep 2;echo goodbye;sleep > 2;echo cruel;sleep 2;echo world'), stdout=subprocess.PIPE, > stderr=sub

Re: subprocess and non-blocking IO (again)

2005-10-11 Thread Marc Carter
Donn Cave wrote: > If you want to use select(), don't use the fileobject > functions. Use os.read() to read data from the pipe's file > descriptor (p.stdout.fileno().) This is how you avoid the > buffering. Thankyou, this works perfectly. I figured it would be something simple. Marc -- http://m

How to do *args, **kwargs properly

2005-10-11 Thread Lasse Vågsæther Karlsen
I must be missing something but what is the proper way to do a function using such arguments ? Specifically I'm looking for: - ability to take an unspecified number of "positional arguments" - ability to take optional named arguments that follows the first arguments - raise appropriate errors if

Re: A problem while using urllib

2005-10-11 Thread Alex Martelli
Johnny Lee <[EMAIL PROTECTED]> wrote: ... >try: > webPage = urllib2.urlopen(url) >except urllib2.URLError: ... >webPage.close() >return True > > >But every time when I ran to the 70 to 75 urls (that means 70-75 >

Re: How to do *args, **kwargs properly

2005-10-11 Thread Paul Rubin
Lasse Vågsæther Karlsen <[EMAIL PROTECTED]> writes: > or is the "proper python" way simply this: > > def fn(*values, **options): > if "cmp" in options: comparison = options["cmp"] > else: comparison = cmp > # rest of function here > > and thus ignoring the wrong parameter names? I

Re: How to do *args, **kwargs properly

2005-10-11 Thread Alex Martelli
Lasse Vågsæther Karlsen <[EMAIL PROTECTED]> wrote: ... > fn(1, 2, 3) > fn(1, 2, 3, cmp=lambda x, y: y-x) > fn(1, 2, 3, cpm=lambda x, y: y-x) # TypeError on this I assume these are your specs. > or is the "proper python" way simply this: > > def fn(*values, **options): > if "cmp" in optio

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

2005-10-11 Thread Claudio Grondi
Thank you for your reply, even if currently not that interesting for me because after the first CD writer for IDE were available I stopped to use SCSI and didn't come back to it since then. Does the Python open() command not work the same way for SCSI drives as for IDE or USB drives (I can't try i

Re: Let My Terminal Go

2005-10-11 Thread Ivan Voras
Mike Meyer wrote: > The easy way to do all these things - from C, anyway - is with > daemon(3). That isn't wrapped as part of the Python library. The > easiest way to solve your problem may be write a wrapper for that > call. If daemon exists on enough systems, submitting your wrapper as a > patch

XMS .NET: IBM Message Service Client for .NET Beta

2005-10-11 Thread rungta
IronPython and Boo developers may find this interesting: The second refresh of the IBM Message Service Client for .NET Beta is now available: http://www14.software.ibm.com/webapp/download/search.jsp?go=y&rs=message The key enhancements in this refresh are: - The supported messaging environments

Re: How to do *args, **kwargs properly

2005-10-11 Thread Max M
Lasse Vågsæther Karlsen wrote: > I must be missing something but what is the proper way to do a function > using such arguments ? > - ability to take an unspecified number of "positional arguments" You should probably pass a sequence to the method instead. You can do it the other way, but it's

datetime and daylight savings problem

2005-10-11 Thread James
I need to import a bunch of data into our database for which there's a single entry each day which occurs at the same time every day in local time - so I need to convert this to UTC taking into account local daylight savings. However daylight savings just don't seem to be working at all... Python

Re: How to do *args, **kwargs properly

2005-10-11 Thread Lasse Vågsæther Karlsen
Max M wrote: > Lasse Vågsæther Karlsen wrote: > >> I must be missing something but what is the proper way to do a >> function using such arguments ? > > >> - ability to take an unspecified number of "positional arguments" > > > You should probably pass a sequence to the method instead. You ca

Re: Comparing lists

2005-10-11 Thread Scott David Daniels
Christian Stapfer wrote: > "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 P

Re: Send password over TCP connection

2005-10-11 Thread dcrespo
then, what you proppose? -- http://mail.python.org/mailman/listinfo/python-list

Python Doc Problem Example: sort() (reprise)

2005-10-11 Thread Xah Lee
Python Doc Problem Example: sort() Xah Lee, 200503 Exhibit: Incompletion & Imprecision Python doc “3.6.4 Mutable Sequence Types” at http://python.org/doc/2.4/lib/typesseq-mutable.html in which contains the documentation of the “sort” method of a list. Quote: « Operation Result Notes s.so

Where is the error

2005-10-11 Thread enas khalil
hello, when i run the following code to Read and tokenize data from a tagged text as follows : from nltk.corpus import brownfrom nltk.tagger import TaggedTokenizerfrom nltk.tokenizer import *tagged_txt_str=open('corpus.txt' ).read()tagged_txt_token=Token(TEXT=tagged_txt_str)TaggedTokenizer.token

Re: Function decorator that caches function results

2005-10-11 Thread Piet van Oostrum
> Paul Rubin (PR) wrote: >PR> Tom Anderson <[EMAIL PROTECTED]> writes: >PR> That's misleading, I'd say a closure is a combination of a function >PR> (executable code) and a lexical environment [snip] >PR> This is all described in SICP (mitpress.mit.edu/sicp). Wh

python server?

2005-10-11 Thread Francesco Marchetti-Stasi
Hello everybody, I am the happy yet unsatisfied owner of an ipaq 3760. I am writing a python+pygtk editor optimized for an handheld, and in the future I'd like to write more applications (to-do-list and agenda are on top of my priorities, since the existing ones don't fit my needs). I was now thi

RE: WMI - Restore Setting in Python

2005-10-11 Thread Tim Golden
[saw huan chng] > 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? [... snip code ...] OK, I don't actually use XP (and the

Re: Python's Performance

2005-10-11 Thread Piet van Oostrum
> Terry Hancock <[EMAIL PROTECTED]> (TH) wrote: >TH> He's got to be talking about runtime name-binding. In >TH> other words, when you refer to: >TH> a.spam >TH> the Python interpreter actually knows you labeled that attribute 'spam', >TH> and the string is stored in a.__dict__ , so you can

Re: Function decorator that caches function results

2005-10-11 Thread Fredrik Lundh
Tom Anderson wrote: > Okay, a crack at a definition: a closure is a function in which some of > the variable names refer to variables outside the function. And i don't > mean global variables - i mean somebody else's locals; call them 'remote > variables'. in Python, the global variables are some

win32com, generating the cache programaticaly?

2005-10-11 Thread Andrew Markebo
Hello! I am messing around with communicating between LabVIEW and Python, got it to work by a small 'fix' (grabbing the generated file, and importing it by hand) What I might want to do, is to automatically generate the data done by executing makepy.py and run by it. What I select in makepy.py

Re: Learning Python

2005-10-11 Thread Paul DiRezze
These are all great suggestions. Thanks to all who replied. paul -- http://mail.python.org/mailman/listinfo/python-list

Re: Merging sorted lists/iterators/generators into one stream of values...

2005-10-11 Thread Lasse Vågsæther Karlsen
Lasse Vågsæther Karlsen wrote: > > > Another idea for this method would be that in some cases I noticed that > it was useful to know which source each element would come from as well, > as well as removing duplicates from the results. > The "removing duplicates" problem would probably be bes

Re: How to do *args, **kwargs properly

2005-10-11 Thread George Sakkis
"Lasse Vågsæther Karlsen" <[EMAIL PROTECTED]> wrote: > So what you're saying is that instead of: > > def fn(*values, **options): > > I should use: > > def fn(values, cmp=cmp): > > in this specific case? > > and then instead of: > > fn(1, 2, 3, cmp=...) > > this: > > fn([1, 2, 3], cmp=...) > > > >

Re: Python's Performance

2005-10-11 Thread Steven D'Aprano
On Mon, 10 Oct 2005 16:47:35 -0700, Paul Boddie wrote: >> The difficulty is that the target architecture in not realized in hardware. > > Or isn't perhaps feasible/viable for hardware realisation: one of the > EuroPython speakers dangled the promise of hardware support for > high-level languages

Re: How to do *args, **kwargs properly

2005-10-11 Thread Lasse Vågsæther Karlsen
George Sakkis wrote: > "Lasse Vågsæther Karlsen" <[EMAIL PROTECTED]> wrote: >>I think I'll re-write to use a list instead > > > Actually in most cases you don't need to assume it's a list; any > iterable is usually good enough. You can always turn it into a list (or > a tuple or a set or..) in t

REMINDER: BayPIGgies: October 13, 7:30pm (IronPort)

2005-10-11 Thread Aahz
The next meeting of BayPIGgies will be Thurs, October 13 at 7:30pm at IronPort. Tim Thompson will describe and demonstrate the interaction between Burning Man and Python using two applications, Radio Free Quasar and Ergo. BayPIGgies meetings alternate between IronPort (San Bruno, California) and

Re: Learning Python

2005-10-11 Thread Steven D'Aprano
On Tue, 11 Oct 2005 18:26:58 +0900, Chris Dewin wrote: > On Mon, 10 Oct 2005 17:20:35 +, dannypatterso wrote: > > [snip] > >>> I'm a hobby programmer using mostly BASIC(s) and some Java. I know >>> procedural programming and I know what encapsulation, inheritance and >>> polymorphism are bu

Re: Merging sorted lists/iterators/generators into one stream of values...

2005-10-11 Thread George Sakkis
> Function name is perhaps not the best one. It occurs to me that this > is the GROUP BY in SQL so perhaps a different name is better, but > then again this might be moot if such a already exists somewhere :) Amazing, you keep reinventing things, even with the exact same name :) from itertools im

Re: Python's Performance

2005-10-11 Thread Charles Krug
On Mon, 10 Oct 2005 11:21:18 -0700, Donn Cave <[EMAIL PROTECTED]> wrote: >> Iron- >> Python). is it still an interpreter if it generates machine code? > > Is what an interpreter? > > I am not very well acquainted with these technologies, but it sounds > like variations on the implementation of a

Re: Merging sorted lists/iterators/generators into one stream of values...

2005-10-11 Thread Lasse Vågsæther Karlsen
George Sakkis wrote: >>Function name is perhaps not the best one. It occurs to me that this >>is the GROUP BY in SQL so perhaps a different name is better, but >>then again this might be moot if such a already exists somewhere :) > > > Amazing, you keep reinventing things, even with the exact sam

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

2005-10-11 Thread Charles Krug
On Mon, 10 Oct 2005 15:46:34 -0500, Terry Hancock <[EMAIL PROTECTED]> wrote: > 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. > > Truthf

HELP: Searching File Manager written in Python

2005-10-11 Thread anton
Hi, I am googeling some hours now ... still without result. So I have a question: Does somebody know a filemanager: - which looks like Norton Commander/7-Zip Filemanager - where I can add python scripts which I can execute on a selected file I already looked at wxpyatol but its not what

Can module access global from __main__?

2005-10-11 Thread Neal Becker
Suppose I have a main program, e.g., A.py. In A.py we have: X = 2 import B Now B is a module B.py. In B, how can we access the value of X? -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for info on Python's memory allocation

2005-10-11 Thread Steven D'Aprano
On Tue, 11 Oct 2005 11:22:39 +0200, Lasse Vågsæther Karlsen wrote: > This begs a different question along the same lines. Er, no it doesn't. "Begs the question" does _not_ mean "asks the question" or "suggests the question". It means "assumes the truth of that which needs to be proven". http://e

Re: date reformatting

2005-10-11 Thread Magnus Lycka
Bell, Kevin wrote: > Anyone aware of existing code to turn a date string "8-15-05" into the > number 20050815? >>> import datetime >>> s = "8-15-05" >>> month,day,year = map(int, s.split('-')) >>> date = datetime.date(2000+year,month,day) >>> date.strftime('%Y%m%d') '20050815' Of course, if

Re: How to do *args, **kwargs properly

2005-10-11 Thread Max M
Lasse Vågsæther Karlsen wrote: > Max M wrote: > So what you're saying is that instead of: > > def fn(*values, **options): > > I should use: > > def fn(values, cmp=cmp): > > in this specific case? > > and then instead of: > > fn(1, 2, 3, cmp=...) > > this: > > fn([1, 2, 3], cmp=...) Precis

Re: strange import error with Python-2.4.1

2005-10-11 Thread Robin Becker
Fredrik Lundh wrote: > Steve Holden wrote: > > >>Can I ask if you are specifying a source encoding in your file with a >>pragma (?) like >> >># -*- coding: iso-8859-15 -*- >> >>I've noticed what appear to be spurious syntax errors from time to time >>on such files, and have been attempting to deb

how to(can we ?) pass argument to .py script ?

2005-10-11 Thread quiteblack
howdy~ i wrote a .py file and it works fine, my goal is to pass argument to that py file when it get executed, and accept that argument within py file, eg. i prefer a command like below: python test.py -t and then, i may get "-t" within test.py for later use. i have no ideas how to do and i'm r

ANN: Kamaelia 0.3.0 released!

2005-10-11 Thread Michael Sparks
Kamaelia 0.3.0 has been released! Introduction Kamaelia is a networking/communications infrastructure for innovative multimedia systems. Kamaelia uses a component architecture designed to simplify creation and testing of new protocols and large scale media delivery systems. A subset

Re: Can module access global from __main__?

2005-10-11 Thread Steve Holden
Neal Becker wrote: > Suppose I have a main program, e.g., A.py. In A.py we have: > > X = 2 > import B > > Now B is a module B.py. In B, how can we access the value of X? > > Without trying in any way to dodge the question, why do you want to do that? There's a property of software called "co

Re: how to(can we ?) pass argument to .py script ?

2005-10-11 Thread Simon Brunning
On 11 Oct 2005 07:07:44 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > i wrote a .py file and it works fine, my goal is to pass argument to > that py file when it get executed, and accept that argument within py > file, eg. i prefer a command like below: > > python test.py -t > > and then, i

how to execute .exe file ?

2005-10-11 Thread quiteblack
hi all~ i used to drive .exe file working by writing a simple batch file, i thin python may do this as well bu i dunno how to, any help ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Jargons of Info Tech industry

2005-10-11 Thread axel
In comp.lang.perl.misc Roedy Green <[EMAIL PROTECTED]> wrote: >>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 from > strangers, espec

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

2005-10-11 Thread Grant Edwards
On 2005-10-10, Terry Hancock <[EMAIL PROTECTED]> 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 s

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

2005-10-11 Thread Grant Edwards
On 2005-10-10, Terry Hancock <[EMAIL PROTECTED]> 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. I assumed you could tell that from my accent. :) >>

Re: how to(can we ?) pass argument to .py script ?

2005-10-11 Thread Giovanni Dall'Olio
[EMAIL PROTECTED] wrote: > howdy~ > > i wrote a .py file and it works fine, my goal is to pass argument to > that py file when it get executed, and accept that argument within py > file, eg. i prefer a command like below: > > python test.py -t > > and then, i may get "-t" within test.py for late

Re: Can module access global from __main__?

2005-10-11 Thread Neal Becker
Everything you said is absolutely correct. I was being lazy. I had a main program in module, and wanted to reorganize it, putting most of it into a new module. Being python, it actually only took a small effort to fix this properly, so that in B.py, what were global variables are now passed as a

Re: Send password over TCP connection

2005-10-11 Thread Laszlo Zsolt Nagy
>If you're saying that people have no choice but to trust that their >passwords, stored in the clear on the server of some idiot who didn't >know better, are safe from casual administrator observation and safe >from hackers stealing the password file, then you shouldn't be allowed >anywhere ne

Re: Python reliability

2005-10-11 Thread John Waycott
Ville Voipio wrote: > 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. I agree - design of the application, keeping it simple and testing it thoroughly is more important for reliabili

Re: how to(can we ?) pass argument to .py script ?

2005-10-11 Thread quiteblack
hey i got it ! tks guys ! -- http://mail.python.org/mailman/listinfo/python-list

Re: Best way to share a python list of objects

2005-10-11 Thread Magnus Lycka
kyle.tk wrote: > So I have a central list of python objects that I want to be able to > share between different process that are possibly on different > computers on the network. Some of the processes will add objects to > list and another process will be a GUI that will view objects in the > list.

  1   2   3   >