Re: Question: Best Practice? (module 'shelve')

2007-01-09 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Thomas Ploch wrote: >> I just wanted to know, if there is any best practice concerning >> following code: >> >> […] >> >> def match(self, src, url): >> self.matchDict = {} >> self.matchDict[url] = {} >> # The next 2 functions just add stuff to self

maximum number of threads

2007-01-09 Thread Paul Sijben
I have a server in Python 2.5 that generates a lot of threads. It is running on a linux server (Fedora Core 6). The server quickly runs out of threads. I am seeing the following error. File "/home/sijben/ORCA/src/libmercury_mt.py", line 565, in __init__ MercuryObject.__init__(self,mylink)

Re: how to clean sys.path

2007-01-09 Thread siggi
Thank you Laszlo! Take care, siggi "Laszlo Nagy" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > >> >> So far, I know only the command >>>sys.path.append(r'c:etc...'), but >> how to delete or insert at the beginning of the list, I know not. >> > You can delete a slice.

Re: File Closing Problem in 2.3 and 2.4, Not in 2.5 (Final report)

2007-01-09 Thread Gabriel Genellina
At Wednesday 10/1/2007 02:36, Julio Biason wrote: [Kinda stealing the thread] (at least a related question!) If I use a file() in a for, how to I explicitely close the file? for line in file('contents'): print line Would this work like the new 'with' statement or it will only be close

Re: dynamic library loading, missing symbols

2007-01-09 Thread Martin v. Löwis
[EMAIL PROTECTED] schrieb: > However, the linker fails at runtime here because it can't > find this symbol. The variable in question does exist in the C++ code > that in does dlopen. Did you verify, using nm -D, that the symbol is indeed present in the shared object, not just in the source code?

Re: How do I add users using Python scripts on a Linux machine

2007-01-09 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Piet van Oostrum wrote: > Lawrence D'Oliveiro <[EMAIL PROTECTED]> (LD) wrote: > In message <[EMAIL PROTECTED]>, Piet van Oostrum wrote: > >> The scenario is as follows: Suppose the script starts with the line: >> #!/usr/bin/python >> >> (using #!/usr/bin/env pytho

Re: distutils and ctypes

2007-01-09 Thread Martin v. Löwis
Robert Kern schrieb: > To which I say that doing the type-checking and error handling is much easier > in > Python than using the C API. Add to that the tediousness of the > edit-compile-run > cycle of C and the finickiness of refcounting. Sure: edit-compile-run is tedious, but in the given case

Wierd M2Crypto bug - phony "peer did not return certificate" error

2007-01-09 Thread John Nagle
Here's a wierd problem: I have a little test case for M2Crypto, which just opens up SSL connections to web servers and reads their certificates. This works fine. But if I execute socket.setdefaulttimeout(5.0) so that the sockets don't wait too long if there's no SSL server, I get a "peer

Re: "tkinter module not found" please help

2007-01-09 Thread Asper Faner
[EMAIL PROTECTED] wrote: > I'm trying to install python2.5 on my computer(os Fedora 5). My problem > is that I'm unable to get the tkinter module loaded into python. I've > tried the solution here:"wiki.python.org/moin/TkInter" but am unsure as > how to modify my setup.py script. I have installed

Re: File Closing Problem in 2.3 and 2.4, Not in 2.5 (Final report)

2007-01-09 Thread Julio Biason
[Kinda stealing the thread] On Tue, Jan 09, 2007 at 09:05:30PM -0300, Gabriel Genellina wrote: > And do you actually need so many open files simultaneously? > Try to close them explicitely when you finish working on them - do > not rely on GC for closing files. This has *always* been the > recom

Announcement -- ZestyParser

2007-01-09 Thread Adam Atlas
This has been on Cheese Shop for a few weeks now, being updated now and then, but I never really announced it. I just now put up a real web page for it, so I thought I'd take the opportunity to mention it here. ZestyParser is my attempt at a flexible toolkit for creating concise, precise, and Pyth

Re: where is python on linux?

2007-01-09 Thread Kevin Yuan
Frank Potter wrote: >> ... where is the executable python file? ... >> > > does > > whereis python "whereis" is cool! -- http://mail.python.org/mailman/listinfo/python-list

pgen2 use questions.

