Re: merits of Lisp vs Python

2006-12-13 Thread Ken Tilton
Ken Tilton wrote: > > > Ken Tilton wrote: > >> >> >> Paul Rubin wrote: >> >>> Ken Tilton <[EMAIL PROTECTED]> writes: >>> don't know. The point is, we need code (not just data) in defskill (apologies for nasty formatting): >>> >>> >>> >>> >>> Man that whole thing is messy. > > > I d

Re: Conditional iteration

2006-12-13 Thread Paul Rubin
at <[EMAIL PROTECTED]> writes: > > for x in (x for x in [-2, -1, 0, 1, 2, 3, 4] if x > 0): > >... more code ... > Do you know if this generates a new list internally (memory consumption?) It does not. That parenthesized expression is a called generator expression. It compiles to a sma

Re: merits of Lisp vs Python

2006-12-13 Thread Paul Rubin
Ken Tilton <[EMAIL PROTECTED]> writes: > btw, you called the defskill messy (repeated below) "messy". The only > text not specific to absolute value is D-E-F-S-K-I-L-L. No, the messiness was not in the macro instantation (defskill blah...), but in the defmacro that tells the compiler how to expand

Re: The Famous Error Message: "ImportError: No module named python_script"

2006-12-13 Thread Eric Pederson
rich murphy wrote: >So, I assumed "the current directory" is C:\Python25 which did not >work. Then I placed the fibo.py file in C: director. That did not work >either. What directory does it mean then? > OK, forgive me for using 2.4... Can you import "sys"? Assuming you've got python_script.py

Re: merits of Lisp vs Python

2006-12-13 Thread Ken Tilton
Paul Rubin wrote: > Ken Tilton <[EMAIL PROTECTED]> writes: > >>>Man that whole thing is messy. I can't for the life of me understand >>>why it's so important to use a macro for that. Even in Lisp, I'd >>>probably set up the reverse thingie as an auxiliary function. >> >>And when you got to ski

Re: Conditional iteration

2006-12-13 Thread at
Hi Greg, Well point is that the condition is the only thing happening and does not really apply to the indented code section, but basically to the list used in the indented code section. When I read this code back its like, 'oh we use this list' and by the if some_condition the next thing I think

Pythonic style involves lots of lightweight classes (for me)

2006-12-13 Thread metaperl
I find it arduous to type dictionary['key'] and also feel that any data I create for a program deserves to have its operations tied to it. As a result, I often create lots of lightweight classes. Here's a small example: vlc = '/Applications/VLC.app/Contents/MacOS/VLC' class song(object): def

Re: Conditional iteration

2006-12-13 Thread at
Thanx Paul! Do you know if this generates a new list internally (memory consumption?) @ Paul Rubin wrote: > at <[EMAIL PROTECTED]> writes: >> You proposal, seems nice to me but it doesn't work with Python 2.4.3, >> should it work with 2.5? >> >> Again I am just wondering if the approach for >

Re: Conditional iteration

2006-12-13 Thread at
My comments below. Kind regards, @ Carl Banks wrote: > at wrote: >> Well, all I can say that for me as a user it would make sense... > > Which is, like, step one out of a hundred for getting a syntax change > into the language. > >> Curiosity: in what sense is it redundant? > > It creates sy

Re: The Famous Error Message: "ImportError: No module named python_script"

2006-12-13 Thread rich murphy
Ben Finney wrote: > "rich murphy" <[EMAIL PROTECTED]> writes: > > > I am studying Python language. > > Welcome! Allow me to direct you to the Python tutorial: > > http://docs.python.org/tut/> > > Please take the time to work through all the exercises in that > document, understanding each one

Re: The Famous Error Message: "ImportError: No module named python_script"

2006-12-13 Thread Fredrik Lundh
rich murphy wrote: > Thank you both for responding. > > Yes of course the file has the ".py" extension and yes I went through > the tutorial. since everyone on this forum is importing modules successfully hundreds of times every day, that's not obvious at all. try running the interpreter as

Re: merits of Lisp vs Python

2006-12-13 Thread Paul Rubin
Ken Tilton <[EMAIL PROTECTED]> writes: > >> Man that whole thing is messy. > > I do not see much difference, except that the character count is 25% > less in the macro version: The macro calls aren't so bad, but the macro definition is pretty horrendous. There's no need to invent and program all

Re: merits of Lisp vs Python

