Re: Newbie thwarted by sys.path on Vista

2009-08-02 Thread Michael M Mason
"Mark Lawrence" wrote in message news:mailman.4130.1249203322.8015.python-l...@python.org... Be careful, I'm screwed things up on several occasions by placing a file on PYTHONPATH that overrides a file in the standard library, test.py being my favourite! Thanks. Sure enough, I've already got

Re: Newbie thwarted by sys.path on Vista

2009-08-02 Thread Michael M Mason
"Dave Angel" wrote in message news:mailman.4120.1249172970.8015.python-l...@python.org... Michael M Mason wrote: I'm running Python 3.1 on Vista and I can't figure out how to add my own directory to sys.path. Thanks to Jon, Piet, David and Dave for the responses.

Newbie thwarted by sys.path on Vista

2009-08-01 Thread Michael M Mason
I'm running Python 3.1 on Vista and I can't figure out how to add my own directory to sys.path. The docs suggest that I can either add it to the PYTHONPATH environment variable or to the PythonPath key in the registry. However, PYTHONPATH doesn't exist, and updating the registry key has no e

Re: where is python on linux?

2007-01-08 Thread Michael M.
$ whoami cannibal ;-) Hendrik van Rooyen wrote: > "rzed" <[EMAIL PROTECTED]> wrote: > > > >>mmm... sloppy joes >> >>-- >>rzed >> >>"A sandwich is a sandwich, but a Manwich is a meal." > > > You eat people? > > - Hendrik > > -- http://mail.python.org/mailman/listinfo/python-l

Re: how to find the longst element list of lists

2007-01-07 Thread Michael M.
Sorry, wrong place. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to find the longst element list of lists

2007-01-07 Thread Michael M.
Bruno Desthuilliers wrote: > > Err... this makes three distinct lists, not a list of lists. > Sure. Logically spoken. Not in Python code. Or a number of lists. Sure not [[ bla... ] [bla.]] etc. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to find the longst element list of lists

2007-01-07 Thread Michael M.
> > Err... this makes three distinct lists, not a list of lists. > Sure. Logically spoken. Not in Python code. Or a number of lists. Sure not [[ bla... ] [bla.]] etc. -- http://mail.python.org/mailman/listinfo/python-list

how to find the longst element list of lists

2007-01-07 Thread Michael M.
How to find the longst element list of lists? I think, there should be an easier way then this: s1 = ["q", "e", "d"] s2 = ["a", "b"] s3 = ["a", "b", "c", "d"] if len(s1) >= len(s2) and len(s1) >= len(s3): sx1=s1 ## s1 ist längster if len(s2) >= len(s3): sx2=s2

Python re expr from Perl to Python

2007-01-06 Thread Michael M.
In Perl, it was: ## Example: "Abc | def | ghi | jkl" ## -> "Abc ghi jkl" ## Take only the text betewwn the 2nd pipe (=cut the text in the 1st pipe). $na =~ s/\ \|(.*?)\ \|(.*?)\ \|/$2/g; ## -- remove [ and ] in text $na =~ s/\[//g; $na =~ s/\]//g; # print "DEB: \"

Re: code optimization (calc PI) / New Algorithme for PI

2007-01-04 Thread Michael M.
[EMAIL PROTECTED] wrote: >>Yes, this "gmpy" sounds good for calc things like that. >>But not available on my machine. >>ImportError: No module named gmpy > > > What type of machine? Windoof with Cygwin. > > The home page for gmpy is http://sourceforge.net/projects/gmpy/ > > I have Windows ve

Re: code optimization (calc PI) / New Algorithme for PI

2007-01-04 Thread Michael M.
Mainly, it was fload-div. Changed to int-div (python //) runs faster. Yes, this "gmpy" sounds good for calc things like that. But not available on my machine. ImportError: No module named gmpy Anyway, thanks for posting. This gmpy module can be very intersting. But right now, the focus was, if i

Re: code optimization (calc PI) / Full Code of PI calc in Python and C.

2007-01-03 Thread Michael M.
Ok, here is the code. It is a translation of the following code, found on the internet. * The C is very fast, Python not. * Target: Do optimization, that Python runs nearly like C. Auf 800 Stellen in 160 Zeichen... -- int a=1,b,c=2800,d,e,f[2801],g;main(){for(;b-c;)f[b++]=a/5; for