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
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)
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.
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
[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?
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
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
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
[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
[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
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
Frank Potter wrote:
>> ... where is the executable python file? ...
>>
>
> does
>
> whereis python
"whereis" is cool!
--
http://mail.python.org/mailman/listinfo/python-list
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
"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
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
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
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
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
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
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
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:
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.
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
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
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
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): #
>
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
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?
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
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
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
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://
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
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
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
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
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
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 ?
--
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
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
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
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
<[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
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
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
[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 -
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
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
[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!
[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
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
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
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
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
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
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,
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
[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
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
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
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
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
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
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
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]
>
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
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]
>
"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
>
> 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
>
> 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
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
>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:
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
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
[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
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
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
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
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
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
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
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
>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
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
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
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
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
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
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
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': {...
>>> }
>>>
>>>
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
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
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
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
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
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
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
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
[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>
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 - 100 of 149 matches
Mail list logo