2006-12-13 Thread Ken Tilton
Ken Tilton wrote: > > > Paul Rubin wrote: > >> Ken Tilton <[EMAIL PROTECTED]> writes: >> >>> don't know. The point is, we need code (not just data) in defskill >>> (apologies for nasty formatting): >> >> >> >> Man that whole thing is messy. I do not see much difference, except that the charac

Re: merits of Lisp vs Python

2006-12-13 Thread Paul Rubin
Ken Tilton <[EMAIL PROTECTED]> writes: > > Man that whole thing is messy. I can't for the life of me understand > > why it's so important to use a macro for that. Even in Lisp, I'd > > probably set up the reverse thingie as an auxiliary function. > > And when you got to skill 42 and you discover

Re: merits of Lisp vs Python

2006-12-13 Thread Ken Tilton
Paul Rubin wrote: > Ken Tilton <[EMAIL PROTECTED]> writes: > >>don't know. The point is, we need code (not just data) in defskill >>(apologies for nasty formatting): > > > Man that whole thing is messy. I can't for the life of me understand > why it's so important to use a macro for that. Ev

Re: job posting: nothing about Python there

2006-12-13 Thread Paul Rubin
Looks like a generic Windows weenie gig: Will serve as a programmer in the following program languages: RPGIII, RPGILE, Microsoft Access, SQL, Microsoft SQL Server, XML, Cold Fusion, and other web development tools. -- http://mail.python.org/mailman/listinfo/python-list

Re: merits of Lisp vs Python

2006-12-13 Thread Paul Rubin
Ken Tilton <[EMAIL PROTECTED]> writes: > don't know. The point is, we need code (not just data) in defskill > (apologies for nasty formatting): Man that whole thing is messy. I can't for the life of me understand why it's so important to use a macro for that. Even in Lisp, I'd probably set up th

Re: job posting: Sr Systems Programmer needed

2006-12-13 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > View the Job Descriptions: www.myspace.com/agcocorp I did and it has nothing to do with Python. So in the context of this newgroup, this announcement is spam. Please desist in the future. If everyone else with an unreleated programmer

Re: speed of python vs matlab.

2006-12-13 Thread Jonathan Curran
On Wednesday 13 December 2006 18:07, Chao wrote: > I've been trying to develop some numerical codes with python, however > got disappointed. > > A very simple test, > > a = 1.0 > > for i in range(1000): > for j in range(1000): >a = a+1 > > unfortunately, it took 4.5 seconds to fini

Re: Is anyone using Python for embedded applications?

2006-12-13 Thread Hendrik van Rooyen
"Paul Boddie" <[EMAIL PROTECTED]> wrote: > Interesting! Any links, or is it related to the Telit hardware already > discussed? telit it was... - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: merits of Lisp vs Python

2006-12-13 Thread Paddy
Ken Tilton wrote: > (apologies for nasty formatting): ;-) - Paddy! -- http://mail.python.org/mailman/listinfo/python-list

Re: merits of Lisp vs Python

2006-12-13 Thread Ken Tilton
greg wrote: > Ken Tilton wrote: > >> pps. How would Python do this? > > > Here's one way it could look: > > defskill("absolute-value", > title = "Absolute Value", > annotations = [ > "Take the absolute value of #op#.", > "The vertical bars around #op# mean 'the absolute va

job posting: Sr Systems Programmer needed

2006-12-13 Thread lmsteadman
AGCO, Jackson Operations is nestled in the picturesque Des Moines River Valley---in the welcoming town of Jackson, Minnesota (56143). Jackson is a town of approximately 3600 neighbors, and is centrally located between the booming town of Sioux Falls, SD and the resort area of the Okoboji Lakes. AG

Re: how to determine Operating System in Use?

2006-12-13 Thread James Cunningham
On 2006-12-13 19:28:14 -0500, [EMAIL PROTECTED] said: > > > On Dec 13, 6:32 pm, "Ian F. Hood" <[EMAIL PROTECTED]> wrote: >> Hi >> In typically windows environments I have used: >> if 'Windows' in os.environ['OS']... >> to prove it, but now I need to properly support different environments. >> To

Re: how to determine Operating System in Use?

2006-12-13 Thread Ian F. Hood
excellent, ty <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > > On Dec 13, 6:32 pm, "Ian F. Hood" <[EMAIL PROTECTED]> wrote: >> Hi >> In typically windows environments I have used: >> if 'Windows' in os.environ['OS']... >> to prove it, but now I need to properly support differ

Re: how to determine Operating System in Use?