2007-01-09 Thread Brian L. Troutwine
I happened to stumble upon Guido's announcement of his python2 to python3 refactoring tool earlier today (http://mail.python.org/pipermail/python-3000/2006-December/005102.html), and, after playing with it a bit, I have some use questions as I don't quite understand how the pattern matching languag

Re: File Closing Problem in 2.3 and 2.4, Not in 2.5 (Final report)

2007-01-09 Thread Mark T
"Gabriel Genellina" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > At Tuesday 9/1/2007 20:31, Carroll, Barry wrote: > >>I've spent about a day investigating our "too many open files" error. I >>found the following: >> >> 1. Windows XP allows a Python 2.5 script to open 509

Re: Python - C# interoperability

2007-01-09 Thread Luis M. González
mc wrote: > Is there an easy way to compile a Python class (or set of classes) into > a .DLL that a C# program can call? Or otherwise to use an existing > library of Python classes from a C# program as seamlessly as possible? I'm affraid this is not possible. Ironpython (the .NET python implemen

Re: Summarizing data by week

2007-01-09 Thread Dan Bishop
On Jan 9, 1:57 pm, "Mike Orr" <[EMAIL PROTECTED]> wrote: > What's the best way to summarize data by week? I have a set of > timestamped records, and I want a report with one row for each week in > the time period, including zero rows if there are weeks with no > activity. I was planning to use IS

"tkinter module not found" please help

2007-01-09 Thread notsonice51
I'm trying to install python2.5 on my computer(os Fedora 5). My problem is that I'm unable to get the tkinter module loaded into python. I've tried the solution here:"wiki.python.org/moin/TkInter" but am unsure as how to modify my setup.py script. I have installed the latest versions of tcl/tk (8.4

Re: Read CSV file into an array

2007-01-09 Thread Robert Kern
oyekomova wrote: > I would like to know how to read a CSV file with a header ( n columns > of float data) into an array without the header row. Did you read our responses from the last time you asked this question? -- Robert Kern "I have come to believe that the whole world is an enigma, a harm

Read CSV file into an array

2007-01-09 Thread oyekomova
I would like to know how to read a CSV file with a header ( n columns of float data) into an array without the header row. -- http://mail.python.org/mailman/listinfo/python-list

RE: File Closing Problem in 2.3 and 2.4, Not in 2.5 (Final report)

2007-01-09 Thread Gabriel Genellina
At Tuesday 9/1/2007 22:03, Carroll, Barry wrote: The first assumption was correct: the file object is destroyed. The second assumption is apparently incorrect: the file handle is not released when the associated object is destroyed. These 'orphaned' file handles build up and when the OS hand

RE: File Closing Problem in 2.3 and 2.4, Not in 2.5 (Final report)

