==
Announcing PyTables 2.0
==
PyTables is a library for managing hierarchical datasets and designed to
efficiently cope with extremely large amounts of data with support for
full 64-bit file addressing. PyTables runs on top of the HDF5 library
and
===
Announcing PyTables Pro 2.0
===
PyTables Pro is a library for managing hierarchical datasets and
designed to efficiently cope with extremely large amounts of data with
support for full 64-bit file addressing. PyTables Pro runs on top of
the
SkipoleMonitor is available at http://code.google.com/p/skipole-monitor/
Version 0.4 now released.
What is SkipoleMonitor?
=
SkipoleMonitor is a free network monitor for Windows and Linux. On running
the program, a GUI window appears, and hosts can be added, which Skipole
Monitor
On Jul 12, 11:48 am, samwyse [EMAIL PROTECTED] wrote:
On Jul 12, 6:31 am,samwyse[EMAIL PROTECTED] wrote:
On Jul 8, 8:50 am, Christoph Zwerschke [EMAIL PROTECTED] wrote:
With Py 2.5 I get:
new.__class__ = old.__class__
TypeError: __class__ must be set to a class
Hmmm, under
On Fri, 13 Jul 2007 08:51:25 +0300, Gabriel Genellina
[EMAIL PROTECTED] wrote:
data = [row for row in csv.reader(open('some.csv', 'rb'))
Note that every time you see [x for x in ...] with no condition, you can
write list(...) instead - more clear, and faster.
data =
On Jul 12, 8:37 pm, Alan Isaac [EMAIL PROTECTED] wrote:
I do not like that bool(False-True) is True.
I've never seen the A-B used to represent A and not B, nor have I
seen any other operator used for that purpose in boolean algebra,
though my experience is limited. Where have you seen it used?
On 7/12/07, Arash Arfaee [EMAIL PROTECTED] wrote:
I need a powerset generator function. It's really slow with recursion. Does
anybody have any idea or code(!!) to do it in an acceptable time?
Thanks
-Arash
I thought that this was a really interesting question, so I wrote up a
solution that
Gabriel Genellina [EMAIL PROTECTED] writes:
msg is an instance of MaildirMessage (subclass of Message) - it has
no specific iterator, so for m in msg tries to use the sequence
protocol, starting at 0; that is, tries to get msg[0]. Message
objects support the mapping protocol, and msg[0] tries
Chris Carlen [EMAIL PROTECTED] writes:
I don't understand Hetland's terminology though, when he is speaking
of binding and reference. Actually, Hetland's entire first
paragraph is unclear.
Can anyone reword this in a way that is understandable?
I've had some success with the following way
Donn Cave [EMAIL PROTECTED] wrote:
In its day, goto was of course very well loved.
Does anybody know for sure if it is in fact possible to
design a language completely free from conditional jumps?
At the lower level, I don't think you can get away with
conditional calls - hence the jumps with
On 7/12/07, Evan Klitzke [EMAIL PROTECTED] wrote:
On 7/12/07, Arash Arfaee [EMAIL PROTECTED] wrote:
I need a powerset generator function. It's really slow with recursion. Does
anybody have any idea or code(!!) to do it in an acceptable time?
Thanks
-Arash
I thought that this was a
Jason Zheng [EMAIL PROTECTED] writes:
Hrvoje Niksic wrote:
greg wrote:
Actually, it's not that bad. _cleanup only polls the instances that
are no longer referenced by user code, but still running. If you hang
on to Popen instances, they won't be added to _active, and __init__
won't reap
Robert Dailey a écrit :
Hi,
Is there a way to force a specific parameter in a function to be a
specific type?
No, and that's considered a GoodThing(tm).
For example, say the first parameter in a function of
mine is required to be a string. If the user passes in an integer, I
want to
Does PyDict_SetItemString(pDict,key,PyString_FromString(value))
cause memory leak?
From Google results, I find some source code write like that. But some
code write like below:
obj = PyString_FromString(value);
PyDict_SetItemString(pDict,key,obj);
Py_DECREF(obj);
So, which one is correct?
--
lgx schrieb:
Does PyDict_SetItemString(pDict,key,PyString_FromString(value))
cause memory leak?
You shouldn't use that at all. If you look at the sources, what SetItemString
does is: create a Python string from the char* and call PyDict_SetItem() to
put the new string in. So it is actually much
Robert Dailey [EMAIL PROTECTED] writes:
class filestream:
def __init__( self, filename ):
self.m_file = open( filename, rwb )
[...]
So far, I've found that unlike with the C++ version of fopen(), the
Python 'open()' call does not create the file for you when opened
using
helo...
i'm so glad can join to this website...
i want to ask..
how to import bluebit matrik calculator that result of singular value
decomposition (SVD) in python programming..
thank's for your answer.
--
View this message in context:
Chris Fonnesbeck a écrit :
I have a class that does MCMC sampling (Python 2.5) that uses decorators
-- one in particular called _add_to_post that appends the output of the
decorated method to a class attribute.
However, when I
subclass this base class, the decorator no longer works:
Lee Harr a écrit :
Traceback (most recent call last):
File /Users/chris/Projects/CMR/closed.py, line 132, in module
class M0(MetropolisHastings):
File /Users/chris/Projects/CMR/closed.py, line 173, in M0
@_add_to_post
NameError: name '_add_to_post' is not defined
yet, when I
Ben Finney [EMAIL PROTECTED] writes:
This is interesting. Do you have any references we can read about this
assertion -- specifically, that GOTO was not well loved (I assume
by the programming community at large) even by around 1966?
Dijkstra's famous 1968 GOTO considered harmful letter
John Nagle [EMAIL PROTECTED] writes:
Donn Cave wrote:
In its day, goto was of course very well loved.
No, it wasn't. By 1966 or so, GOTO was starting to look like a
bad idea. It was a huge hassle for debugging.
This is interesting. Do you have any references we can read about this
Robert Dailey a écrit :
Hi,
I'm trying to create a Python equivalent of the C++ ifstream class,
with slight behavior changes.
Basically, I want to have a filestream object that will allow you to
overload the '' and '' operators to stream out and stream in data,
respectively. So far this
On Jul 12, 5:34 pm, Godzilla [EMAIL PROTECTED] wrote:
Hello,
I'm trying to find a way to convert an integer (8-bits long for
starters) and converting them to a list, e.g.:
num = 255
numList = [1,1,1,1,1,1,1,1]
with the first element of the list being the least significant, so
that i can
Note that every time you see [x for x in ...] with no condition, you
can
write list(...) instead - more clear, and faster.
data = list(csv.reader(open('some.csv', 'rb')))
Faster? No. List Comprehensions are faster.
[EMAIL PROTECTED] pdfps $ python -m timeit -c 'data =
On 13 Jul 2007 02:25:59 -0700, Paul Rubin wrote
Antoon Pardon [EMAIL PROTECTED] writes:
On 7/12/07, Arash Arfaee [EMAIL PROTECTED] wrote:
I need a powerset generator function. It's really slow with recursion.
Does
anybody have any idea or code(!!) to do it in an acceptable time?
My
Ben Finney wrote:
Gabriel Genellina [EMAIL PROTECTED] writes:
msg is an instance of MaildirMessage (subclass of Message) - it has
no specific iterator, so for m in msg tries to use the sequence
protocol, starting at 0; that is, tries to get msg[0]. Message
objects support the mapping
Twisted wrote:
[on 7/7/07]: I don't know, but it sure as hell isn't emacs.
Then, more recently:
On Jul 12, 7:10 pm, Miles Bader [EMAIL PROTECTED] wrote:
Twisted [EMAIL PROTECTED] writes:
I won't dignify your insulting twaddle and random ad-hominem verbiage
with any more responses after this
On Jul 13, 7:39 am, justme [EMAIL PROTECTED] wrote:
Hello
I've been happily scripting away for the last few years (Matlab, now
Python) and all has been fine. Now I find myself scripting up code for
clients, but they all want a nice GUI. I've had a tinker with wxPython
and it all seems
On Fri, 13 Jul 2007 15:05:29 +0300, Daniel wrote:
Note that every time you see [x for x in ...] with no condition, you
can
write list(...) instead - more clear, and faster.
data = list(csv.reader(open('some.csv', 'rb')))
Faster? No. List Comprehensions are faster.
[EMAIL PROTECTED]
On Jul 13, 5:44 pm, Paul McGuire [EMAIL PROTECTED] wrote:
On Jul 12, 4:42 am, kublai [EMAIL PROTECTED] wrote:
Hello,
For a project, I need to develop a corpus of online news stories. I'm
looking for an application that, given the url of a web page, copies
the rendered text of the web
Hullo,
I was just wondering if this thread was whithering out.. I gues not for
a good time.
A short summary in the hope for the last posting in this topic.
Some provocative posting caused or Twister brother to send a large amount of
doubtful info. It seems, he had some very bad experience
Hi All,
I am facing some strange problem in pytz.
The timezone Asia/Calcutta is actually IST, which is GMT + 5:30. But
while using pytz, it is being recognized as HMT (GMT + 5:53). While I
digged into the oslan database, I see the following:
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone
Hi Folks,
I'm attempting to write a comprehensive manual explaining how to write
Python scripts for the Poser 7 application. All the example scripts,
explanatory paragraphs and screen shots will naturally be all my own
work. My difficulty is in knowing how I may present the large amount
of
how to import bluebit matrik calculator that result of singular value
decomposition (SVD) in python programming..
I'm not really sure I understand you but you might want to check out scipy:
http://scipy.org/
HTH,
Daniel
--
http://mail.python.org/mailman/listinfo/python-list
(Yes, I probably should have said CPython in my subject, not Python.
Sorry.)
On Jul 13, 12:56 am, samwyse [EMAIL PROTECTED] wrote:
OK, in classobject.h, we find this:
#define PyClass_Check(op) ((op)-ob_type == PyClass_Type)
That seems straightforward enough. And the relevant message
On 2007-07-12, Ben Finney [EMAIL PROTECTED] wrote:
self.__myvariable
Indicates to the reader that the attribute '__myvariable' is
not available by that name outside the object, and name
mangling is automatically done to discourage its use from
outside the object.
From _Python Reference
On Jul 13, 6:07 am, Jyotirmoy Bhattacharya [EMAIL PROTECTED]
wrote:
On Jul 13, 5:05 am, [EMAIL PROTECTED] wrote:
In Idle when I do print 'á'.isalpha() I get True. When I make and
execute a script file with the same code I get False.
Why do I have diferent answers ?
Non-ASCII characters
Miles a écrit :
On Jul 12, 8:37 pm, Alan Isaac [EMAIL PROTECTED] wrote:
I do not like that bool(False-True) is True.
I've never seen the A-B used to represent A and not B, nor have I
seen any other operator used for that purpose in boolean algebra,
though my experience is limited. Where
Steven D'Aprano a écrit :
(snip)
It makes more sense to explicitly cast bools to ints
s/cast bools to ints/build ints from bools/
AFAICT, there's no such thing as typecast in Python.
--
http://mail.python.org/mailman/listinfo/python-list
Daniel wrote:
On Fri, 13 Jul 2007 08:51:25 +0300, Gabriel Genellina
[EMAIL PROTECTED] wrote:
Note that every time you see [x for x in ...] with no condition, you
can write list(...) instead - more clear, and faster.
Faster? No. List Comprehensions are faster.
Why do you think that?
--
On Jul 12, 4:42 am, kublai [EMAIL PROTECTED] wrote:
Hello,
For a project, I need to develop a corpus of online news stories. I'm
looking for an application that, given the url of a web page, copies
the rendered text of the web page (not the source HTNL text), opens a
text editor (Notepad),
John Nagle schrieb:
Chris Mellon wrote:
You can't prove a program to be correct, in the sense that it's proven
to do what it's supposed to do and only what it's supposed to do.
Actually, you can prove quite a bit about programs with the right
tools.
For example, proving that a program
On Jul 9, 3:39 am, Rob Cakebread [EMAIL PROTECTED] wrote:
Hi,
I need to find external dependencies for modules (not Python standard
library imports).
Currently I usepylintand manually scan the output, which is very
nice, or usepylint's--ext-import-graph option to create a .dot file
and
On 7/12/07, Arash Arfaee [EMAIL PROTECTED] wrote:
I need a powerset generator function. It's really slow with recursion. Does
anybody have any idea or code(!!) to do it in an acceptable time?
Thanks
My idea would be the following.
1) Turn your set into a list: lst
2) let lng be the number of
Chris Fonnesbeck schrieb:
I have a class that does MCMC sampling (Python 2.5) that uses decorators
-- one in particular called _add_to_post that appends the output of the
decorated method to a class attribute. However, when I
subclass this base class, the decorator no longer works:
lgx schrieb:
Does PyDict_SetItemString(pDict,key,PyString_FromString(value))
cause memory leak?
From Google results, I find some source code write like that. But some
code write like below:
obj = PyString_FromString(value);
PyDict_SetItemString(pDict,key,obj);
Py_DECREF(obj);
Sorry, my
Im working in red hat linux 9.0. I've downloaded the pygame package
but i dont know how to install it. If anybody has the time to detail
the steps sequentially... thanx!
P.S. I've downloaded both the tar and the rpm packages...
First you can try the rpm package:
su
(give the root password)
On 2007-07-13, Hendrik van Rooyen [EMAIL PROTECTED] wrote:
Donn Cave [EMAIL PROTECTED] wrote:
In its day, goto was of course very well loved.
Does anybody know for sure if it is in fact possible to
design a language completely free from conditional jumps?
I think you have to be more clear on
On Fri, 13 Jul 2007 08:37:00 +0200, Hendrik van Rooyen wrote:
Donn Cave [EMAIL PROTECTED] wrote:
In its day, goto was of course very well loved.
Does anybody know for sure if it is in fact possible to
design a language completely free from conditional jumps?
GOTO is unconditional. I
Antoon Pardon [EMAIL PROTECTED] writes:
On 7/12/07, Arash Arfaee [EMAIL PROTECTED] wrote:
I need a powerset generator function. It's really slow with recursion. Does
anybody have any idea or code(!!) to do it in an acceptable time?
My idea would be the following. ...
3) let n range from 0
On 7/12/07, Daniel [EMAIL PROTECTED] wrote:
On Fri, 13 Jul 2007 08:51:25 +0300, Gabriel Genellina
[EMAIL PROTECTED] wrote:
data = [row for row in csv.reader(open('some.csv', 'rb'))
Note that every time you see [x for x in ...] with no condition, you can
write list(...) instead - more
In article [EMAIL PROTECTED],
Robert Dailey [EMAIL PROTECTED] wrote:
Hi,
Is there a way to force a specific parameter in a function to be a
specific type? For example, say the first parameter in a function of
mine is required to be a string. If the user passes in an integer, I
want to
On Jul 9, 4:13 pm, lgfang [EMAIL PROTECTED] wrote:
Hi,
I think this is a bug ofpylint.el. But I failed finding a way to
submit the bug neither in its official site nor in google. So I post
it here wishing it may be useful for some buddies.
The bug is that it uses compile-internal from
Good replies.
I'm in the process of learning Python. I'm a native C++ programmer, so
you can see how the question relates. There's a lot of cool things C++
allowed you to do with type-checking, such as function overloading.
With templates + type checking, I can create a STD version of ifstream/
lgx [EMAIL PROTECTED] writes:
From Google results, I find some source code write like that. But
some code write like below:
obj = PyString_FromString(value);
PyDict_SetItemString(pDict,key,obj);
Py_DECREF(obj);
So, which one is correct?
The latter is correct. While PyDict_GetItemString
Which is a bug in the 'email.message' module, in my view. If it's
attempting to support a mapping protocol, it should allow iteration
the same way standard Python mappings do: by iterating over the keys.
I thought it is a bug as well, but who am I a python newbie to say so.
I found
On Fri, 2007-07-13 at 08:15 -0400, I wrote:
[...]
def recursive_powerset(s):
if not s: yield set()
for x in s:
s2 = s - set([x])
for subset in recursive_powerset(s2):
yield subset
for subset in recursive_powerset(s2):
yield
Hello
I've been happily scripting away for the last few years (Matlab, now
Python) and all has been fine. Now I find myself scripting up code for
clients, but they all want a nice GUI. I've had a tinker with wxPython
and it all seems standard enough but I was wondering if anyone has any
comments
On Jul 13, 3:04 am, Bruno Desthuilliers bruno.
[EMAIL PROTECTED] wrote:
Robert Dailey a écrit :
Hi,
I'm trying to create a Python equivalent of the C++ ifstream class,
with slight behavior changes.
Basically, I want to have a filestream object that will allow you to
overload the ''
On Jul 13, 5:14 am, Robert Dailey [EMAIL PROTECTED] wrote:
Hi,
I'm trying to create a Python equivalent of the C++ ifstream class,
with slight behavior changes.
Basically, I want to have a filestream object that will allow you to
overload the '' and '' operators to stream out and stream in
On Jul 11, 5:36 am, Bjoern Schliessmann usenet-
[EMAIL PROTECTED] wrote:
Is there any type named bool in standard Python?
check this out.
doespythonrock = True
print type(doespythonrock)
type 'bool'
--
ahlongxp
Software College,Northeastern University,China
[EMAIL PROTECTED]
Hrvoje Niksic wrote:
Jason Zheng [EMAIL PROTECTED] writes:
Hrvoje Niksic wrote:
greg wrote:
Actually, it's not that bad. _cleanup only polls the instances that
are no longer referenced by user code, but still running. If you hang
on to Popen instances, they won't be added to _active, and
Poor Yorick a écrit :
In the example below, the attribute data is added to a function
object. me can be used to get the function when it is invoked using
an identifier that matches the co_name attribute of function's code
object. Can anyone conjure an example of accessing fun2.data from
On Jul 13, 4:53 pm, Robert Dailey [EMAIL PROTECTED] wrote:
Good replies.
I'm in the process of learning Python. I'm a native C++ programmer, so
you can see how the question relates. There's a lot of cool things C++
allowed you to do with type-checking, such as function overloading.
This is
Robert Dailey a écrit :
On Jul 13, 3:04 am, Bruno Desthuilliers bruno.
[EMAIL PROTECTED] wrote:
(snip)
Thanks for the variable naming tips. Is it normal for Python
programmers to create class members with a _ prefixed?
This is the convention to denote implementation attributes. This won't
of
Is there any way to copy a file from src to dst if the dst is
exclusively open by other users.
I am using
src = 'c:\mydata\data\*.mdb'
dst = 'v:\data\all\*.mdb'
shutil.copyfile(src,dst)
but getting error message permission denied.
Any help is highly appreciated.
Thanks
sh
--
Has anyone found or written a Tibco Rendezvous (tibrv) module for
Python? I've only found some really old ones with German
documentation and not updated since some time around 2000.
--
http://mail.python.org/mailman/listinfo/python-list
To maintain paragraphs, replace any p or br tags with your favorite
operating system's crlf.
On Jul 13, 8:57 am, kublai [EMAIL PROTECTED] wrote:
On Jul 13, 5:44 pm, Paul McGuire [EMAIL PROTECTED] wrote:
On Jul 12, 4:42 am, kublai [EMAIL PROTECTED] wrote:
Hello,
For a project, I need
Hi:
From what I've read of OOP, I don't get it. I have also found some
articles profoundly critical of OOP. I tend to relate to these articles.
However, those articles were no more objective than the descriptions of
OOP I've read in making a case. Ie., what objective
data/studies/research
Gabriel Genellina wrote:
En Thu, 12 Jul 2007 21:51:08 -0300, Chris Carlen
[EMAIL PROTECTED] escribió:
http://hetland.org/writing/instant-python.html
I don't understand Hetland's terminology though, when he is speaking of
binding and reference. Actually, Hetland's entire first paragraph
is
Hi,
I am playing with the atexit module but I don't find a way to see the
difference
between a script calling sys.exit(returncode) and the interpreting
arriving at the end
of the source code file. This has a semantic difference for my
applications.
Is there a way to determine in an
On Fri, 13 Jul 2007 16:18:38 +0300, Marc 'BlackJack' Rintsch
[EMAIL PROTECTED] wrote:
$ python -m timeit -c 'import csv; data =
list(csv.reader(open(some.csv,
rb)))'
1 loops, best of 3: 44 usec per loop
$ python -m timeit -c 'import csv; data = [row for row in
Seehttp://effbot.org/zone/import-confusion.htm
Try to move the circular references later in the code (maybe inside a
function, when it is required), or much better, refactor it so there is no
circularity.
--
Gabriel Genellina
Yes, thanks. I'd read that page before posting. Helpful.
But,
hi...
how to implementation algorithm latent semantic indexing in python
programming...??
thank's for daniel who answered my question before..
--
View this message in context:
http://www.nabble.com/how-to-implementation-latent-semantic-indexing-in-python..-tf4075439.html#a11582773
Sent from
On Fri, 13 Jul 2007 09:06:44 -0700, Chris Carlen wrote:
Perhaps the only thing that may have clicked regarding OOP is that in
certain cases I might prefer a higher-level approach to tasks which
involve dynamic memory allocation. If I don't need the execution
efficiency of C, then OOP
Chris Carlen wrote:
Let's go back the statement:
x = [1,2,3]
Do we then say: [1,2,3] is x or is it the other way around: x is
[1,2,3] ???
This will yield 'False', because 'is' checks for *identity* not
equality. In your case you assign a list the name 'x' and then check
(via the 'is'
In article [EMAIL PROTECTED],
John Nagle [EMAIL PROTECTED] wrote:
I asked over at Webmaster World, and over there, they recommend against
using redirects on robots.txt files, because they questioned whether all of
the major search engines understand that. Does a redirect for
Ben Finney wrote:
Chris Carlen [EMAIL PROTECTED] writes:
def change(some_list):
some_list[1] = 4
x = [1,2,3]
change(x)
print x # Prints out [1,4,3]
---
def nochange(x):
x = 0
y = 1
nochange(y)
print y # Prints out 1
I don't understand Hetland's terminology though,
Wildemar Wildenburger wrote:
x = [1, 2, 3]
y = [1, 2, 3]
id(x), id(y)
x == y
x is y
Ooops!
Make that:
x = [1, 2, 3]
y = [1, 2, 3]
id(x); id(y)
x == y
x is y
(had to be a semicolon there)
--
http://mail.python.org/mailman/listinfo/python-list
Chris Carlen wrote:
Hi:
From what I've read of OOP, I don't get it. I have also found some
articles profoundly critical of OOP. I tend to relate to these articles.
However, those articles were no more objective than the descriptions of
OOP I've read in making a case. Ie., what
On Jul 13, 12:45 am, Christoph Zwerschke [EMAIL PROTECTED] wrote:
samwyse wrote:
TypeError: __class__ must be set to a class
Excpt ceratinly appears to be a class. Does anyone smarter than me
know what's going on here?
Not that I want to appear smarter, but I think the problem here is
Jason Zheng [EMAIL PROTECTED] writes:
Nope it still doesn't work. I'm running python 2.4.4, tho.
That explains it, then, and also why greg's code didn't work. You
still have the option to try to run 2.5's subprocess.py under 2.4.
Is it more convenient to just inherit the Popen class?
You'd
Hi. I'm writing an archival system which I'd like to be portable
to Windows.
The system relies on the property of Unix which allows a
process to keep a file open even if another process renames
it while it is open. Neither process sees any anomaly or
error.
Do the NT file systems support this
syt == syt [EMAIL PROTECTED] writes:
syt fyi, pylint related bug should be reported on the python-
syt [EMAIL PROTECTED] mailing list. I've opened a ticket for
syt your bug/patch: http://www.logilab.org/bug/eid/4026
Thank you, Sylvain
Fanglungang (fang.lungang at gmail)
--
[EMAIL PROTECTED] schrieb:
Hi. I'm writing an archival system which I'd like to be portable
to Windows.
The system relies on the property of Unix which allows a
process to keep a file open even if another process renames
it while it is open. Neither process sees any anomaly or
error.
http://wiki.python.org/moin/ctypes now tries to answer:
'''FAQ: How do I copy bytes to Python from a ctypes.Structure?'''
'''FAQ: How do I copy bytes to a ctypes.Structure from Python?'''
'''FAQ: Why should I fear using ctypes.memmove?'''
'''FAQ: How do I change the byte length of a
On 7/13/07, Chris Carlen [EMAIL PROTECTED] wrote:
Ben Finney wrote:
Chris Carlen [EMAIL PROTECTED] writes:
That's not how Python works. Every value is an object; the assignment
operator binds a name to an object. This is more like writing the name
on a sticky-note, and sticking it onto
On Jul 13, 6:34 pm, Carsten Haese [EMAIL PROTECTED] wrote:
def recursive_powerset(s):
if not s: yield set()
for x in s:
s2 = s - set([x])
for subset in recursive_powerset(s2):
yield subset
yield subset.union(set([x]))
Your recursive_powerset
Circa summer 2003, at a company I previously worked at, a co-worker and
I had an occasion to see if we could get Python and TIBCO Rendezvous
working together.
The SWIG-based tibrv mechanism was insufficient, buggy and was problematic
in terms of keeping up with Python releases.
We resorted to
Hi!
My code is
db = {}
def display():
keyList = db.keys()
sortedList = keyList.sort()
for name in sortedList:
line = 'Name: %s, Number: %s' % (name, db[name])
print line.replace('\r', '')
And it gives following error:
for name in sortedList:
On Fri, 2007-07-13 at 17:38 +, Jyotirmoy Bhattacharya wrote:
On Jul 13, 6:34 pm, Carsten Haese [EMAIL PROTECTED] wrote:
def recursive_powerset(s):
if not s: yield set()
for x in s:
s2 = s - set([x])
for subset in recursive_powerset(s2):
yield
[EMAIL PROTECTED] schrieb:
Hi!
My code is
db = {}
def display():
keyList = db.keys()
sortedList = keyList.sort()
for name in sortedList:
line = 'Name: %s, Number: %s' % (name, db[name])
print line.replace('\r', '')
And it gives following error:
Chris,
I can fully relate to your post. I trained as a programmer in the 80s
when OOP was an accademic novelty, and didn't learn OOP untill around
2002. However now I find myself naturaly thinking in OOP terms,
although I'm by no means an expert - I'm a sysadmin that writes the
occasional
Sorry, here's the tutorial link:
http://hetland.org/writing/instant-python.html
Simon Hibbs
--
http://mail.python.org/mailman/listinfo/python-list
John Nagle wrote:
Chris Carlen wrote:[edit]
Hence, being a hardware designer rather than a computer scientist, I
am conditioned to think like a machine. I think this is the main
reason why OOP has always repelled me.
Why?
When pointers were first explined to me, I went Ok. And
Daniel wrote:
db is out of scope, you have to pass it to the function:
What's wrong about module attributes?
Regards,
Björn
--
BOFH excuse #418:
Sysadmins busy fighting SPAM.
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 09 Jul 2007 23:51:25 -0700, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
On Jul 9, 11:42?pm, Paul McGuire [EMAIL PROTECTED] wrote:
On Jul 9, 11:21 pm, Jim Langston [EMAIL PROTECTED] wrote: In Python 2.5
on intel, the statement
2**2**2**2**2
evaluates to 2**2**2**2**2
On 7/12/07, Arash Arfaee [EMAIL PROTECTED] wrote:
I need a powerset generator function. It's really slow with recursion. Does
anybody have any idea or code(!!) to do it in an acceptable time?
Thanks
-Arash
Here's a much simpler (and faster) solution I got from a coworker:
s = range(18)
On Fri, 13 Jul 2007 18:49:06 +0200, Wildemar Wildenburger
[EMAIL PROTECTED] wrote:
Wildemar Wildenburger wrote:
x = [1, 2, 3]
y = [1, 2, 3]
id(x), id(y)
x == y
x is y
Ooops!
Make that:
x = [1, 2, 3]
y = [1, 2, 3]
id(x); id(y)
x == y
x is y
(had to be a semicolon there)
Not had to be
On Fri, 13 Jul 2007 20:44:13 +0300, [EMAIL PROTECTED] wrote:
Hi!
My code is
db = {}
def display():
keyList = db.keys()
sortedList = keyList.sort()
for name in sortedList:
line = 'Name: %s, Number: %s' % (name, db[name])
print line.replace('\r', '')
1 - 100 of 215 matches
Mail list logo