2006-12-13 Thread Ian F. Hood
I am integrating with an existing cross-platform system that provides different shell scripts and/or batch files for each environment. Normally the selection is performed manually but my utility needs to automate this. To select the correct utility I need to know what platform my code is runni

Re: Conditional iteration

2006-12-13 Thread greg
at wrote: > It is not the addional line containing 'if x > 0:' that bothers me, but the > additional indentation. I don't find the additional indentation bothersome. In fact I think it's helpful, because it makes it obvious that there is something else going on besides just a loop. -- Greg -- h

Re: merits of Lisp vs Python

2006-12-13 Thread greg
Ken Tilton wrote: > pps. How would Python do this? Here's one way it could look: defskill("absolute-value", title = "Absolute Value", annotations = [ "Take the absolute value of #op#.", "The vertical bars around #op# mean 'the absolute value of' #op#.", "Absolute v

Re: how to determine Operating System in Use?

2006-12-13 Thread Paul Watson
Ian F. Hood wrote: > Hi > In typically windows environments I have used: > if 'Windows' in os.environ['OS']... > to prove it, but now I need to properly support different environments. > To do so I must accurately determine what system the python instance is > running on (linux, win, mac, etc)

Re: Password, trust and user notification

2006-12-13 Thread placid
Gabriel Genellina wrote: > At Wednesday 13/12/2006 21:44, Aidan Steele wrote: > > >While what you said is technically correct, I think you misread > >their original question. They want to send email *from* the Gmail > >account *to* the work account. I suggested that he use Gmail's SMTP > >server t

Re: The Famous Error Message: "ImportError: No module named python_script"

2006-12-13 Thread rich murphy
Thank you both for responding. Yes of course the file has the ".py" extension and yes I went through the tutorial. Gabriel Genellina wrote: > At Wednesday 13/12/2006 22:16, rich murphy wrote: > > >I am studying Python language. I have Python 2.5 installed in my PC > >which is running on Windows

Python training in Colorado, January 2007

2006-12-13 Thread Mark Lutz
Python author and trainer Mark Lutz will be teaching another 3-day Python class at a conference center in Longmont, Colorado, on January 23-25, 2007. This is a public training session open to individual enrollments, and covers the same topics as the 3-day onsite sessions that Mark teaches, with ha

Re: Conditional iteration

2006-12-13 Thread Paul Rubin
at <[EMAIL PROTECTED]> writes: > You proposal, seems nice to me but it doesn't work with Python 2.4.3, should > it work with 2.5? > > Again I am just wondering if the approach for > > [x for c x in some_list if some_condition] > > and > x = a if b else c > > could be generalize

Re: Conditional iteration

2006-12-13 Thread Carl Banks
at wrote: > Well, all I can say that for me as a user it would make sense... Which is, like, step one out of a hundred for getting a syntax change into the language. > Curiosity: in what sense is it redundant? It creates syntactical support for two different ways to do something. If your plan we

Re: newb: Creating Exception

2006-12-13 Thread johnny
I checked out couple of books from Library, one that I like called "Foundation of Python Network Programming", this is what I needed, code with understandable explantion. ;) Thread pooling and many others. Thanks all of you for the help. Dustan wrote: > Dennis Lee Bieber wrote: > > On 13 Dec 20

Re: The Famous Error Message: "ImportError: No module named python_script"

2006-12-13 Thread Ben Finney
"rich murphy" <[EMAIL PROTECTED]> writes: > I am studying Python language. Welcome! Allow me to direct you to the Python tutorial: http://docs.python.org/tut/> Please take the time to work through all the exercises in that document, understanding each one before moving on. I recommend this

Re: merits of Lisp vs Python

