put "rb" as the mode of the open.
>
> Regards,
>
> --
> . Facundo
> .
> Blog:http://www.taniquetil.com.ar/plog/
> PyAr:http://www.python.org/ar/
I am running Windows (Vista). I tried the "rb" as you suggested but it
didn't solve the problem. Thanks
le:
> > lineCount +=1
> > print str(lineCount) + " -- " + line
>
> > I also stuck this same code bit into a test script and it was able to
> > parse the entire log without problem. Very quirky.
>
> > This is my first foray from Perl to P
On Apr 26, 9:48 am, Facundo Batista <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > I've attached the whole script. Thanks again for your help.
>
> > --Andrew
>
> Andrew, tip:
>
> If you attach the whole script, what you get is that a lot of p
[EMAIL PROTECTED] wrote:
> In the particular case, I have to read an attribute from any one of
> the elements, which one doesn't matter because this attribute value is
> same across all elements in the set.
Someone else pointed out that there might be better data structures. If
performance was no
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Have you ever been interested in software testing? Giving you an in
> depth analysis/knowledge on software testing!!
Looking around the site at random, I saw no "in depth analysis/knowledge" of
anything.
--
http://mail.python.org/
I'm using MATPLOTLIB on Windows.
How can I get extended characters such as the micro symbol (greek letter mu)
to appear in my axis labels?
I've tried:
xlabel('µs', font)
and
xlabel('\xB5s', font)
but it just appears as a box.
TIA
--
http://mail.python.org/mailman/listinfo/python-list
"Andrew Holme" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'm using MATPLOTLIB on Windows.
>
> How can I get extended characters such as the micro symbol (greek letter
> mu) to appear in my axis labels?
>
> I've tried:
>
> x
s the Python your toolchain is referencing 32 or 64 bit? Based on what
I can see in pyport.h, I'd guess that you're finding a 64 bit Python (ie
SIZEOF_LONG == 8).
--
-----
Andrew I MacIntyre "These th
Mathias Waack wrote:
> Andrew MacIntyre wrote:
>
>> Mathias Waack wrote:
>>> After switching my development environment to 64 bit I've got a
>>> problem with a python extension for a 32 bit application.
>> {...}
>>
>>> Ok, thats fine. So
Hello,
I am new (very) to Python and have just down loaded the latest version
of Python (2.5) and WXPython (2.8).
For some reason I cannot get the WXPython demo to run at all. I run
windows XP and it can't find a program to run the demo. Any advice?
(apologies if this has been posted before).
--
On May 30, 12:24 pm, Steve Holden <[EMAIL PROTECTED]> wrote:
> Andrew P wrote:
> > Hello,
>
> > I am new (very) to Python and have just down loaded the latest version
> > of Python (2.5) and WXPython (2.8).
>
> > For some reason I cannot get the WXPython d
Python beginner here.
For a string 'ABBBCC', I want to produce a list ['A', 'BBB', 'CC'].
That is, break the string into pieces based on change of character.
What's the best way to do this in Python?
Using Python 2.5.1, I tried:
import re
s = re.split(r'(?<=(.))(?!\1)', 'ABBBCC')
for e in s: pri
--- "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Using itertools:
>
> import itertools
>
> s = 'ABBBCC'
> print [''.join(grp) for key, grp in itertools.groupby(s)]
Nice.
> Using re:
>
> import re
>
> pat = re.compile(r'((\w)\2*)')
> print [t[0] for t in re.findall(pat, s)]
Also nice. Esp
7;t work with
ffmpeg.
Does anyone know why this is happening?
--
Andrew Bloomgarden
--
http://mail.python.org/mailman/listinfo/python-list
Hi, just wanted to invite any Python script authors to submit their
Python script to our popular software site
at http://www.myzips.com
We have just today added a "Scripts" directory which includes a Python
subdirectory
http://www.myzips.com/category/Scripts/
The first submissions usually maintai
a.m. wrote:
> If I type this in shell
>
> $ ./yourfile.py 12:34 PM &
>
> What does '$', '.', '/' and '& means in this succession? Note: 12:34
> PM is a argument to the yourfile.py.
>
This not python syntax but Unix shell.
$ = shell prompt
./= look for the program in my
;, line 1, in
File "random.py", line 10, in
x = random.random()
TypeError: 'module' object is not callable
>>>
$ find /usr/local/ -name random.py
./lib/python2.5/random.py
./lib/python2.3/random.py
Do I need to clobber 2.3? ( If so, why???)
TIA
-- Andrew
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 13, 12:57 am, Tim Roberts <[EMAIL PROTECTED]> wrote:
> Andrew F <[EMAIL PROTECTED]> wrote:
> >I'm a linux user and I just upgraded from 2.1 to 2.5 and changed the
> >location of a number of libraries and tools.
>
> >So far I've tracked most err
eError, message
If you have a dict item with the same name as a method in the class, you
won't be able to get to it using syntax sugar, though.
It doesn't seem that the syntax sugar saves you much typing anyway
(a.foo vs. a['foo']), but perhaps it seems nicer in some aesthe
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi, I have the following functions, but ' dx = abs(i2 - i1)/min(i2,
> i1)' always return 0, can you please tell me how can i convert it from
> an integer to float?
I don't think that's what you really want to do.
What you really want
don't see any obvious way to get the process id of the spawned
subprocess.
- Andrew
--
http://mail.python.org/mailman/listinfo/python-list
The answer to this question probably involves pywin32 or a similar library.
I would like to copy a file from one place to another on a Windows machine
while preserving as much of the file permissions as it is possible to
preserve with whatever my program's privileges happen to be. If the file i
On Sep 18, 4:59 am, lilly <[EMAIL PROTECTED]> wrote:
> On Sep 17, 2:33 pm, [EMAIL PROTECTED] wrote:
>
> >http://world-traveling-destinations.SPAMpot.com/
>
> this is ..
..widely cross-posted *spam*.
[ F'Ups set to c.l.j.p. only. ]
--
http://mail.python.org/mailman/listinfo/python-list
t({1:'a', 3:'b': 5:'c', 99:'d'})[3] should return 'b', not 'd'.
Andrew
--
http://mail.python.org/mailman/listinfo/python-list
capture.
OTOH, I often find the negative lookbehind (?!...) very useful indeed.
Andrew
--
http://mail.python.org/mailman/listinfo/python-list
+---[ kamal hamzat ]--
| Dear All,
|
| I have this error after i added the if statement
Time for you to do some reading of your own.
That's three in less than an hour...
--
Andrew Milton
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
On 10/7/07, Dekker <[EMAIL PROTECTED]> wrote:
>
> Well I think it is not possible what I wanted to achieve. By
> overriding the "and" and "or" keyword I wanted to return a new object:
>
> SqlValueInt(4) and SqlValueInt(5) --> SqlOpAnd(SqlValueInt(4),
> SqlValueInt(5))
PEP 335 is a proposal to allo
]
[Melbourne ]
('Continent' is probably not the right word.)
Regards
Andrew
--
http://mail.python.org/mailman/listinfo/python-list
On 10/9/07, Just Another Victim of the Ambient Morality
<[EMAIL PROTECTED]> wrote:
>
> "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> >
> > Without code, that's hard to determine. But you are aware of e.g.
> >
> > handle_entityref(name)
> > handle_charref(ref)
>
output from each
mock will be interleaved; there should really be some way to use
minimock so that you can output a call log from each mock individually
after calling the function to test.
Of course, that might need to be a feature in
still_small_but_slightly_large_than_minimock.py ;-)
Andrew
--
http://mail.python.org/mailman/listinfo/python-list
on of the environment to run, the fact that Pyflakes
reads the source without trying to execute any of it helps a great
deal.
Andrew.
--
http://mail.python.org/mailman/listinfo/python-list
def __init__(self, **kwargs):
valid_attrs = set(get_column_names_from_sqlalchemy())
# Only set valid attributes, ignoring any other kwargs
for k in set(kwargs.keys()) & valid_attrs:
setattr(self, k, kwargs[k])
Andrew
--
http://mail.python.org/mailman/listinfo/python-list
posting it on c.l.p
:-|
Andrew
--
http://mail.python.org/mailman/listinfo/python-list
As for updating ConfigParser -- like most other changes, it probably
needs a champion.
Andrew
--
http://mail.python.org/mailman/listinfo/python-list
Probably a bit of weird question. I realise decorators shouldn't be
executed until the function they are defined with are called, but is
there anyway for me to find all the decorates declared in a file when
I import it? Or perhaps anyway to find the decorators by loading the
file by other methods
_END_ALLOW_THREADS macros and the
PyGILState*() API functions (these API functions appeared in Python 2.3).
--
-----
Andrew I MacIntyre "These thoughts are mine alone..."
E-mail: [EMAIL PROTECTED] (pref)
Python etc
so I cannot even begin an install. I presume python's libxml
builds on the C libs libxml2.dll and iconv.dll so I have installed
those into the python DLL directory. I think this will be
needed at some point.
Please can anyone help?
Regards,
Andrew Marlow
--
There is an emerald her
xml-python/
Thanks very much!
-Andrew Marlow
--
There is an emerald here the size of a plover's egg!
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html
--
http://mail.python.org/mailman/listinfo/python-list
o your mailbox
being full.
Short answer: Subscribe to the [email protected] mailing list and
ask your C/C++ questions there.
Regards
Andrew
--
http://mail.python.org/mailman/listinfo/python-list
"redawgts" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>I keep getting this error "local variable 'f' referenced before
> assignment" in the finally block when I run the following code.
>
>try:
>f = file(self.filename, 'rb')
>f.seek(DATA_OFFSET)
>
Where you would use varargin and nargin in Matlab, you would use the
*args mechanism in Python.
Try calling
def t1(*args):
print args
print len(args)
with different argument lists
Where you would use varargout and nargout in Matlab you would use tuple
unpacking in Python.
Pla
o page called BDFL, and the
Guido_van_Rossum is the next closest match.
If you care and you have enough to say on the subject, maybe you could
start a BDFL page.
--
Andrew McNamara, Senior Developer, Object Craft
http://www.object-craft.com.au/
--
http://mail.python.org/mailman/listinfo/python-list
indicated.
Some platform allocators are notorious for poor behaviour in certain
circumstances, and coalescing blocks while deallocating is one
particularly nasty problem for code that creates and destroys lots
of small variably sized objects.
--
-
Andrew I MacIntyre
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I would want to sort by name first, then sub sort by location. Any
> ideas? Thanks!
In Python 2.3 and later, sorting is stable -- so you can sort successively
in reverse order. In other words, sort the list by location, then sort th
"Colin J. Williams" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Alternatively, as someone else suggested, an analogue of the Pascal "with"
> could be used:
>
> def abs(self):
> with self:
> return math.sqrt(x**2 + y**2 + z**2)
How does your suggested "with" statement know
> I am not advocating this, but this could be:
> def abs(self):
>with self:
> with math:
>return sqrt(x**2 + y**2 + z**2)
> The idea being that "with self" use
> creates a new namespace:
>newGlobal= oldGlobal + oldLocal
>newLocal= names from self
You don't know what thos
"Aurélien Campéas" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I mean : aren't C variables also bindings from names to objects ? Or what
> ?
No, they're not.
In C, when you execute
x = y;
you cause x to become a copy of y. In Python, when you execute
x = y
you ca
If you're on AIX and Python immediately dumps core when trying to import
any SVN module, then adding "-Wl,-brtl" to LINKFORSHARED in the Makefile
seems to fix the problem.
Bad: > LINKFORSHARED=-Wl,-bE:Modules/python.exp -lld
Good: < LINKFORSHARED=-Wl,-bE:Modules/python.exp -lld
de (available from SourceForge) could still
prove a useful reference.
Cheers,
Andrew.
--
-----
Andrew I MacIntyre "These thoughts are mine alone..."
E-mail: [EMAIL PROTECTED] (pref) | Snail: PO Box 370
s about
> like trimming an elephants toenails to save weight.
Using ctypes to call Ghostscript's API also works well. I've only done
this on Windows, but it should also work on other systems with ctypes
support.
--
-
An
Carl K wrote:
> Andrew MacIntyre wrote:
>> Grant Edwards wrote:
>>> On 2007-12-24, Carl K <[EMAIL PROTECTED]> wrote:
>>>
>>>>> If it is a multi page pdf Imagemagick will do:
>>>>>
>>>>> convert file.pdf page-%03d.pn
tension's import routine
(init()) for a C extension, and immediately after loading
the library if using ctypes.
--
-----
Andrew I MacIntyre "These thoughts are mine alone..."
E-mail: [EMAIL
r cache.
I'm in Australia, so maybe it depends on where the request is coming from?
Any clues on this would be much appreciated.
Or maybe someone is willing to make their VCToolkitSetup.exe available
temporarily...
Andrew
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] (Alex Martelli) wrote:
> Andrew Trevorrow <[EMAIL PROTECTED]> wrote:
> > Or maybe someone is willing to make their VCToolkitSetup.exe available
> > temporarily...
>
> I suggest any such offers be made privately, since I'm pretty sure
> th
This may be a foolish question, but what's the most straightforward way to
plot a bunch of data in Python?
That is, I want to write a program that does some number crunching, and then
I want to change some parameters and watch how the changes affect the
results. I could produce a file to hand
"PAolo" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> for i in range(1,10):
>if i%2:
>odd.append(i)
>else:
>even.append(i)
In 2.5 you'll be able to say
for i in range(1,10):
(odd if i%2 else even).append(i)
Whether you
get any other responses, send me a copy of the full make log
(ie "make >make.log 2>&1") and I'll compare it to the log from my test
build.
-
Andrew I MacIntyre "These tho
"Christophe" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> [EMAIL PROTECTED] a écrit :
> Floating point numbers just don't have the required precision to represent
> 2.0 - 1e-050. For your specific problem, if you really want the result to
> be < 2.0, the the best you can do is
"Andrew Koenig" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I disagree. For any two floating-point numbers a and b, with b != 0, it
> is always possible to represent the exact value of a mod b as a
> floating-point number--at least on every floating
eintopython.org since you know how to
program already. It's free!
---
Andrew Gwozdziewycz
[EMAIL PROTECTED]
http://ihadagreatview.org
http://and.rovir.us
--
http://mail.python.org/mailman/listinfo/python-list
guments:
def getBook(id=None, name=None):
if id:
# do whatever for id
elif name:
# do whatever for name here
They are nearly identical.
---
Andrew Gwozdziewycz
[EMAIL PROTECTED]
http://www.23excuses.com
http://ihadagreatview.org
http://and.rovir.us
--
http://mail.python
Hi everyone,
Has anyone developed a pymqi module based file transfer method for use
with WebSphere MQSeries v5.3?
If so, would it be possible to point me towards examples of how this was
done?
Any help that can be provided would be greatly appreciated.
Thanks
--
http://mail.python.org/mailma
10)
>>>> b=range(5)
>>>> for x in b:
> ... a.remove(x)
> ...
> it will very slowly. Shall I change to another data structure and
> choos
> a better arithmetic?
> any suggestion is welcome.
> thanks a lot!
>
> --
> http://mail.python.
n toplevel.
On May 9, 2006, at 4:27 AM, N/A wrote:
> Hi all,
> I am learning Python. Just wondering how to clear saved memory in
> Python? Like in Matlab I can simply use "clear all" to clear all saved
> memory.
>
> Thank u!
> --
> http://mail.python.
educational (eg
Modules/posixmodule.c).
--
-----
Andrew I MacIntyre "These thoughts are mine alone..."
E-mail: [EMAIL PROTECTED] (pref) | Snail: PO Box 370
[EMAIL PROTECTED] (alt) |
ividends when the repetition counts are
large enough; whether this is the case for your tests I can't say.
--
-
Andrew I MacIntyre "These thoughts are mine alone..."
E-mail: [EMAIL PROTECTED] (pref) | Snail: PO Box 370
[EMAIL PROTECTED] (alt)
Ivan Voras wrote:
> Andrew MacIntyre wrote:
>
>> Comparative CPU & memory utilisation statistics, not to mention platform
>> and version of Python, would be useful hints...
>
> During benchmarking, all versions cause all CPU to be used, but Python
> version has ~
Good evening,
I need to generate checksums of a file, store the value in a variable,
and pass it along for later comparison.
The MD5 module would seem to do the trick but I'm sketchy on implementation.
The nearest I can see would be
import md5
m=md5.new()
contents = open(self.file_name,"rb").
Actually, I think I got it but would like to confirm this looks right.
import md5
checksum = md5.new()
mfn = open(self.file_name, 'r')
for line in mfn.readlines():
checksum.update(line)
mfn.close()
cs = checksum.hexdigest()
print
Roy Smith wrote:
>>
>> However this does not appear to be actually returning the checksum.
>>
>> Does anyone have insight into where I am going wrong?
>
> After calling update(), you need to call digest(). Update() only updates
> the internal state of the md5 state machine; digest() returns the
When I run the script, I get an error that the file object does not have
the attribute getblocks.
Did you mean this instead?
def getblocks(f, blocksize=1024):
while True:
s = f.read(blocksize)
if not s: return
yield s
def getsum(self):
Hi Everyone.
I tried the following to get input into optionparser from either a file
or command line.
The code below detects the passed file argument and prints the file
contents but the individual swithces do not get passed to option parser.
Doing a test print of options.qmanager shows it una
Max Erickson wrote:
> Andrew Robert <[EMAIL PROTECTED]> wrote in
> news:[EMAIL PROTECTED]:
>
<\snip>
> Check parser.usage, it is likely to look a lot like your infile.
>
> I'm not sure, but I think you need to pass your alternative arguments
> to par
Max Erickson wrote:
> I don't know much about optparse, but since I was bored:
>
help(o.parse_args)
> Help on method parse_args in module optparse:
>
> parse_args(self, args=None, values=None) method of
> optparse.OptionParser instance
> parse_args(args : [string] = sys.argv[1:],
>
Tim N. van der Leeuw wrote:
> Andrew Robert wrote:
>> Hi Everyone.
>>
>>
>> I tried the following to get input into optionparser from either a file
>> or command line.
>>
>>
>> The code below detects the passed file argument and prints the file
Hi everyone,
I have a python program that will need to interact with an MQSeries
trigger monitor.
It does this fine but it hogs the trigger monitor while it executes.
I'd like to fork the program off and terminate the parent process so
that the trigger monitor frees up.
Does anyone how this c
bruno at modulix wrote:
> Andrew Robert wrote:
>> Hi everyone,
>>
>>
>> I have a python program that will need to interact with an MQSeries
>> trigger monitor.
>>
>> It does this fine but it hogs the trigger monitor while it executes.
>>
>>
Gary Herron wrote:
> Andrew Robert wrote:
>
>
> The windows CreateProcess call has many of the same semantics as the
> Unix fork, i.e., a new process is created sharing all the resources of
> the original process. The "subprocess" modules uses CreateProcess, but
Hey everyone,
Maybe you can see something I don't.
I need to convert a working piece of perl code to python.
The perl code is:
sub ParseTrig {
# unpack the ibm struct that triggers messages.
my $struct = shift;
my %data;
@data{qw/StructID Version QName ProcessName TriggerData ApplType
Peter Otten wrote:
> Andrew Robert wrote:
>
>> format='4s 4s 48s 48s 64s 4s 256s 128s 128s 48s'
>
> You are trying to squeeze 10 items into just
>
>> d1,d2=struct.unpack(format,data)
>
> two variables (d1 and d2)
>
>> ValueError: too man
r.e.s. wrote:
> I have a million-line text file with 100 characters per line,
> and simply need to determine how many of the lines are distinct.
>
> On my PC, this little program just goes to never-never land:
>
> def number_distinct(fn):
> f = file(fn)
> x = f.readline().strip()
> L
Hi everyone,
I am in the process of creating a file transmit/receiver program using
MQSeries.
The way it works is through creation of an XML message.
Elements within the XML message contain things such as file name, size,
and the file contents.
The file contents are encoded, currently using Bas
[EMAIL PROTECTED] wrote:
> hello --
>
> i'm running python/pygame on maemo (nokia 770). my situation is that
> i'm continually scouring this one directory for incoming files. if i
> see if there's a new file (coming in via wireless scp), i proceed to
> load it and process it.
>
> however, i think
e
the control of the odbc module.
I've not had much to do with SQL Server, but I wonder whether there is
some configuration setting that might be affecting this behaviour.
-
Andrew I MacIntyre
Hi Everyone,
Is there a way to test if a file is binary or ascii within Python?
I'd prefer not to text against file extension.
Any help you can provide would be greatly appreciated.
Thanks,
Andy
--
http://mail.python.org/mailman/listinfo/python-list
Hi Everyone,
I am having a problem with a class and hope you can help.
When I try to use the class listed below, I get the statement that self
is not defined.
test=TriggerMessage(data)
var = test.decode(self.qname)
I would have thought that self would have carried forward when I
wes weston wrote:
> Andrew Robert wrote:
>> Hi Everyone,
>>
>> I am having a problem with a class and hope you can help.
>>
>> When I try to use the class listed below, I get the statement that self
>> is not defined.
>>
>> test=TriggerMes
Hey Bruno,
Although I have not tested it, this appears to be it exactly.
Some confusion though.
> import struct
>
> class TriggerMessage(object):
> def __init__(self,data):
> """
> Unpacks the passed binary data based on the
> MQTCM2 format dictated in
>
I have two Perl expressions
If windows:
perl -ple "s/([^\w\s])/sprintf(q#%%%2X#, ord $1)/ge" somefile.txt
If posix
perl -ple 's/([^\w\s])/sprintf("%%%2X", ord $1)/ge' somefile.txt
The [^\w\s] is a negated expression stating that any character
a-zA-Z0-9_, space or tab is ignored.
The ()
Dennis Lee Bieber wrote:
> On Wed, 24 May 2006 14:45:55 GMT, John Salerno
> <[EMAIL PROTECTED]> declaimed the following in comp.lang.python:
>
>> I just right-clicked on My Computer --> Properties --> Advanced -->
>> Environment Variables, and added a new one called PYTHONPATH. I don't
>> know i
Andrew Robert wrote:
> I have two Perl expressions
>
>
> If windows:
>
> perl -ple "s/([^\w\s])/sprintf(q#%%%2X#, ord $1)/ge" somefile.txt
>
> If posix
>
> perl -ple 's/([^\w\s])/sprintf("%%%2X", ord $1)/ge' somefile.txt
>
Hi everyone,
I have two test scripts, an encoder and a decoder.
The encoder, listed below, works perfectly.
import re,sys
output = open(r'e:\pycode\out_test.txt','wb')
for line in open(r'e:\pycode\sigh.txt','rb') :
output.write( re.sub(r'([^\w\s])', lambda s: '%%%2X' %
ord(s.group()), line)
Max Erickson wrote:
> Try getting rid of the lamba, it might make things clearer and it
> simplifies debugging. Something like(this is just a sketch):
>
>
> max
>
Yeah.. trying to keep everything on one line is becoming something of a
problem.
To make this easier, I followed something from
Hi Everyone,
Thanks for all of your patience on this.
I finally got it to work.
Here is the completed test code showing what is going on.
Not cleaned up yet but it works for proof-of-concept purposes.
#!/usr/bin/python
import re,base64
# Evaluate captured character as hex
def ret_hex(va
As a Perl monkey in the process of learning Python, I just stepped on
the "'1' (string) is not the same as 1 (integer) in regards to keys for
dictionaries/hashes" landmine. Is there a good way to ensure that
numbers represented as strings or ints do not get mixed up as keys?
Example of the proble
> From: Stephen Hansen [mailto:[EMAIL PROTECTED]
> Sent: Thursday, January 03, 2008 7:39 PM
> To: Reedick, Andrew
> Cc: [email protected]
> Subject: Re: dictionary/hash and '1' versus 1
>
>
>
> Well one important thing to learn while learning Pyt
possibly get better
performance).
--
-----
Andrew I MacIntyre "These thoughts are mine alone..."
E-mail: [EMAIL PROTECTED] (pref) | Snail: PO Box 370
[EMAIL PROTECTED] (alt) |Belconnen ACT 2616
Web:http://www.and
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:python-
> [EMAIL PROTECTED] On Behalf Of Steven D'Aprano
> Sent: Saturday, January 05, 2008 7:01 PM
> To: [email protected]
> Subject: Re: dictionary/hash and '1' versus 1
>
> The problem with automatic conversions between strin
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:python-
> [EMAIL PROTECTED] On Behalf Of Paddy
> Sent: Monday, January 07, 2008 12:52 PM
> To: [email protected]
> Subject: Re: dictionary/hash and '1' versus 1
>
> Or how using different operators for similar operations on differ
names = "freddy fred bill jock kevin andrew kevin kevin jock"
produce a frequency table of names, sorted descending by frequency.
then ascending by name. For the above data, the output should be:
kevin : 3
jock : 2
andrew: 1
bill : 1
fred :
1101 - 1200 of 1812 matches
Mail list logo