Casey Hawthorne wrote:
For Large Dictionaries Could One Use Separate Dictionaries Where Each
Dictionary Covers an Interval of the Input Range?
One Could, But Why? :-) You wouldn't see any performance improvements.
Looking up a key in a dictionary is done in constant-time, i.e. it
doesn't matter
On 5/16/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Graham Looking up a key in a dictionary is done in constant-time,
Graham i.e. it doesn't matter how large the dictionary is.
Doesn't that depend on how many keys hash to the same value? For small
dictionaries keeping the max
Sion Arrowsmith wrote:
Unfortunately:
print 'a'+'bc' |ips| 'abc'
True
Which might not be what you want. On the other hand, it's a simple
fix:
ips = Infix(lambda a, b: (a != b) and (a in b))
print 'a'+'bc' |ips| 'abc'
Ah, good point.
Graham
--
Tommy R wrote:
I need some way to execute a string and pass arguments to the functions
inside the string. We have discussed a solution where we first load the
string (containing some funcs) and then run something similar to
Py_RunString(foo(1.0, 'str')); We need to do this in a generic way
Cameron Laird wrote:
In article [EMAIL PROTECTED],
[EMAIL PROTECTED] wrote:
.
Well, this may be the CPython way of open source but I don't know if
that is Open source in general. Another way is that if someone(or
group) don't like the current state of a project, they
Steve Holden wrote:
Nicola Musatti wrote:
Of course, I'm going on vacation next week and there was talk
about a one-way ticket to Mexico. The real question is will they let me
*back* in? :-)
I would be careful coming back across the border. I heard that the PSU
[suspicous premature
Peter Hansen wrote:
Graham Fawcett wrote:
Steve Holden wrote:
Nicola Musatti wrote:
Of course, I'm going on vacation next week and there was talk
about a one-way ticket to Mexico. The real question is will they let me
*back* in? :-)
I would be careful coming back across the border. I
Fuzzyman wrote:
Hello all,
I'm writing a module that takes user input as strings and (effectively)
translates them to function calls with arguments and keyword
arguments.to pass a list I use a sort of 'list constructor' - so the
syntax looks a bit like :
checkname(arg1, arg 2, 'arg 3',
Dieter Vanderelst wrote:
Hello,
I'm having a problem with playing WAV files using Winsound.
If I use winsound to play a certain WAV files only the first few seconds
of the file get played. I think this comes because these files contain
some parts of silence. There winsound seems the stop
[EMAIL PROTECTED] wrote:
I'm using GNU Emacs 21.3.1 with python-mode 1.0alpha under Windows XP.
Whenever I execute a command in an edit window (with
py-execute-region), the output window steals the focus. How can I stop
this happening?
[snip]
I commented out the command
(pop-to-buffer
Matthew Thorley wrote:
Greetings, I have a question I hope some one with more back ground can
give me a little help with.
I want to write a simple internet monitoring script for windows that
watches out bound http traffic and keeps a list of all the site visited.
I am thinking that I might
Marco Aschwanden wrote:
The second line of your code is already a show stopper in my case:
from win32com.client import Dispatch
session = Dispatch('Lotus.NotesSession')
session.Initialize('my_secret_passwort')
When started, ends:
[snip]
AttributeError: Lotus.NotesSession.Initialize
It
Ben Finney wrote:
Howdy all,
I'd like to have an Abstract Data Type for a scalar value that is
restricted to a small set of values. Like an Enum, I suppose.
What I would like is to be able to use simple 'str' values in most of
the code, but where the values are actually used in a
Grzegorz Slusarek wrote:
Hello everyone. I have to get data from Lotus Notes and i curious is it
possible doing it with Python. I heard that Lotus Notes using COM, so
the Python does so maybe it can be done? Anyone have any experiences
doing that?
Ane help will by apreciated
Yes, it's
Xah Lee wrote:
Dear Peter Hansen,
My messages speak themselfs. You and your cohorts's stamping of it does
not change its nature. And if this is done with repetitiousness, it
gives away your nature.
Taunt not the cohorts of Peter Hansen!
Graham
--
Jim wrote:
Hi,
I'm using reStructuredText as a format for some group documentation,
and often my co-workers take notes during meetings in Word's outline
mode. Does anyone already have a python script that will convert from
Word (or the Open Office file format version of a word document) to
[EMAIL PROTECTED] wrote:
So you're using Putty to telenet/ssh into the FreeBSD server, but what
editor on you using on the FreeBSD server?
I use pico for that.
That Samba isn't available but I can install it.
Or are there other editors for FreeBSD that I can run with putty ?
I use Emacs on
Kreedz wrote:
Could Windows version have anything to do with this?? Else I've got
some really weird issue...
I'm on Windows 2000 Professional
Yes, that definitely counts as a wierd issue. wink
I couldn't reproduce the bug either.
C:\temppython
ActivePython 2.4.1 Build 247 (ActiveState
Sebastian Bassi wrote:
Hello,
I have to parse a text file (was excel, but I translated to CSV) like
the one below, and I am not sure how to store it (to manipulate it
later).
Here is an extract of the data:
[snip]
This looks a lot like 2D data (row/column), not 3D. What's the third
axis?
Sebastian Bassi wrote:
On 20 Jul 2005 10:47:50 -0700, Graham Fawcett [EMAIL PROTECTED] wrote:
This looks a lot like 2D data (row/column), not 3D. What's the third
axis? It looks, too, that you're not really interested in storage, but
in analysis...
I think it as 3D like this:
1st axis
In translating natural language to SQL, be sure you're not introducing
opportunities for SQL injection attacks. Code like
sql = 'SELECT %s FROM %s' % (this, that)
is considered dangerous, because a well-crafted value for that can be
used to, e.g., delete rows from your tables, run system
Steven D'Aprano wrote:
Speaking as an Australia, ...
[snip]
But don't worry, there is one thing we all agree on throughout the
English-speaking world: you Americans don't speak English.
And lest you feel Steven's observation don't bear much weight, keep in
mind that he is speaking as an
chris patton wrote:
Hi everyone.
Has anyone seen that problem with running a python cgi script in a
server?
It takes you to myspace.com/redmartian or something. Anyway, does
anyone know when this problem will be fixed?
It could be solved much sooner if you follow these steps:
(1) Carefully
Peter Hansen wrote:
francisl wrote:
How can we get a full directory size (sum of all his data)?
like when we type `du -sh mydir`
Because os.path.getsize('mydir') only give the size of the
directory
physical representation on the disk.
os.popen('du -sh mydir') would be one approach.
Luis M. Gonzalez wrote:
Hey Dimitri,
I completely agree with you in that Python needs once for all a cool
logo.
I like your design very much, but I have a few thoughts about it:
1) I think that Python's logo should reflect its power.
If we use a mascot as its image, we would be giving the
25 matches
Mail list logo