2006-12-13 Thread Paul Rubin
Ken Tilton <[EMAIL PROTECTED]> writes: > pps. How would Python do this? Is it possible to avoid committing to > an implementation mechanism? Compare and contrast. k You'd just write a function. Python's expression syntax is comparable to a Lisp reader (you can have nested values of mixed types et

Re: Iterating over several lists at once

2006-12-13 Thread Michael Spencer
John Henry wrote: > Carl Banks wrote: > >> The function can be extended to allow arbitrary arguments. Here's a >> non-minmal recursive version. >> >> def cartesian_product(*args): >> if len(args) > 1: >> for item in args[0]: >> for rest in cartesian_product(*args[1:]): >>

Re: newb: Creating Exception

2006-12-13 Thread Dustan
Dennis Lee Bieber wrote: > On 13 Dec 2006 03:52:49 -0800, "Dustan" <[EMAIL PROTECTED]> > declaimed the following in gmane.comp.python.general: > > > > > I didn't complete my thought. If you run into a situation like this, > > then you might want to look to the python documentation on the web for >

Re: The Famous Error Message: "ImportError: No module named python_script"

2006-12-13 Thread Gabriel Genellina
At Wednesday 13/12/2006 22:16, rich murphy wrote: I am studying Python language. I have Python 2.5 installed in my PC which is running on Windows XP. I placed the the script called "python_script" in C:\Python25 directory where all the other Python files are. Verify the file name, should be "p

Re: speed of python vs matlab.

2006-12-13 Thread Chao
My Bad, the time used by python is 0.46~0.49 sec, I tried xrange, but it doesn't make things better. import time tic = time.time() a = 1.0 array = range(1000) for i in array: for j in array: a = a + 0.1 toc = time.time() print toc-tic,' has elapsed' used by matlab is 0.012sec tic

Re: Defining classes

2006-12-13 Thread Michael Spencer
Nick Maclaren wrote: > > Well, I am already doing that, and regretting the fact that Python > doesn't seem to allow a class instantiation to return a new class :-) > >>> class Fake(object): ... def __new__(cls): ... return 42 ... >>> Fake() 42 >>> "instantiation" (i.e.

The Famous Error Message: "ImportError: No module named python_script"

2006-12-13 Thread rich murphy
I am studying Python language. I have Python 2.5 installed in my PC which is running on Windows XP. I placed the the script called "python_script" in C:\Python25 directory where all the other Python files are. When I tried to import the script called "python_script", it kept printing the famous e

Re: Password, trust and user notification

2006-12-13 Thread Aidan Steele
On 12/14/06, Gabriel Genellina <[EMAIL PROTECTED]> wrote: At Wednesday 13/12/2006 21:44, Aidan Steele wrote: >While what you said is technically correct, I think you misread >their original question. They want to send email *from* the Gmail >account *to* the work account. I suggested that he us

Re: Password, trust and user notification

2006-12-13 Thread Gabriel Genellina
At Wednesday 13/12/2006 21:44, Aidan Steele wrote: While what you said is technically correct, I think you misread their original question. They want to send email *from* the Gmail account *to* the work account. I suggested that he use Gmail's SMTP server to send the email. They were concern

Re: speed of python vs matlab.

2006-12-13 Thread Andrew Sackville-West
On Wed, Dec 13, 2006 at 04:07:20PM -0800, Chao wrote: > I've been trying to develop some numerical codes with python, however > got disappointed. > > A very simple test, > > a = 1.0 > > for i in range(1000): > for j in range(1000): >a = a+1 > > unfortunately, it took 4.5 second

Re: speed of python vs matlab.

2006-12-13 Thread Gabriel Genellina
At Wednesday 13/12/2006 21:07, Chao wrote: I've been trying to develop some numerical codes with python, however got disappointed. A very simple test, a = 1.0 for i in range(1000): for j in range(1000): a = a+1 unfortunately, it took 4.5 seconds to finish(my machines is fine.

Re: Password, trust and user notification

2006-12-13 Thread Aidan Steele
On 12/14/06, Gabriel Genellina <[EMAIL PROTECTED]> wrote: At Wednesday 13/12/2006 20:45, placid wrote: > > You DON'T need the password for the receiving account just to send him > > an email! > > And you don't even need that special Gmail library, smtplib should be > > fine. > >Yes you dont nee

Re: Password, trust and user notification

2006-12-13 Thread Gabriel Genellina
At Wednesday 13/12/2006 20:45, placid wrote: > You DON'T need the password for the receiving account just to send him > an email! > And you don't even need that special Gmail library, smtplib should be > fine. Yes you dont need a password to receive email, but to access Gmail and send an email

Re: How do I edit a PythonWin path to import custom built modules???

2006-12-13 Thread BartlebyScrivener
jay graves wrote: > > Do you have any *.pth files in the C:\Python24 directory? > No. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to determine Operating System in Use?

2006-12-13 Thread nanjundi
On Dec 13, 6:32 pm, "Ian F. Hood" <[EMAIL PROTECTED]> wrote: > Hi > In typically windows environments I have used: > if 'Windows' in os.environ['OS']... > to prove it, but now I need to properly support different environments. > To do so I must accurately determine what system the python inst

Re: How do I edit a PythonWin path to import custom built modules???

2006-12-13 Thread BartlebyScrivener
Fredrik Lundh wrote: > what do you get if you do: > > python -S > ... >>> import sys >>> sys.path ['', 'C:\\WINDOWS\\system32\\python24.zip', 'd:\\python', 'C:\\Python24\\DLLs', 'C:\\Python24\\lib', 'C:\\Python24\\lib\\plat-win', 'C:\\Python24\\lib\\lib-tk', 'C:\ \Python24'] > and then >>> imp

Re: merits of Lisp vs Python

2006-12-13 Thread Ken Tilton
Ken Tilton wrote: > > > Paul Rubin wrote: > >> Ken Tilton <[EMAIL PROTECTED]> writes: >> >>> Have you read On Lisp by Paul Graham? It is on-line. Just the preface >>> will do, I think, maybe also Chapter One where he raves on macros. Do >>> you think he is mistaken? Confused? Lying? Mutant? >>

Re: Password, trust and user notification

2006-12-13 Thread Aidan Steele
On 13 Dec 2006 15:45:09 -0800, placid <[EMAIL PROTECTED]> wrote: Gabriel Genellina wrote: > You DON'T need the password for the receiving account just to send him > an email! > And you don't even need that special Gmail library, smtplib should be > fine. Yes you dont need a password to recei

how to determine Operating System in Use?

2006-12-13 Thread Ian F. Hood
Hi In typically windows environments I have used: if 'Windows' in os.environ['OS']... to prove it, but now I need to properly support different environments. To do so I must accurately determine what system the python instance is running on (linux, win, mac, etc). Is there a best practises way

Re: mod_python.so is garbled mod_python.so is garbled

2006-12-13 Thread Graham Dumpleton
blbmdsmith wrote: > Has anyone seen the following error while starting httpd: > > Starting httpd: httpd: Syntax error on line 54 of > /usr/local/apache2/conf/httpd.conf: API module structure > `python_module' in file /usr/local/apache/modules/mod_python.so is > garbled - perhaps this is not an Apa

Re: speed of python vs matlab.

2006-12-13 Thread Aidan Steele
On 13 Dec 2006 16:07:20 -0800, Chao <[EMAIL PROTECTED]> wrote: I've been trying to develop some numerical codes with python, however got disappointed. A very simple test, a = 1.0 for i in range(1000): for j in range(1000): a = a+1 unfortunately, it took 4.5 seconds to finish(

speed of python vs matlab.

2006-12-13 Thread Chao
I've been trying to develop some numerical codes with python, however got disappointed. A very simple test, a = 1.0 for i in range(1000): for j in range(1000): a = a+1 unfortunately, it took 4.5 seconds to finish(my machines is fine. P4 3.0G, 1G RAM, it varies according to machi

Re: call of __del__ non-deterministic in python 2.4 (cpython)?

2006-12-13 Thread Mathias Panzenboeck
Anthony Baxter wrote: > On 12/13/06, Holger Joukl <[EMAIL PROTECTED]> wrote: >> I did read this but didn't think it applied to my situation. I'm quite >> sure that the refcount of the local variable is 1 before the local scope >> is left. >> So let me rephrase the question: Even if I can make sure

Re: Password, trust and user notification

2006-12-13 Thread placid
Gabriel Genellina wrote: > You DON'T need the password for the receiving account just to send him > an email! > And you don't even need that special Gmail library, smtplib should be > fine. Yes you dont need a password to receive email, but to access Gmail and send an email you do. Yes you do n

mod_python.so is garbled mod_python.so is garbled

2006-12-13 Thread blbmdsmith
Has anyone seen the following error while starting httpd: Starting httpd: httpd: Syntax error on line 54 of /usr/local/apache2/conf/httpd.conf: API module structure `python_module' in file /usr/local/apache/modules/mod_python.so is garbled - perhaps this is not an Apache module DSO I am running p

Re: Obtaining SSL certificate info from SSL object - proposal

2006-12-13 Thread John Nagle
John Nagle wrote: > Michael Ströder wrote: > >> John Nagle wrote: >> >>>The Python SSL object offers two methods from obtaining >>> the info from an SSL certificate, "server()" and "issuer()". >>> The actual values in the certificate are a series of name/value >>> pairs in ASN.1 binary format.

Re: Defining classes

2006-12-13 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, Duncan Booth <[EMAIL PROTECTED]> writes: |> > |> > I am defining a class, and I need to refer to that class when |> > setting up its static data - don't ask - like this: |> > |> > Class weeble : |> > wumpus = brinjal(weeble) |> |> You cannot refer to weeble u

Re: Iterating over several lists at once

2006-12-13 Thread John Henry
Carl Banks wrote: > > The function can be extended to allow arbitrary arguments. Here's a > non-minmal recursive version. > > def cartesian_product(*args): > if len(args) > 1: > for item in args[0]: > for rest in cartesian_product(*args[1:]): > yield (item

Re: Conditional iteration

2006-12-13 Thread at
Dear Carl, Well, all I can say that for me as a user it would make sense... Curiosity: in what sense is it redundant? All solution/workarounds I have seen so far involve creation of new lists (subsets) adding to more processing/computation/memory usage. Redundant suggests that you know alternativ

Re: Conditional iteration

2006-12-13 Thread at
No offense, but my conclusions from your mail is that readability is a matter of taste. My brains need to process a whole lot more information with your solution than in my proposal... but I read somewhere else that GvR rejected the proposal :-( Ciao, @ [EMAIL PROTECTED] wrote: > The propose

Re: how can i write a hello world in chinese with python

2006-12-13 Thread MRAB
Dennis Lee Bieber wrote: > On 12 Dec 2006 23:40:41 -0800, "kernel1983" <[EMAIL PROTECTED]> > declaimed the following in gmane.comp.python.general: > > > and I tried unicode and utf-8 > > I tried to both use unicode&utf-8 head just like "\xEF\xBB\xBF" and not > > to use > > > "unicode" is a t

Re: merits of Lisp vs Python

2006-12-13 Thread David Golden
Actually, in English, "parenthesis" means the bit in between the brackets. The various kinds of brackets (amongst other punctuation marks including, in most english texts, commas) *demarcate* parentheses. Wikipedia's "Parenthesis (rhetoric)" is, at time of writing, the correct British English def

CLPython (was Re: merits of Lisp vs Python)

2006-12-13 Thread Paul Boddie
Willem Broekema wrote: > Paul Rubin wrote: > > Does this count as a "children of a lesser Python"? > > This sounds like a quite derogatory first question. I wouldn't take it that way: it's only a quote from an opinion piece about alternative Python implementations (albeit a contentious one). > CL

Re: Windows SetLocalTime

2006-12-13 Thread Podi
Thank you. It works :-) P Rob Williscroft wrote: > Ok I see, you will probably need these 2 bits of the ctypes > documentation: > > http://docs.python.org/lib/ctypes-structures-unions.html > http://docs.python.org/lib/ctypes-pointers.html > > From there on geting to this is farly straight fo

Re: merits of Lisp vs Python

2006-12-13 Thread Kaz Kylheku
Rob Warnock wrote: > And for any of you who are rejecting this because you don't want to > learn or use Emacs, Raffael's point is even true in the Vi family of > editors ("nvi" & "vim", at least). The "y%" command yanks (copies) > everything through the matching paren into the anonymous buffer; > "

Stupid email disclaimers (was: [unicode] inconvenient unicode conversion of non-string arguments)

2006-12-13 Thread Ben Finney
"Marc 'BlackJack' Rintsch" <[EMAIL PROTECTED]> writes: > In <[EMAIL PROTECTED]>, Holger Joukl > wrote: > > [a meaningless disclaimer text at the bottom of every message] > > Maybe you should rethink if it really makes sense to add this huge > block of "nonsense" to a post to a newsgroup or public

Re: How do I edit a PythonWin path to import custom built modules???

2006-12-13 Thread jay graves
BartlebyScrivener wrote: > Yup. Did that before. That's what I mean. The d:\\python is there and > it doesn't come from the PythonPath in my windows registry. Maybe it > scans for any directory with python in the name? Do you have any *.pth files in the C:\Python24 directory? ... jay -- http:/

Re: How do I edit a PythonWin path to import custom built modules???

2006-12-13 Thread Fredrik Lundh
BartlebyScrivener wrote: > Yup. Did that before. That's what I mean. The d:\\python is there and > it doesn't come from the PythonPath in my windows registry. what do you get if you do: > python -S ... >>> import sys >>> sys.path and then >>> import site >>> sys.path ? -- http://mai

Re: merits of Lisp vs Python

2006-12-13 Thread Slawomir Nowaczyk
On Sat, 09 Dec 2006 21:59:58 -0500 Ken Tilton <[EMAIL PROTECTED]> wrote: #> > Could it be because of people like J Shrager who writes things like this? #> > #> > "Can't you just expand the language via macros to create whatever facility #> > of this sort [major new features with new syntax] you n

Re: merits of Lisp vs Python

2006-12-13 Thread Slawomir Nowaczyk
On Tue, 12 Dec 2006 20:38:14 -0800 "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: #> > > Because it's the language for which indentation is automatically #> > > determinable. That is, one can copy/paste a chunk of code, hit a #> > > key and suddenly everything is nicely indented. #> > #> > Cool, s

Re: merits of Lisp vs Python

2006-12-13 Thread Slawomir Nowaczyk
On Sun, 10 Dec 2006 17:11:20 +0200 "Dmitry V. Gorbatovsky" <[EMAIL PROTECTED]> wrote: #> Steven D'Aprano wrote: #> #> > So which is it? If Lisp is so self-evidently better than every other #> > language, and if nobody has any fears or concerns with Lisp, why is Lisp a #> > fringe language? #> Be

Re: merits of Lisp vs Python

2006-12-13 Thread Slawomir Nowaczyk
On Sun, 10 Dec 2006 10:11:37 -0500 Ken Tilton <[EMAIL PROTECTED]> wrote: #> Lisp has all the cool qualities you like in your pets, plus native #> compilation in most implementations, plus maturity and a standard, plus #> a better OO, plus macros, plus a dozen more small wins. Including #> autom

Re: Defining classes

2006-12-13 Thread Duncan Booth
[EMAIL PROTECTED] (Nick Maclaren) wrote: > > I am defining a class, and I need to refer to that class when > setting up its static data - don't ask - like this: > > Class weeble : > wumpus = brinjal(weeble) You cannot refer to weeble until it has been created which isn't until after all of

Re: Defining classes

2006-12-13 Thread Gabriel Genellina
At Wednesday 13/12/2006 18:04, Nick Maclaren wrote: I am defining a class, and I need to refer to that class when setting up its static data - don't ask - like this: Class weeble : wumpus = brinjal(weeble) Move it below the class: class weeble: weeble.wumpus = brinjal(weebl

Re: How do I edit a PythonWin path to import custom built modules???

2006-12-13 Thread BartlebyScrivener
Gabriel Genellina wrote: > > import sys > print sys.path > and see what's there. Yup. Did that before. That's what I mean. The d:\\python is there and it doesn't come from the PythonPath in my windows registry. Maybe it scans for any directory with python in the name? ['', 'C:\\WINDOWS\\system32

Re: Windows SetLocalTime

2006-12-13 Thread Rob Williscroft
Podi wrote in news:[EMAIL PROTECTED] in comp.lang.python: > Rob Williscroft wrote: >> >> Google will usually find the documentation of anything in the >> Windows API however sometimes it also helps to add "msdn" to >> your search as in: > Yes, thank you. > > I found the function SetLocalTime or

Re: How do I edit a PythonWin path to import custom built modules???

2006-12-13 Thread Gabriel Genellina
At Wednesday 13/12/2006 10:10, BartlebyScrivener wrote: > Python does *not* use the Path when searching for modules; sys.path is > initialized based on the contents of PYTHONPATH, the location of the > Python executable (or PYTHONHOME), some heuristics, and certain registry > entries. Now I'm s

Re: merits of Lisp vs Python

2006-12-13 Thread Ravi Teja
Robert Uhl wrote: > "Ravi Teja" <[EMAIL PROTECTED]> writes: > > > Mark Tarver wrote: > >> > >> seems to show that Python is a cut down (no macros) version of Lisp > >> with a worse performance. > > > > By that standard, every other mainstream dynamically typed language > > for you is a cut-down ve

Re: pycrypto 3DES keysize

2006-12-13 Thread hg
hg wrote: > Ning wrote: > >> I'm trying to write an IM client which sends encrypted messages to the >> server. I tried to use pycrypto library, but when I came to 3DES >> cypher I was confused about the keysize to use. In the standard it >> said that it should be either 112 bits or 168 bits, wh

Re: pycrypto 3DES keysize

2006-12-13 Thread hg
Ning wrote: > I'm trying to write an IM client which sends encrypted messages to the > server. I tried to use pycrypto library, but when I came to 3DES > cypher I was confused about the keysize to use. In the standard it > said that it should be either 112 bits or 168 bits, whereas it's 16 > byt

Defining classes

2006-12-13 Thread Nick Maclaren
I am defining a class, and I need to refer to that class when setting up its static data - don't ask - like this: Class weeble : wumpus = brinjal(weeble) Does anyone know how I can achieve this? Naturally, I don't need anything more than the address of the class in brinjal, as it won't be u

Re: merits of Lisp vs Python

2006-12-13 Thread tac-tics
> > I use 'French units' instead of the term 'metric system' because the > > latter means 'measurement system,' and of course could validly be > > applied to _any_ system.Now we know how one contractor ended up using > > English units when the > other was using French units and an entire Mars miss

Re: YouTube written in Python

2006-12-13 Thread Will McGugan
Terry Reedy wrote: > In a thread on the PyDev list, Guido van Rossum today wrote: > >>And I just found out (after everyone else probably :-) that YouTube is >>almost entirely written in Python. (And now I can rub shoulders with >>the developers since they're all Googlers now... :-) > Nice quote

test

2006-12-13 Thread Eric Price
test _ Get the latest Windows Live Messenger 8.1 Beta version. Join now. http://ideas.live.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Mark Lutz Python interview

2006-12-13 Thread Jack Diederich
They eventually got this once posted on the website. http://techtalk.imi-us.com/Archives/2006/20061001/ The Lutz interview starts at 10:00 minutes in. -Jack On Fri, Sep 29, 2006 at 11:25:34AM -0700, Mark Lutz wrote: > Python author and trainer Mark Lutz will be interviewed > on the radio show Te

Re: Windows SetLocalTime

2006-12-13 Thread Podi
Yes, thank you. I found the function SetLocalTime or SetSystemTime to set the time from MSDN http://msdn2.microsoft.com/en-us/library/ms724942.aspx. I am having trouble passing parameter to the functions in Python. Rob Williscroft wrote: > > Google will usually find the documentation of anything

Re: Iterating over several lists at once

2006-12-13 Thread Mike Erickson
* at ([EMAIL PROTECTED]) wrote: > Sorry for breaking into this thread, but I agree completely that any > unnecessary indentations should be avoided. For the same reason I advocate > that the following syntax should work: > > for x in some_list if some_condition: > ... code

Re: Windows SetLocalTime

2006-12-13 Thread Rob Williscroft
Podi wrote in news:[EMAIL PROTECTED] in comp.lang.python: > I am trying to set the system time on my Windows computer, but avoid > using the DOS command (date, time). > > Does anyone know what parameter to pass to function SetLocalTime? http://msdn.microsoft.com/library/default.asp?url=/library

Windows SetLocalTime

2006-12-13 Thread Podi
I am trying to set the system time on my Windows computer, but avoid using the DOS command (date, time). Does anyone know what parameter to pass to function SetLocalTime? CSharp ref http://groups.google.com/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/813b4ef504f77a43/24fc3

Re: merits of Lisp vs Python

2006-12-13 Thread Willem Broekema
Paul Rubin wrote: > Does this count as a "children of a lesser Python"? This sounds like a quite derogatory first question. CLPython is not a dead and abandoned project, nor is execution speed its main goal, nor are Python semantics bended anywhere (it can run the Pie-thon benchmark). Sure, some r

Re: Is anyone using Python for embedded applications?

2006-12-13 Thread Carl J. Van Arsdall
Hendrik van Rooyen wrote: > >> >> > > It depends a *lot* on what is meant by "embedded" : > Ha, very true > This definition seems to cover everything from: > - a cut down PC in a non standard box, through > - a processor in a Washing Machine, to > - a bare PIC processor i

pycrypto 3DES keysize

2006-12-13 Thread Ning
I'm trying to write an IM client which sends encrypted messages to the server. I tried to use pycrypto library, but when I came to 3DES cypher I was confused about the keysize to use. In the standard it said that it should be either 112 bits or 168 bits, whereas it's 16 bytes or 24 bytes in pycry

Re: Conditional iteration

2006-12-13 Thread Carl Banks
at wrote: > I am not looking for a work around but more interest if other people might > judge this syntax would come in handy? Of course people have expressed interest in this in the past, but it's not going to happen. There's a way to nest for and if statements, and a different way to nest for

Re: merits of Lisp vs Python

2006-12-13 Thread Ken Tilton
Robert Uhl wrote: > Christophe <[EMAIL PROTECTED]> writes: > >>Robert Uhl a écrit : >> >> >>>The argument from popularity is invalid. French units have overtaken >>>standard units, >> >>Never heard of that French unit thing. Unless you talk about that >>archaic unit system that was in use befor

  1   2   3   >