How to find the present working directory using python.

2007-05-04 Thread pradeep nair
how to find out the present working directory using python. os.system('pwd') works good. But i need some specific one in python rather than embedding shell command into python. -- http://mail.python.org/mailman/listinfo/python-list

default config has no md5 module?

2007-05-04 Thread Leo Jay
i want to compile a python by myself, but after configure and make, it seems that md5 is not built by default. what should i do to compile md5 as an module? -- Best Regards, Leo Jay -- http://mail.python.org/mailman/listinfo/python-list

Re: How to find the present working directory using python.

2007-05-04 Thread SamG
On May 4, 12:03 pm, pradeep nair <[EMAIL PROTECTED]> wrote: > how to find out the present working directory using python. > > os.system('pwd') works good. But i need some specific one in > python rather than embedding shell command into python. os.path.getcwd() -- http://mail.python.org

base64 and unicode

2007-05-04 Thread EuGeNe Van den Bulke
Hi, I am trying to convert the file hebrew.b64 attached into hebrew.lang (text file usable by Inline Search for localization purposes. >>> import base64 >>> base64.decode(file("hebrew.b64","r"),file("hebrew.lang","w")) It runs but the result is not corre

Re: How to find the present working directory using python.

2007-05-04 Thread pradeep nair
On May 4, 12:05 pm, SamG <[EMAIL PROTECTED]> wrote: > On May 4, 12:03 pm, pradeep nair <[EMAIL PROTECTED]> wrote: > > > how to find out the present working directory using python. > > > os.system('pwd') works good. But i need some specific one in > > python rather than embedding shell comma

Re: Replacement for HTMLGen?

2007-05-04 Thread Gerrit Muller
> > That said, can someone recommend a good replacement for > HTMLGen? <...snip...> > Granted, I know HTML doesn't change (much) but it's at least > nice to know something you're going to be using is maintained. <...snip...> Joshua, I am happily using HTMLgen. I do think that maintenance ha

Re: urllib.quote fails on Unicode URL

2007-05-04 Thread Peter Otten
John Nagle wrote: > The code in urllib.quote fails on Unicode input, when > called by robotparser. > > That bit of code needs some attention. > - It still assumes ASCII goes up to 255, which hasn't been true in > Python > for a while now. > - The initialization may not b

Re: 32 OS on 64-bit machine

2007-05-04 Thread Hendrik van Rooyen
"SamG" <[EMAIL PROTECTED]> wrote: > If anyone has a x86_64 machine and is running a 32bit OS on top of > that could you tell me what output would you get for the following > program > > #== > import platform > print platform.processor() > print platform.architecture() > #

Re: base64 and unicode

2007-05-04 Thread Duncan Booth
EuGeNe Van den Bulke <[EMAIL PROTECTED]> wrote: > >>> import base64 > >>> base64.decode(file("hebrew.b64","r"),file("hebrew.lang","w")) > > It runs but the result is not correct: some of the lines in hebrew.lang > are correct but not all of them (hebrew.expected.lang is the correct > file). I g

Re: passing an array of variant in vb to a python COM object = win32com bug ?

2007-05-04 Thread vml
On 4 mai, 06:56, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Thu, 03 May 2007 09:41:57 -0300,vml<[EMAIL PROTECTED]> escribió: > > > On 3 mai, 14:20, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > >> En Thu, 03 May 2007 04:54:43 -0300,vml<[EMAIL PROTECTED]> > >> escribió: > > >> > I have a

Re: tkinter listboxes

2007-05-04 Thread Eric Brunel
On Fri, 04 May 2007 05:26:56 +0200, <[EMAIL PROTECTED]> wrote: > I will give a simplified example of the problem at hand -- > > I have a case in which I have two listboxes - listbox1 and listbox2, > if I click on an item in listbox1 the item gets highlighted as > expected. Now if I click on an ite

invoke user's standard mail client

2007-05-04 Thread [EMAIL PROTECTED]
Hello, the simplest way to launch the user's standard mail client from a Python program is by creating a mailto: URL and launching the webbrowser: def mailto_url(to=None,subject=None,body=None,cc=None): """ encodes the content as a mailto link as described on http://www.faqs.org/rfcs/

Need Help

2007-05-04 Thread Komar Wijaya
Hello, I'm a new guy in Linux. My name is Komar from Indonesia. I am doing a project about GNU radio and i need to install wxPython. I'm using fedora core 5 and suse 10.0 as my operating systems and using python 2.4. In Suse 10.0, I have search the internet and I found file 'python-wxGTK-2..1.0

Re: Getting some element from sets.Set

2007-05-04 Thread [EMAIL PROTECTED]
On May 4, 11:34 am, Peter Otten <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > It is not possible to index set objects. That is OK. > > But, what if I want to find some element from the Set. > > > from sets import Set > > s = Set( range(12 ) > > > if I do pop, that particular element get

Re: Firefighters at the site of WTC7 "Move away the building is going to blow up, get back the building is going to blow up."

2007-05-04 Thread mike3
On May 3, 12:14 am, malibu <[EMAIL PROTECTED]> wrote: > On May 2, 9:46 pm, Eric Gisse <[EMAIL PROTECTED]> wrote: > > > On May 2, 7:10 pm, Midex <[EMAIL PROTECTED]> wrote: > > > [...] > > > I guess the explanation that people were looking at the building and > > watching its' structure deform is too

Re: Firefighters at the site of WTC7 "Move away the building is going to blow up, get back the building is going to blow up."

2007-05-04 Thread mike3
On May 2, 9:10 pm, Midex <[EMAIL PROTECTED]> wrote: > 100% EVIDENCE - SEE THE TRUTH FINALLY - ON THE GROUND VIDEO > WITNESSEShttp://www.youtube.com/watch?v=YNN6apj5B2U > > In order to appreciate just what Truthers are talking about when they > cry Treason over WTC7, you would want to see this His

Re: Firefighters at the site of WTC7 "Move away the building is going to blow up, get back the building is going to blow up."

2007-05-04 Thread mike3
On May 3, 9:53 am, malibu <[EMAIL PROTECTED]> wrote: > On May 3, 12:18 am, Eric Gisse <[EMAIL PROTECTED]> wrote: > > > > > > > On May 2, 10:14 pm, malibu <[EMAIL PROTECTED]> wrote: > > > > On May 2, 9:46 pm, Eric Gisse <[EMAIL PROTECTED]> wrote: > > > > > On May 2, 7:10 pm, Midex <[EMAIL PROTECTED]

Re: My Python annoyances

2007-05-04 Thread Nick Craig-Wood
Thorsten Kampe <[EMAIL PROTECTED]> wrote: > He was using /Windows/ Python in Cygwin *chuckle*... Windows Python > says Ctrl-Z because it doesn't know that it's been run from bash where > Ctrl-Z is for job control. > > And the lesson we learn from that: if you're using Windows Python use >

Re: Firefighters at the site of WTC7 "Move away the building is going to blow up, get back the building is going to blow up."

2007-05-04 Thread mike3
On May 3, 7:22 pm, The Great Attractor <[EMAIL PROTECTED]> wrote: > On 3 May 2007 08:53:39 -0700, malibu <[EMAIL PROTECTED]> wrote: > > > > > > >On May 3, 12:18 am, Eric Gisse <[EMAIL PROTECTED]> wrote: > >> On May 2, 10:14 pm, malibu <[EMAIL PROTECTED]> wrote: > > >> > On May 2, 9:46 pm, Eric Giss

Re: invoke user's standard mail client

2007-05-04 Thread Tim Golden
[EMAIL PROTECTED] wrote: > the simplest way to launch the user's standard mail client from a > Python program is by creating a mailto: URL and launching the > webbrowser: [... snip code ...] > But this method is limited: you cannot specify a file to be attached > to the mail. And I guess that the

Re: Getting some element from sets.Set

2007-05-04 Thread Peter Otten
[EMAIL PROTECTED] wrote: > On May 4, 11:34 am, Peter Otten <[EMAIL PROTECTED]> wrote: >> A set is probably not the appropriate container then. What is your use >> case? > Peter, I need to do a lot of union and intersection operations on > these elements. So, set is a must for me in this case. >

Lisp for the C21

2007-05-04 Thread Mark Tarver
QUOTE Python has readable syntax, a huge library, and bindings for what seems like every major in linux. Perl has CPAN. It seems with those languages if you want to do something all you have to do is import functionality from a library someone had written and use that. In lisp you'd have to "roll

Re: My Python annoyances

2007-05-04 Thread Ross Ridge
Thorsten Kampe <[EMAIL PROTECTED]> wrote: >He was using /Windows/ Python in Cygwin *chuckle*... Windows Python >says Ctrl-Z because it doesn't know that it's been run from bash where >Ctrl-Z is for job control. No, if you run Windows Python from Cygwin bash CTRL-Z works as the EOF character:

Re: Why stay with lisp when there are python and perl?

2007-05-04 Thread Tim Bradshaw
On May 4, 3:06 am, Jon Harrop <[EMAIL PROTECTED]> wrote: > > Lisp compilers are much more advanced, for one thing. Though I hesitate to respond in this thread (and I didn't actually read the rest of the article) there's actually a valid point here. The last programming job I did involved doing so

Re: Why stay with lisp when there are python and perl?

2007-05-04 Thread Tim Bradshaw
On May 4, 10:13 am, Tim Bradshaw <[EMAIL PROTECTED]> wrote: > Anyway the experience of writing in Python was kind of interesting. > [...] So one of the things I learned was "use a > language with a decent compiler"[*] I think. Bugger, I did not realise until too late that this was going to comp.l

Re: DiffLib Question

2007-05-04 Thread whitewave
> Usually, Differ receives two sequences of lines, being each line a > sequence of characters (strings). It uses a SequenceMatcher to compare > lines; the linejunk argument is used to ignore certain lines. For each > pair of similar lines, it uses another SequenceMatcher to compare > charac

Re: base64 and unicode

2007-05-04 Thread EuGeNe Van den Bulke
Duncan Booth wrote: > However, the decoded text looks as though it is utf16 encoded so it should be > written as binary. i.e. > the output mode should be "wb". Thanks for the "wb" tip that works (see bellow). I guess it is experience based but how could you tell that it was utf16 encoded? > S

Re: Firefighters at the site of WTC7 "Move away the building is going to blow up, get back the building is going to blow up."

2007-05-04 Thread James Stroud
mike3 wrote: > On May 2, 9:10 pm, Midex <[EMAIL PROTECTED]> wrote: >> 100% EVIDENCE - SEE THE TRUTH FINALLY - ON THE GROUND VIDEO >> WITNESSEShttp://www.youtube.com/watch?v=YNN6apj5B2U >> >> In order to appreciate just what Truthers are talking about when they >> cry Treason over WTC7, you would

Re: OT somewhat: Do you telecommute? What do you wish the boss understood about it?

2007-05-04 Thread Anton Vredegoor
estherschindler wrote: > * If you telecommute, full- or part-time, what *one* thing do you wish > the CIO or IT Management would understand that they don't currently > "get"? I'm not currently telecommuting but last year I had a telecommuting job for half a year. What I would want to say to all

Antigen Notification: Antigen found a message matching a filter

2007-05-04 Thread Antigen_VITORIA
Microsoft Antigen for Exchange found a message matching a filter. The message is currently Detected. Message: "Python_list Digest_ Vol 44_ Issue 70" Filter name: "KEYWORD= spam: Did you know" Sent from: "[EMAIL PROTECTED]" Folder: "SMTP Messages\Inbound And Outbound" Location: "ITURAN/First Admini

Non blocking sockets with select.poll() ?

2007-05-04 Thread Maxim Veksler
Hi, I'm trying to write a non blocking socket port listener based on poll() because select is limited to 1024 fd. Here is the code, it never gets to "I did not block" until I do a telnet connection to port 1. """ #!/usr/bin/env python import socket import select s = socket.socket(socket.AF_

Re: Why stay with lisp when there are python and perl?

2007-05-04 Thread Pascal Costanza
Jon Harrop wrote: > It is worth noting that eager, statically-typed languages like OCaml and F# > are many times faster than the other languages at this task. This is > precisely the forte of OCaml and F#, manipulating trees and graphs. Here is a page that sums up some important observations abou

Re: How to check if a string is empty in python?

2007-05-04 Thread Jaswant
This is a simple way to do it i think s=hello >>> if(len(s)==0): ... print "Empty" ... else: ... print s ... hello -- http://mail.python.org/mailman/listinfo/python-list

is there a module to work with pickled objects storage in database?

2007-05-04 Thread krishnakant Mane
hello all, I am trying a very complex kind of a task in a project. I have a knowledge management system where I need to store a lot of objects (pickled). I have to store mostly lists and dictionaries into a rdbms. mostly I will be using mysql. I want to know if there is any module that can help m

High resolution sleep (Linux)

2007-05-04 Thread John
The table below shows the execution time for this code snippet as measured by the unix command `time': for i in range(1000): time.sleep(inter) inter execution time ideal 0 0.02 s0 s 1e-44.29 s0.1 s 1e-3

Re: Firefighters at the site of WTC7 "Move away the building is going to blow up, get back the building is going to blow up."

2007-05-04 Thread James Stroud
default wrote: > On 2 May 2007 20:10:20 -0700, Midex <[EMAIL PROTECTED]> wrote: > >> LIES LIES LIES LIES LIES > > Trying to understand the World Trade Center events is like waking up > to act fifteen of a long Greek Tragedy. It needs a complex fabric of > description to give a full picture. In ex

Re: is there a module to work with pickled objects storage in database?

2007-05-04 Thread Paul Boddie
On 4 Mai, 12:18, "krishnakant Mane" <[EMAIL PROTECTED]> wrote: > > I first dump the object into the file through pickle.dump and then > open the file in read mode. > then I read the contents of the file and then store what ever comes > out into the blob field. > I know this is not right and there s

Newbie and Page Re-Loading

2007-05-04 Thread mosscliffe
I am very new to this python world, but I do like the look of the language / syntax, though I have had some problems with indenting using a text editor. I have managed to get my ISP to execute .py files on their server. I have created a .py file and it does in fact do the various little tasks I h

ftplib acting weird

2007-05-04 Thread Merrigan
Hi All, I have written a little script to upload some files to an ftp folder. The problem is as follows : I wrote the script on my windows laptop, and I want to run it from mylinux server. Everything worked fine so I uploaded it to my linux machine. Every time I tun the script I get the following

Re: Active Directory: how to delete a user from a group?

2007-05-04 Thread Dirk Hagemann
On 2 Mai, 17:48, Tim Golden <[EMAIL PROTECTED]> wrote: > Tim Golden wrote: > >Dirk Hagemannwrote: > >> Hi! > > >> Does anyone has experience with manipulating MS Active Directory > >> objects? I'd like to delete some users from a group, but so far I > >> couldn't find anything about this. > >> Ther

Re: How to check if a string is empty in python?

2007-05-04 Thread Tim Williams
On 4 May 2007 03:02:37 -0700, Jaswant <[EMAIL PROTECTED]> wrote: > This is a simple way to do it i think > > > s=hello > > >>> if(len(s)==0): > print "Empty" > else: > print s > > hello Not as simple as " If not s: " and nowhere near as simple as " print s or 'Emp

Re: Why are functions atomic?

2007-05-04 Thread Dustan
On May 4, 1:36 am, Michael <[EMAIL PROTECTED]> wrote: > On May 2, 6:08 am, Carsten Haese <[EMAIL PROTECTED]> wrote: > > > On Tue, 2007-05-01 at 22:21 -0700, Michael wrote: > > > Is there a reason for using the closure here? Using function defaults > > > seems to give better performance:[...] > > >

Re: Non blocking sockets with select.poll() ?

2007-05-04 Thread Jean-Paul Calderone
On Fri, 4 May 2007 13:04:41 +0300, Maxim Veksler <[EMAIL PROTECTED]> wrote: >Hi, > >I'm trying to write a non blocking socket port listener based on >poll() because select is limited to 1024 fd. > >Here is the code, it never gets to "I did not block" until I do a >telnet connection to port 1. >

Re: 4 quadrant atan

2007-05-04 Thread Roel Schroeven
Charles Sanders schreef: > Roel Schroeven wrote: >> I might be wrong of course, but can't you just use atan2? Only problem >> is that it returns negative angles for quadrants 3 and 4, but that is >> easily solved. In Python: >> >> from math import atan2, pi, fmod >> def vectorAngle(x, y): >>

Re: Calling Exe from Python

2007-05-04 Thread Rex Turnbull
muhamad.abbas : > Hello Folks, > > This is what i am required to do. > Call an executable from my python script, and when the executable is > finished running, i should continue with my python script. > > I have tried "os.exec()" but it calls the executable and never returns > to the calling pyth

Re: Non blocking sockets with select.poll() ?

2007-05-04 Thread Maxim Veksler
On 5/4/07, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On Fri, 4 May 2007 13:04:41 +0300, Maxim Veksler <[EMAIL PROTECTED]> wrote: > >Hi, > > > >I'm trying to write a non blocking socket port listener based on > >poll() because select is limited to 1024 fd. > > > >Here is the code, it never ge

PHP or Python Developer needed

2007-05-04 Thread Marie
I represent Chris TALARICO & Associates, Inc., an award winning personnel placement service. Our client seeks a PHP or Python developer for a 2-6 month assignment in Reading, PA. Please contact me if you would be interested in learning more about this opportunity or if you know of someone who

Re: Non blocking sockets with select.poll() ?

2007-05-04 Thread Maxim Veksler
On 5/4/07, Maxim Veksler <[EMAIL PROTECTED]> wrote: > On 5/4/07, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > > On Fri, 4 May 2007 13:04:41 +0300, Maxim Veksler <[EMAIL PROTECTED]> wrote: > > >Hi, > > > > > >I'm trying to write a non blocking socket port listener based on > > >poll() because se

Where are the strings in gc.get_objects?

2007-05-04 Thread Edward K Ream
Hello all. I'm tracking down memory leaks in my app. To do this I wrote a script to show the numbers of each different type of object. But it doesn't show strings! Here is the script: import gc,types def printDict(d): keys = d.keys() ; keys.sort() print '-' * 30 for key in keys:

Re: anyone has experience on cross-compile python 2.5.1?

2007-05-04 Thread Leo Jay
On 4/30/07, Leo Jay <[EMAIL PROTECTED]> wrote: > i have a development board based on s3c2410 arm cpu. and i want to > port python on it. > after googling some threads, i successfully cross compiled python. > but i still encountered a weird issue that when i ran > /lib/python2.5/test/testall.py, > t

Re: hp 11.11 64 bit python 2.5 build gets error "import site failed"

2007-05-04 Thread bhochstetler
On May 4, 1:17 am, Leo Kislov <[EMAIL PROTECTED]> wrote: > On May 3, 2:54 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > > > > >>> "import site failed" > > >>> OverflowError: signed integer is greater than the maximum. > > >> - what is the value of ival? > > > ival: 4294967295 > > > I see. Th

Re: Why stay with lisp when there are python and perl?

2007-05-04 Thread David Formosa (aka ? the Platypus)
Nameless wrote: > Why should I keep on learning lisp when there are python and perl? The more programing languages you know the better programer you will be. Lisp can teach you a number of key things that are required to be a good programmer in any of the P* lanuages. -- http://mail.python.org/

Re: Why are functions atomic?

2007-05-04 Thread Chris Mellon
On 3 May 2007 23:36:11 -0700, Michael <[EMAIL PROTECTED]> wrote: > On May 2, 6:08 am, Carsten Haese <[EMAIL PROTECTED]> wrote: > > On Tue, 2007-05-01 at 22:21 -0700, Michael wrote: > > > Is there a reason for using the closure here? Using function defaults > > > seems to give better performance:[.

using pyparsing to extract METEO DATAS

2007-05-04 Thread napolpie
DISCUSSION IN USER nappie writes: Hello, I'm Peter and I'm new in python codying and I'm using parsying to extract data from one meteo Arpege file. This file is long file and it's composed by word and number arguments like this: GRILLE EURAT5 Coin Nord-Ouest : 46.50/ 0.50 Coin Sud-E Hello, I'm Pet

RE: Strange terminal behavior after quitting Tkinter application

2007-05-04 Thread Hamilton, William
> -Original Message- > From: Chris > Subject: Re: Strange terminal behavior after quitting Tkinter application > Clicking 'Quit' or on the window's 'x' causes the application to quit > without messing up the terminal. With root.mainloop() commented out, > though, no combination of root.quit

Re: How to find the present working directory using python.

2007-05-04 Thread Isaac Rodriguez
> how to find out the present working directory using python. > Try this: import os os.getcwd() It returns the current working directory. Thanks, - Isaac. -- http://mail.python.org/mailman/listinfo/python-list

Plot with scipy

2007-05-04 Thread redcic
Hi all, I've just downloaded scipy v 0.5.2 and I would like to be able to draw plots. I've tried: import scipy.gplt import scipy.plt import scipy.xplt and none of them work. Are these modules still included in scipy ? If not, where can I find them ? Thanks for your answers, Cédric -- http://m

Re: Non blocking sockets with select.poll() ?

2007-05-04 Thread Jean-Paul Calderone
On Fri, 4 May 2007 15:05:46 +0300, Maxim Veksler <[EMAIL PROTECTED]> wrote: >On 5/4/07, Maxim Veksler <[EMAIL PROTECTED]> wrote: >>On 5/4/07, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: >> > On Fri, 4 May 2007 13:04:41 +0300, Maxim Veksler <[EMAIL PROTECTED]> >>wrote: >> > >Hi, >> > > >> > >I'm

Re: default config has no md5 module?

2007-05-04 Thread Sebastian Bassi
On 5/4/07, Leo Jay <[EMAIL PROTECTED]> wrote: > i want to compile a python by myself, but after configure and make, it > seems that md5 is not built by default. > > what should i do to compile md5 as an module? md5 module was deprecated, now it functions are in hashlib. (see http://docs.python.org

Re: Real Time Battle and Python

2007-05-04 Thread hg
Matimus wrote: > On May 3, 5:20 am, hg <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I have started to work on a python-based robot, and am interested in your >> feedback: >> >> http://realtimebattle.sourceforge.net/www.snakecard.com/rtb >> >> hg > > This is not necessarily a response to your effort, b

Re: How do I get type methods?

2007-05-04 Thread yavannadil
On 4 май, 09:08, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Fri, 04 May 2007 01:34:20 -0300, <[EMAIL PROTECTED]> escribio: > > I'm not against 'dir(MyClass)'; the question is, what should I 'dir()' > > to get methods of 'pyuno' type instance? > Usually instances don't have its own methods,

Re: base64 and unicode

2007-05-04 Thread Duncan Booth
EuGeNe Van den Bulke <[EMAIL PROTECTED]> wrote: > Duncan Booth wrote: >> However, the decoded text looks as though it is utf16 encoded so it >> should be written as binary. i.e. the output mode should be "wb". > > Thanks for the "wb" tip that works (see bellow). I guess it is > experience based

Re: My Python annoyances

2007-05-04 Thread Ben Collver
Paul Boddie wrote: > I'm sorry to hear about that. If by "macho" you mean people who insist > that things are good enough as they are, and that newcomers should > themselves adapt to whatever they may discover, instead of things > being improved so that they are more intuitive and reliable for > ne

RE: unittest dependencies

2007-05-04 Thread Urban, Gabor
Hullo! I have several questions about this problem. Do you have more test scripts using the unittest framework? My blind idea would be the following: run test b first, and go forward when no errors are found. To do this you could change the TestRunner component. The official documentation is g

Re: Firefighters at the site of WTC7 "Move away the building is going to blow up, get back the building is going to blow up."

2007-05-04 Thread default
On Fri, 04 May 2007 03:26:17 -0700, James Stroud <[EMAIL PROTECTED]> wrote: >default wrote: >> On 2 May 2007 20:10:20 -0700, Midex <[EMAIL PROTECTED]> wrote: >> >>> LIES LIES LIES LIES LIES >> >> Trying to understand the World Trade Center events is like waking up >> to act fifteen of a long Gre

Re: Replacement for HTMLGen?

2007-05-04 Thread Walter Dörwald
Joshua J. Kugler wrote: > I realize that in today's MVC-everything world, the mere mention of > generating HTML in the script is near heresy, but for now, it's what I ened > to do. :) > > That said, can someone recommend a good replacement for HTMLGen? I've found > good words about it (http://www

Re: My Python annoyances

2007-05-04 Thread Chris Mellon
On 5/4/07, Ben Collver <[EMAIL PROTECTED]> wrote: > Paul Boddie wrote: > > I'm sorry to hear about that. If by "macho" you mean people who insist > > that things are good enough as they are, and that newcomers should > > themselves adapt to whatever they may discover, instead of things > > being im

Re: My Python annoyances

2007-05-04 Thread Ben Collver
Terry Reedy wrote: > Three days after you posted, 'gagenellina' explained that he thought your > complaint was invalid. > "py> -531560245 & 0x > 3763407051L > > It's the same number (actually, the same bit pattern). ..." > > A few weeks later, noticing that you had not challenged his exp

Re: Organizing code - import question

2007-05-04 Thread Carlos Hanson
On 5/3/07, Brian Blais <[EMAIL PROTECTED]> wrote: > Carlos Hanson wrote: > > It looks like you need __init__.py in MyPackage. Then you can import > > starting with MyPackage. For example, you might use one of the > > following: > > > > import MyPackage > > from MyPackage.Common import * > >

Re: My Python annoyances

2007-05-04 Thread Ben Collver
Thorsten Kampe wrote: > He was using /Windows/ Python in Cygwin *chuckle*... Windows Python > says Ctrl-Z because it doesn't know that it's been run from bash where > Ctrl-Z is for job control. > > And the lesson we learn from that: if you're using Windows Python use > a Windows shell. If you'r

Re: tkinter listboxes

2007-05-04 Thread rahulnag22
On May 4, 1:55 am, "Eric Brunel" <[EMAIL PROTECTED]> wrote: > On Fri, 04 May 2007 05:26:56 +0200, <[EMAIL PROTECTED]> wrote: > > I will give a simplified example of the problem at hand -- > > > I have a case in which I have two listboxes - listbox1 and listbox2, > > if I click on an item in listbox

Re: BUSTED!!! 100% VIDEO EVIDENCE that WTC7 was controlled demolition!! NEW FOOTAGE!!! Ask yourself WHY havn't I seen this footage before?

2007-05-04 Thread MooseFET
On May 3, 4:08 pm, quasi <[EMAIL PROTECTED]> wrote: > On Fri, 04 May 2007 09:37:37 +1200, Gib Bogle > > <[EMAIL PROTECTED]> wrote: > >Ah, so the firefighters were in on the conspiracy! > > No, but the firefighters are very much aware that there is more to > 9/11 than has been officially revealed. >

Re: Plot with scipy

2007-05-04 Thread Lou Pecora
In article <[EMAIL PROTECTED]>, redcic <[EMAIL PROTECTED]> wrote: > Hi all, > > I've just downloaded scipy v 0.5.2 and I would like to be able to draw > plots. I've tried: > import scipy.gplt > import scipy.plt > import scipy.xplt > > and none of them work. Are these modules still included in s

Re: Plot with scipy

2007-05-04 Thread redcic
I've already got this package. I just wanted to try something new. However, since you talk about it, I've got a question regarding this package. The execution of the code stops after the line: pylab.show() which is off course the last line of my code. My problem is that I have to close the figure

Re: Decorating class member functions

2007-05-04 Thread Andy Terrel
Thanks Peter and 7stud. That is the solution that really works for me. -- http://mail.python.org/mailman/listinfo/python-list

Re: My Python annoyances

2007-05-04 Thread Ben Collver
Chris Mellon wrote: > #python is one of the most accepting communities around. If the bug > reports here and the way you've presented them in this thread (vs the > way that they appear to an outside observer) are any indication, > though, I'm not surprised that you might have left in a huff. > > B

How safe is a set of floats?

2007-05-04 Thread Thomas Nelson
I want to generate all the fractions between 1 and limit (with limit>1) in an orderly fashion, without duplicates. def all_ratios(limit): s = set() hi = 1.0 lo = 1.0 while True: if hi/lo not in s: s.add(hi/lo) yield (hi,lo) hi += 1 if

Re: My Python annoyances

2007-05-04 Thread Ben Collver
Ben Collver wrote: > Chris Mellon wrote: >> Code like this is working directly against Python philosophy. You >> probably got told this on #python, too. There's hardly any >> circumstance where you should need to validate the exact class of an >> object, and as long as they have the same interface

Re: My Python annoyances

2007-05-04 Thread Chris Mellon
On 5/4/07, Ben Collver <[EMAIL PROTECTED]> wrote: > Ben Collver wrote: > > Chris Mellon wrote: > >> Code like this is working directly against Python philosophy. You > >> probably got told this on #python, too. There's hardly any > >> circumstance where you should need to validate the exact class o

Re: My Python annoyances

2007-05-04 Thread Ant
On May 4, 3:17 pm, Ben Collver <[EMAIL PROTECTED]> wrote: > Chris Mellon wrote: ... > > Code like this is working directly against Python philosophy. You > > probably got told this on #python, too. There's hardly any > > circumstance where you should need to validate the exact class of an > > objec

Re: How do I get type methods?

2007-05-04 Thread Thomas Nelson
On May 4, 7:59 am, [EMAIL PROTECTED] wrote: > On 4 ÍÁÊ, 09:08, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > > > En Fri, 04 May 2007 01:34:20 -0300, <[EMAIL PROTECTED]> escribio: > > > I'm not against 'dir(MyClass)'; the question is, what should I 'dir()' > > > to get methods of 'pyuno' type ins

Re: Tcl-tk 8.5?

2007-05-04 Thread Kevin Walzer
James Stroud wrote: > Méta-MCI wrote: >> Any plan to integrate Tcl 8.5 in standard Python? >> > > Better would be to outegrate it and instead use another gui kit as the > standard. > This statement puzzles me, as you are something of a Tkinter expert (you have helped me with some Tk issues). W

Re: My Python annoyances

2007-05-04 Thread Ben Collver
Chris Mellon wrote: > You should "check" for the methods by calling them. If the object > doesn't support the method in question, you will get a runtime > exception. Premature inspection of an object is rarely useful and > often outright harmful. That makes sense, thank you for the response. What

Re: My Python annoyances

2007-05-04 Thread Alex Martelli
Chris Mellon <[EMAIL PROTECTED]> wrote: > > > I am unqualified to comment on the Python philosophy, but I would like > > > for my function to do some basic error checking on its arguments. > > > > By "basic error checking" I mean "verify that the file argument actually > > is a file-like object".

Re: How safe is a set of floats?

2007-05-04 Thread Alex Martelli
Thomas Nelson <[EMAIL PROTECTED]> wrote: > I want to generate all the fractions between 1 and limit (with > limit>1) in an orderly fashion, without duplicates. > > def all_ratios(limit): > s = set() > hi = 1.0 > lo = 1.0 > while True: > if hi/lo not in s: > s.a

Re: My Python annoyances

2007-05-04 Thread Alex Martelli
Ben Collver <[EMAIL PROTECTED]> wrote: > Chris Mellon wrote: > > You should "check" for the methods by calling them. If the object > > doesn't support the method in question, you will get a runtime > > exception. Premature inspection of an object is rarely useful and > > often outright harmful. >

Re: Strange terminal behavior after quitting Tkinter application

2007-05-04 Thread Chris
On May 4, 8:52 pm, "Hamilton, William " <[EMAIL PROTECTED]> wrote: > > -Original Message- > > From: Chris > > Subject: Re: Strange terminal behavior after quittingTkinter > application > > Clicking 'Quit' or on the window's 'x' causes the application to quit > > without messing up the termi

Re: My Python annoyances

2007-05-04 Thread Ben Collver
Alex Martelli wrote: > "Type-switching" in this way is a rather dubious practice in any > language (it can't respect the "open-closed" principle). Can't you have > those objects wrapped in suitable wrappers with a "copyorwrite" method > that knows what to do? For example, StringIO.StringIO is a s

Re: How do I get type methods?

2007-05-04 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Thomas Nelson wrote: > On May 4, 7:59 am, [EMAIL PROTECTED] wrote: >> Let me retype my question: what I 'dir()' in case of 'pyuno' type >> instance? >> Or in case of 'dict' type instance? Or in case of any other new python >> type? > class Foo: > ... def f(self,x)

Re: Why stay with lisp when there are python and perl?

2007-05-04 Thread Rayiner Hashem
> It is worth noting that eager, statically-typed languages like OCaml and F# > are many times faster than the other languages at this task. This is > precisely the forte of OCaml and F#, manipulating trees and graphs. To be fair, it is also worth noting that both the OCaml and F# implementations

Re: Lisp for the C21

2007-05-04 Thread Paul Rubin
Mark Tarver <[EMAIL PROTECTED]> writes: > See my remarks on the Lisp for the Twenty First Century > http://www.lambdassociates.org/lC21.htm Anyone who didn't love lisp in the 20th century has no heart. Anyone who still loves it in the 21st, has no head. -- http://mail.python.org/mailman/listinfo/

Re: How safe is a set of floats?

2007-05-04 Thread Paul McGuire
On May 4, 9:50 am, [EMAIL PROTECTED] (Alex Martelli) wrote: > Thomas Nelson <[EMAIL PROTECTED]> wrote: > > I want to generate all the fractions between 1 and limit (with > > limit>1) in an orderly fashion, without duplicates. > > > def all_ratios(limit): > > s = set() > > hi = 1.0 > > l

Re: curses mystical error output

2007-05-04 Thread Skip Montanaro
> You might be trying to write to a section that is currently off > screen. Bingo. I *thought* I was okay, but I wasn't refreshing until the end of the display loop, so I never saw all the addstr() calls that had succeeded but which had yet to be painted. Adding a refresh() call in the loop expo

Re: How safe is a set of floats?

2007-05-04 Thread Arnaud Delobelle
On May 4, 3:21 pm, Thomas Nelson <[EMAIL PROTECTED]> wrote: > I want to generate all the fractions between 1 and limit (with > limit>1) in an orderly fashion, without duplicates. > > def all_ratios(limit): > s = set() > hi = 1.0 > lo = 1.0 > while True: > if hi/lo not in s:

ANN: ActivePython 2.5.1.1 is now available

2007-05-04 Thread Trent Mick
I'm happy to announce that ActivePython 2.5.1.1 is now available for download from: http://www.activestate.com/products/activepython/ This is a patch release that updates ActivePython to core Python 2.5.1. This release also fixes a couple problems with running pydoc from the command line on W

Re: Why are functions atomic?

2007-05-04 Thread John Nagle
Michael wrote: > On May 2, 6:08 am, Carsten Haese <[EMAIL PROTECTED]> wrote: > >>On Tue, 2007-05-01 at 22:21 -0700, Michael wrote: > I agree the performance gains are minimal. Using function defaults > rather than closures, however, seemed much cleaner an more explicit to > me. For example, I h

Re: Microsoft's Dynamic Languages Runtime (DLR)

2007-05-04 Thread Kaz Kylheku
On May 2, 5:19 pm, sturlamolden <[EMAIL PROTECTED]> wrote: > On May 3, 2:15 am, Kaz Kylheku <[EMAIL PROTECTED]> wrote: > > > Kindly refrain from creating any more off-topic, cross-posted threads. > > Thanks. > > The only off-topic posting in this thread is your own (and now this > one). You are ma

Re: How safe is a set of floats?

2007-05-04 Thread Peter Otten
Paul McGuire wrote: > Does set membership test for equality ("==") or identity ("is")? As Alex said, equality: >>> a = 0.0 >>> b = -0.0 >>> a is b False >>> a == b True >>> set([a, b]) set([0.0]) Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: is there a module to work with pickled objects storage in database?

2007-05-04 Thread Bruno Desthuilliers
krishnakant Mane a écrit : > hello all, > I am trying a very complex kind of a task in a project. > I have a knowledge management system where I need to store a lot of > objects (pickled). I have to store mostly lists and dictionaries into > a rdbms. Which totally defeats the purpose of a rdbms.

Re: New York City Python Users Group Meeting - Tuesday May 8th

2007-05-04 Thread ddimuc
Does that mean if I am not "in the NYC area", I am not welcomed?  Not even if I frequently visit NYC (Manhattan)?  If I were born and raised in NYC (not necessarily Manhattan), would I be granted the opportunity to attend?  Hmm... DPD. John Clark wrote: Greetings! The next Ne

  1   2   >