2007-01-09 Thread Carroll, Barry
Hi, Gabriel, > -Original Message- > From: Gabriel Genellina [mailto:[EMAIL PROTECTED] > Sent: Tuesday, January 09, 2007 4:06 PM > To: python-list@python.org > Subject: RE: File Closing Problem in 2.3 and 2.4, Not in 2.5 (Final > report) > > At Tuesday 9/1/2007 20:31, Carroll, Barry wrote:

Re: Question: Best Practice? (module 'shelve')

2007-01-09 Thread Thomas Ploch
Thomas Ploch schrieb: > Hello fellows, > > I just wanted to know, if there is any best practice concerning > following code: > > import re, shelve > > class TextMatcher: > def __init__(self, patterns, email=False, dbName='textmatch.db'): > self._initPatterns(patterns) > self.

Question: Best Practice? (module 'shelve')

2007-01-09 Thread Thomas Ploch
Hello fellows, I just wanted to know, if there is any best practice concerning following code: import re, shelve class TextMatcher: def __init__(self, patterns, email=False, dbName='textmatch.db'): self._initPatterns(patterns) self.email = email self.dbName = dbName

tkinter Ignoring Certain Key Presses?

2007-01-09 Thread Tim Daneliuk
I am having trouble getting tkinter to recognize the following key presses- it seems to be ignoring them alltogether: Alt F1-F10: FreeBSD 4.x console running XFree86 and cygwin/X (current) connected to same machine. Works on cygwin/X local to Windows machine and native W

dynamic library loading, missing symbols

2007-01-09 Thread [EMAIL PROTECTED]
While my question doesn't pertain specifically to python programming, it is a result of developing a python module, so I'm hoping someone here might have experience with this issue. So, first a little background to how the system works right now. I am developing a module for Python. The original c

Re: find.find

2007-01-09 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Gigs_ wrote: > import fnmatch, os > > def find(pattern, startdir=os.curdir): > matches = [] > os.path.walk(startdir, findvisitor, (matches, pattern)) > matches.sort() > return matches > > def findvisitor((matches, pattern), thisdir, nameshere): # >

Re: pyExcelerator big integer values

2007-01-09 Thread John Machin
On Jan 10, 12:30 am, "Gacha" <[EMAIL PROTECTED]> wrote: > I use pyExcelerator to import some data from xml file. One column > contains integer values like: > 4750456000708 > 4750456000715 > 4750456000333 I think you must mean "xls", not "xml". Those are integers only in the mathematical sens

RE: File Closing Problem in 2.3 and 2.4, Not in 2.5 (Final report)

2007-01-09 Thread Gabriel Genellina
At Tuesday 9/1/2007 20:31, Carroll, Barry wrote: I've spent about a day investigating our "too many open files" error. I found the following: 1. Windows XP allows a Python 2.5 script to open 509 concurrent files. And do you actually need so many open files simultaneously?

maildir->mbox conversion script review

2007-01-09 Thread matej
Hi, I am writing a script to convert couple of thousand emails (in couple of hundred folders) and before I will get to the hard part -- maintaing structure folders and subfolders, and maintaing record of the status of the message, I would like to be sure that I have at least maildir->mbox conversi

Re: distutils and ctypes

2007-01-09 Thread Robert Kern
Martin v. Löwis wrote: > Robert Kern schrieb: >>> Not sure it's stupid, but I wonder why you want to use ctypes. What's >>> wrong with extension modules? >> What's wrong with ctypes? They're both valid, useful approaches to connect >> to C >> libraries. > > See the original posting. Distutils doe

RE: File Closing Problem in 2.3 and 2.4, Not in 2.5 (Final report)

2007-01-09 Thread Carroll, Barry
John et al: I've spent about a day investigating our "too many open files" error. I found the following: 1. Windows XP allows a Python 2.5 script to open 509 concurrent files. 2. RedHat Fedora Core 1 allows a Python 2.3 script to open 1022 concurrent fi

The trouble with sockets.... (fixing inheritance, etc.)

2007-01-09 Thread rossabri
This topic has been addressed in limited detail in other threads: [1] "sockets don't play nice with new style classes :(" May 14 2005. http://groups.google.com/group/comp.lang.python/browse_thread/thread/76d27388b0d286fa/c9849013e37c995b [2] "Subclassing socket" Dec 20 2005 - Jan 14 2006. http://

[ANN] win32 binaries for zope.interface 3.3.0

2007-01-09 Thread Petri Savolainen
Both eggs and installers (exe) are available for Python 2.4 & 2.5 from: http://www.zope.org/Members/saffe/zope_interface/folder_contents Compiled on winxp pro using mingw32 "current". Cheers, Petri -- http://mail.python.org/mailman/listinfo/python-list

Re: What does the -O flag do?

2007-01-09 Thread Martin v. Löwis
Sard schrieb: > "Optimize generated bytecode (also PYTHONOPTIMIZE=x). Asserts are > suppressed." > > Is removing asserts all it does, where can I find more details? I'm > guessing it's not very useful as I hardly ever see it mentioned. It somewhat depends on the Python version. To find out preci

Re: Non-blocking pipes during subprocess handling

2007-01-09 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Tom Plunket <[EMAIL PROTECTED]> wrote: > I'm using subprocess to launch, well, sub-processes, but now I'm > stumbling due to blocking I/O. > > Is there a way for me to know that there's data on a pipe, and possibly > how much data is there so I can get it? Curren

Re: injecting functions into a python sandbox within a python program

2007-01-09 Thread Bruno Desthuilliers
Graham Menhennitt a écrit : > I have a large Python 2.5 program that I want my users to be able to > "extend" using a Python script. However, I want their script to run in a > sandbox within the overall program so that they only have access to the > rest of the program via a single simple interf

find.find

2007-01-09 Thread Gigs_
import fnmatch, os def find(pattern, startdir=os.curdir): matches = [] os.path.walk(startdir, findvisitor, (matches, pattern)) matches.sort() return matches def findvisitor((matches, pattern), thisdir, nameshere): # for name in nameshere: if fnmatch.fnmatch(name

Re: Python - C# interoperability

2007-01-09 Thread Bruno Desthuilliers
mc a écrit : > Is there an easy way to compile a Python class (or set of classes) into > a .DLL that a C# program can call? Or otherwise to use an existing > library of Python classes from a C# program as seamlessly as possible? > I can't tell if that'll do, but have you looked at IronPython ? --

Re: Python - C# interoperability

2007-01-09 Thread Martin v. Löwis
mc schrieb: > Is there an easy way to compile a Python class (or set of classes) into > a .DLL that a C# program can call? Or otherwise to use an existing > library of Python classes from a C# program as seamlessly as possible? You should take a look at IronPython, which supports that kind of thi

Re: distutils and ctypes

2007-01-09 Thread Martin v. Löwis
Robert Kern schrieb: >> Not sure it's stupid, but I wonder why you want to use ctypes. What's >> wrong with extension modules? > > What's wrong with ctypes? They're both valid, useful approaches to connect to > C > libraries. See the original posting. Distutils doesn't support building arbitrary

injecting functions into a python sandbox within a python program

2007-01-09 Thread Graham Menhennitt
I have a large Python 2.5 program that I want my users to be able to "extend" using a Python script. However, I want their script to run in a sandbox within the overall program so that they only have access to the rest of the program via a single simple interface. Note that this is not meant to

What does the -O flag do?

2007-01-09 Thread Sard
http://rgruet.free.fr/PQR25/PQR2.5.html says "Optimize generated bytecode (also PYTHONOPTIMIZE=x). Asserts are suppressed." Is removing asserts all it does, where can I find more details? I'm guessing it's not very useful as I hardly ever see it mentioned. -- http://mail.python.org/mailman/lis

Re: Internet Survey

2007-01-09 Thread Elan Magavi
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello all, > > I represent Octabox, an Internet Start-up developing a wide-scale > platform for Internet services. We are very interested to know your > thoughts on Internet productivity and how it might be improved, and to > that end

Python - C# interoperability

2007-01-09 Thread mc
Is there an easy way to compile a Python class (or set of classes) into a .DLL that a C# program can call? Or otherwise to use an existing library of Python classes from a C# program as seamlessly as possible? -- http://mail.python.org/mailman/listinfo/python-list

A question about IDLE and environment variables

2007-01-09 Thread Tristan
Hello community: I post this because I could not find satisfactory answers in the posts generated by this nice group. I work on winXP. I have many little python applications in different folders, each application can share or not other objects located in the same or other folders. The way I work to

Re: Internet Survey

2007-01-09 Thread CBFalconer
[EMAIL PROTECTED] wrote: > > I represent Octabox, an Internet Start-up developing a wide-scale > platform for Internet services. We are very interested to know > your thoughts on Internet productivity and how it might be > improved, and to that end we have set up a short survey at our > website -

Re: Summarizing data by week

2007-01-09 Thread Larry Bates
Mike Orr wrote: > What's the best way to summarize data by week? I have a set of > timestamped records, and I want a report with one row for each week in > the time period, including zero rows if there are weeks with no > activity. I was planning to use ISO weeks because datetime has a > convenie

Re: distutils and ctypes

2007-01-09 Thread Robert Kern
Martin v. Löwis wrote: > Not sure it's stupid, but I wonder why you want to use ctypes. What's > wrong with extension modules? What's wrong with ctypes? They're both valid, useful approaches to connect to C libraries. -- Robert Kern "I have come to believe that the whole world is an enigma, a

Re: distutils and ctypes

2007-01-09 Thread Martin v. Löwis
[EMAIL PROTECTED] schrieb: > I suspect that I'm doing something stupid, I would like some other > opinions though. > I'm getting started with ctypes and am trying to use distutils to help > build my module. At the moment I simply want distutils to build a > shared c library (not a python extension!

Re: Maths error

2007-01-09 Thread Tim Peters
[Tim Peters] ... >|> Well, just about any technical statement can be misleading if not >|> qualified to such an extent that the only people who can still >|> understand it knew it to begin with <0.8 wink>. The most dubious >|> statement here to my eyes is the intro's "exactness carries over >|> in

Re: Newbie - converting csv files to arrays in NumPy

2007-01-09 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, oyekomova wrote: > I would like to know how to convert a csv file with a header row into a > floating point array without the header row. Take a look at the `csv` module in the standard library. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/li

Re: Newbie - converting csv files to arrays in NumPy

2007-01-09 Thread Robert Kern
oyekomova wrote: > I would like to know how to convert a csv file with a header row into a > floating point array without the header row. Use the standard library module csv. Something like the following is a cheap and cheerful solution: import csv import numpy def float_array_from_csv(filename

Re: Internet Survey

2007-01-09 Thread Pete Fenelon
In comp.arch.embedded [EMAIL PROTECTED] wrote: > Hello all, > > I represent Octabox, an Internet Start-up developing a wide-scale Hello. F*ck off, spammer. pete -- [EMAIL PROTECTED] "he just stuck to buying beer and pointing at other stuff" -- http://mail.python.org/mailman/listinfo/python-li

Re: Maths error

2007-01-09 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, Robert Kern <[EMAIL PROTECTED]> writes: |> > |> >> No, don't. That is about another matter entirely, |> > |> > It isn't. |> |> Actually it really is. That thread is about the difference between |> str(some_float) and repr(some_float) and why str(some_tuple) use

Newbie - converting csv files to arrays in NumPy

2007-01-09 Thread oyekomova
I would like to know how to convert a csv file with a header row into a floating point array without the header row. -- http://mail.python.org/mailman/listinfo/python-list

Summarizing data by week

2007-01-09 Thread Mike Orr
What's the best way to summarize data by week? I have a set of timestamped records, and I want a report with one row for each week in the time period, including zero rows if there are weeks with no activity. I was planning to use ISO weeks because datetime has a convenient .isocalendar() method,

Re: distutils and ctypes

2007-01-09 Thread Robert Kern
Robert Kern wrote: > [EMAIL PROTECTED] wrote: > >> So finally, my question is, is there a way to get distutils to simply >> build a shared library on windows so that I can use ctypes with them??? > > Not out-of-box, no. The OOF2 project has added a bdist_shlib command which > should do most of wh

Re: distutils and ctypes

2007-01-09 Thread Robert Kern
[EMAIL PROTECTED] wrote: > So finally, my question is, is there a way to get distutils to simply > build a shared library on windows so that I can use ctypes with them??? Not out-of-box, no. The OOF2 project has added a bdist_shlib command which should do most of what you want, though. It's somew

Re: Maths error

2007-01-09 Thread Robert Kern
Bjoern Schliessmann wrote: > Nick Maclaren wrote: > >> No, don't. That is about another matter entirely, > > It isn't. Actually it really is. That thread is about the difference between str(some_float) and repr(some_float) and why str(some_tuple) uses the repr() of its elements. -- Robert Ke

Re: Maths error

2007-01-09 Thread Simon Brunning
On 1/9/07, Tim Peters <[EMAIL PROTECTED]> wrote: > Well, just about any technical statement can be misleading if not qualified > to such an extent that the only people who can still understand it knew it > to begin with <0.8 wink>. +1 QTOW -- Cheers, Simon B [EMAIL PROTECTED] -- http://mail.pyt

Re: private variables

2007-01-09 Thread Gabriel Genellina
At Tuesday 9/1/2007 04:38, belinda thom wrote: I knew it was a beehive, but I had hoped someone would know which version they were released, so I can put the proper statement into my tutorial (e.g. In version , Python provided some support for private variables...). I've been avoiding getting st

A simple lexer

2007-01-09 Thread Neil Cerutti
I'm a royal n00b to writing translators, but you have to start someplace. In my Python project, I've decided that writing the dispatch code to sit between the Glulx virtual machine and the Glk API will be best done automatically, using the handy prototypes. Below is the prototype of the lexer, an

distutils and ctypes

2007-01-09 Thread [EMAIL PROTECTED]
Hi all, I suspect that I'm doing something stupid, I would like some other opinions though. I'm getting started with ctypes and am trying to use distutils to help build my module. At the moment I simply want distutils to build a shared c library (not a python extension!). Under linux, the followin

Re: Question about using "with"

2007-01-09 Thread Duncan Booth
Laszlo Nagy <[EMAIL PROTECTED]> wrote: > >> >> 591 > ./cat.py cat.py >>File "./cat.py", line 6 >> with open(sys.argv[nn]) as f: >> ^ >> SyntaxError: invalid syntax >> 592 > >> >> This example came from http://docs.python.org/tut/node10.html down in >> section 8.7 >> >> Am I

Re: Question about using "with"

2007-01-09 Thread Peter Otten
Steven W. Orr wrote: >>From the tutorial, they said that the following construct will > automatically close a previously open file descriptor: > > --- > #! /usr/bin/python > import sys > > for nn in range ( 1, len(sys.argv ) ): > print "arg ", nn, "value = ", sys.argv[nn] >

Re: Yield

2007-01-09 Thread Mathias Panzenboeck
Fredrik Lundh schrieb: > Danny Colligan wrote: > >> Carsten mentioned that generators are more memory-efficient to use when >> dealing with large numbers of objects. Is this the main advantage of >> using generators? Also, in what other novel ways are generators used >> that are clearly superior

Re: Question about using "with"

2007-01-09 Thread Steven Bethard
Steven W. Orr wrote: >> From the tutorial, they said that the following construct will > automatically close a previously open file descriptor: > > --- > #! /usr/bin/python > import sys > > for nn in range ( 1, len(sys.argv ) ): > print "arg ", nn, "value = ", sys.argv[nn] >

Re: Maths error

2007-01-09 Thread Terry Reedy
"Carsten Haese" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | On Tue, 2007-01-09 at 11:38 +, Nick Maclaren wrote: | > As Dan Bishop says, probably not. The introduction to the decimal | > module makes exaggerated claims of accuracy, amounting to propaganda. | > It is numerica

Re: how to clean sys.path

2007-01-09 Thread Laszlo Nagy
> > So far, I know only the command >>>sys.path.append(r'c:etc...'), but how > to delete or insert at the beginning of the list, I know not. > You can delete a slice. For example, del sys.path[2:5] More about slicing: http://docs.python.org/ref/slicings.html sys.path is a regular list. L

Re: Question about using "with"

2007-01-09 Thread Laszlo Nagy
> > 591 > ./cat.py cat.py >File "./cat.py", line 6 > with open(sys.argv[nn]) as f: > ^ > SyntaxError: invalid syntax > 592 > > > This example came from http://docs.python.org/tut/node10.html down in > section 8.7 > > Am I missing something? > Are you using python 2.5? The

Re: Maths error

2007-01-09 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, Tim Peters <[EMAIL PROTECTED]> writes: |> |> Well, just about any technical statement can be misleading if not qualified |> to such an extent that the only people who can still understand it knew it |> to begin with <0.8 wink>. The most dubious statement here to

Question about using "with"

2007-01-09 Thread Steven W. Orr
>From the tutorial, they said that the following construct will automatically close a previously open file descriptor: --- #! /usr/bin/python import sys for nn in range ( 1, len(sys.argv ) ): print "arg ", nn, "value = ", sys.argv[nn] with open(sys.argv[nn]) as f:

Re: help: code formatter?

2007-01-09 Thread Bjoern Schliessmann
siggi wrote: > Bjoern wrote: >> Why don't you just write one? :) > > Very funny! Just learning Python :( It isn't funny at all. You'll learn by doing and trying things. That's how all programmers start. Regards, Björn -- BOFH excuse #265: The mouse escaped. -- http://mail.python.org/ma

Re: Maths error

2007-01-09 Thread Bjoern Schliessmann
Nick Maclaren wrote: > No, don't. That is about another matter entirely, It isn't. Regards, Björn -- BOFH excuse #366: ATM cell has no roaming feature turned on, notebooks can't connect -- http://mail.python.org/mailman/listinfo/python-list

Re: Maths error

2007-01-09 Thread Tim Peters
[Rory Campbell-Lange] >>> Is using the decimal module the best way around this? (I'm >>> expecting the first sum to match the second). It seem >>> anachronistic that decimal takes strings as input, though. [Nick Maclaren] >> As Dan Bishop says, probably not. The introduction to the decimal >> mod

Re: Internet Survey

2007-01-09 Thread Steve O'Hara-Smith
On Tue, 9 Jan 2007 15:25:43 + zoara <[EMAIL PROTECTED]> wrote: > On 9 Jan 2007 06:58:15 -0800, [EMAIL PROTECTED] wrote: > > > Hello all, > > > > I represent Octabox, an Internet Start-up developing a wide-scale > Well, that was too tempting to pass up. Amusing answers related to dirty > b

Re: Internet Survey

2007-01-09 Thread Lawrence Statton XE2/N1GAK
zoara <[EMAIL PROTECTED]> writes: Link NOT removed to encourage more abuse ... > > http://www.octabox.com/productivity_poll.php I somehow missed this the first time. Thanks for the pointer -- I gave them some nice PDP-10 related responses. I truly hope to have my TOPS-20 productivity improve

Re: mxODBC problems

2007-01-09 Thread Larry Bates
Sean Davis wrote: > I have just installed mxODBC on my x86_64 suse linux machine, where I > use unixODBC for connection. Running queries from isql or DataManager > works fine for the DSN that I am using. However, under mxODBC, I can > get a connection object and a cursor object, but all attempts

Re: Using with CSV library in Python 2.2!!!

2007-01-09 Thread Larry Bates
mohan wrote: > Hi Guys, > > I'm back one more basic question, this time on using CSV (Comma > Seperated Value) library with Python 2.2. At my workplace I have Python > 2.2 installed and am using PythonWin 2.2.1 IDE from Mark Hammond. > > I want to use the CSV library module for reading data from

Re: Xah's Edu Corner: Introduction to 3D Graphics Programing

2007-01-09 Thread hg
Xah Lee wrote: > I don't know OpenGL, but i think it is a low-level crap, and have done > the industry huge irreparable damage the same way unix has. So you _are_ psychic ! is the end of the world be in 2007 ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Determine an object is a subclass of another

2007-01-09 Thread Felipe Almeida Lessa
On 9 Jan 2007 07:01:31 -0800, abcd <[EMAIL PROTECTED]> wrote: > anyways, is there a way to check without having an instance of the > class? In [1]: class A: ...: pass ...: In [2]: class B(A): ...: pass ...: In [3]: issubclass(B, A) Out[3]: True In [4]: isinstance(B(), B) Out

how to clean sys.path

2007-01-09 Thread siggi
Hi all, when I do >>>sys.path in IDLE (winXP), i get a horrendously long list of paths, paths I may have used during a lot of trials and errors. How can I clean up sys.path? I mean, trim it of unnecessary paths? So far, I know only the command >>>sys.path.append(r'c:etc...'), but how to de

Re: code formatter?

2007-01-09 Thread siggi
>tabnanny? not quite! "Hendrik van Rooyen" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > "siggi" <[EMAIL PROTECTED]> wrote: > >> Is there a simple code formatter that first removes all indentations and >> then refomats correctly? > > tabnanny ? > > - Hendrik > > > -- htt

Re: Execute binary code

2007-01-09 Thread Chris Mellon
On 9 Jan 2007 07:04:11 -0800, sturlamolden <[EMAIL PROTECTED]> wrote: > > Jorgen Grahn wrote: > > > For what it's worth[1], under Unix it /is/ impossible. The only way to > > bring in > > new code (short of dynamic libraries) is to call exec(2) or its variations, > > and all need a file system obj

Re: Why less emphasis on private data?

2007-01-09 Thread Steven D'Aprano
On Tue, 09 Jan 2007 10:27:56 +0200, Hendrik van Rooyen wrote: > "Steven D'Aprano" <[EMAIL PROTECTED]> wrote: > > >> On Mon, 08 Jan 2007 13:11:14 +0200, Hendrik van Rooyen wrote: >> >> > When you hear a programmer use the word "probability" - >> > then its time to fire him, as in programming even

Re: Internet Survey

2007-01-09 Thread zoara
On 9 Jan 2007 06:58:15 -0800, [EMAIL PROTECTED] wrote: > Hello all, > > I represent Octabox, an Internet Start-up developing a wide-scale > platform for Internet services. We are very interested to know your > thoughts on Internet productivity and how it might be improved, and to > that end we h

Re: Determine an object is a subclass of another

2007-01-09 Thread Bruno Desthuilliers
abcd a écrit : > yea i meant to have animal extend thing and dog extend animalmy > mistake. > > anyways, is there a way to check without having an instance of the > class? > > such as, > > isinstance(Dog, (Animal, Thing)) ?? > > issubclass(Dog, Animal) Note that such tests should only be

Re: Execute binary code

2007-01-09 Thread sturlamolden
Jorgen Grahn wrote: > For what it's worth[1], under Unix it /is/ impossible. The only way to bring > in > new code (short of dynamic libraries) is to call exec(2) or its variations, > and all need a file system object to load the code from. The x86 processor cannot tell the difference between c

Re: Determine an object is a subclass of another

2007-01-09 Thread abcd
yea i meant to have animal extend thing and dog extend animalmy mistake. anyways, is there a way to check without having an instance of the class? such as, isinstance(Dog, (Animal, Thing)) ?? thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: How to write temporary data to file?

2007-01-09 Thread Thomas Ploch
Thomas Ploch schrieb: > Laszlo Nagy schrieb: >> Thomas Ploch írta: >>> Hi folks, >>> >>> I have a data structure that looks like this: >>> >>> d = { >>> 'url1': { >>> 'emails': ['a', 'b', 'c',...], >>> 'matches': ['d', 'e', 'f',...] >>> }, >>> 'url2': {... >>> } >>> >>>

Internet Survey

2007-01-09 Thread octabox
Hello all, I represent Octabox, an Internet Start-up developing a wide-scale platform for Internet services. We are very interested to know your thoughts on Internet productivity and how it might be improved, and to that end we have set up a short survey at our website - http://www.octabox.com/pr

Internet Survey

2007-01-09 Thread octabox
Hello all, I represent Octabox, an Internet Start-up developing a wide-scale platform for Internet services. We are very interested to know your thoughts on Internet productivity and how it might be improved, and to that end we have set up a short survey at our website - http://www.octabox.com/pr

Re: How to write temporary data to file?

2007-01-09 Thread Thomas Ploch
Laszlo Nagy schrieb: > Thomas Ploch írta: >> Hi folks, >> >> I have a data structure that looks like this: >> >> d = { >> 'url1': { >> 'emails': ['a', 'b', 'c',...], >> 'matches': ['d', 'e', 'f',...] >> }, >> 'url2': {... >> } >> >> This dictionary will get _very_ big, s

Re: Determine an object is a subclass of another

2007-01-09 Thread Matimus
First you need to subclass the classes so that Dog actually is a subclass of Animal which is a subclass of thing... class Thing: pass class Animal(Thing): pass class Dog(Animal): pass class Weapon(Thing): pass class Gun(Weapon): pass Then you can use 'isinstance' >>>d = Dog() >>>is

Re: Determine an object is a subclass of another

2007-01-09 Thread Neil Cerutti
On 2007-01-09, abcd <[EMAIL PROTECTED]> wrote: > How can tell if an object is a subclass of something else? > > Imagine... > > class Thing: > pass > > class Animal: > pass > > class Dog: > pass > > d = Dog() > > I want to find out that 'd' is a Dog, Animal and Thing. Such > as... > > d

Re: Using with CSV library in Python 2.2!!!

2007-01-09 Thread skip
mohan> Thanks man. What kind of source code changes should I do to mohan> "_csv.c" file , have you any idea on that too?? I've no particular ideas. There are sometimes small C API changes between feature releases though. If you read through the What's New document for version 2.3 (googl

Determine an object is a subclass of another

2007-01-09 Thread abcd
How can tell if an object is a subclass of something else? Imagine... class Thing: pass class Animal: pass class Dog: pass d = Dog() I want to find out that 'd' is a Dog, Animal and Thing. Such as... d is a Dog d is a Animal d is a Thing Thanks -- http://mail.python.org/mailm

Survey respondents needed for masters thesis

2007-01-09 Thread luffmusse
We are two students from the Royal Institute of Technology in Stockholm, Sweden (http://www.kth.se/eng/). We are currently doing our masters thesis in Applied Information Technology where we specialize in security. As a part of this thesis we will do a survey where we compare general information ab

Re: Using with CSV library in Python 2.2!!!

2007-01-09 Thread mohan
[EMAIL PROTECTED] wrote: > mohan> 1. Does Python 2.2 come with CSV library module or not? If yes, > mohan>have I lost it somewhere?? > > As the docs for the csv module indicate, it was new in 2.3. > > mohan> 2. If Python 2.2 does not come with CSV module, is it possible to > mohan>

Re: Using with CSV library in Python 2.2!!!

2007-01-09 Thread skip
mohan> 1. Does Python 2.2 come with CSV library module or not? If yes, mohan>have I lost it somewhere?? As the docs for the csv module indicate, it was new in 2.3. mohan> 2. If Python 2.2 does not come with CSV module, is it possible to mohan>add the csv module to the Pyt

  1   2   >