2009/12/25 Aahz a...@pythoncraft.com:
I'd write an imperial to metric converter in Python ;-)
Should be possible to use unum (http://bit.ly/4X0PwR) to do the
conversions. The SI units are already defined - adding in any
necessary imperial units should be easy enough.
--
Cheers,
Simon B.
--
In article 87zl5rnayz@crunchbang.belkin,
Martin =?utf-8?B?U2Now7bDtm4=?= martin.sch...@gmail.com wrote:
Problem: I have come across a small open source application that I find
quite useful. It does have one major flaw though. Its output is in
imperial units. Converting isn't a big deal for
On Dec 13, 5:23 pm, martin.sch...@gmail.com (Martin Schöön) wrote:
r0g aioe@technicalbloke.com writes:
You'll probably find the majority of code in a GUI
app is boring window handling stuff [...]
Also, they probably didn't make it with
QT which is fairly different from GTK.
Tk is
Martin Schöön wrote:
Thanks all, great response!
A little more background:
I am not a programmer but I have done some programming in the past.
This was all humble number crunching as part of my PhD project using
FORTRAN. I also did some Rocky Mountain Basic coding for programs
r0g aioe@technicalbloke.com writes:
I'd recommend you start from scratch and refer to the perl version if
and when you need to.
That is my plan.
You'll probably find the majority of code in a GUI
app is boring window handling stuff rather, often this is machine
generated (by progs like
On 09-Dec-09 15:33 PM, Martin Schöön wrote:
First off: I am new here and this is my first post after
lurking for quite some time.
Second off: I don't know much Python---yet.
Problem: I have come across a small open source application
that I find quite useful. It does have one major flaw
martin.sch...@gmail.com (Martin Schöön) writes:
First off: I am new here and this is my first post after
lurking for quite some time.
Hi.
Second off: I don't know much Python---yet.
It's not a very big language. If you have experience programming in
other languages, you can probably pick it
Thanks all, great response!
A little more background:
I am not a programmer but I have done some programming in the past.
This was all humble number crunching as part of my PhD project using
FORTRAN. I also did some Rocky Mountain Basic coding for programs
manipulating measurement instruments.
First off: I am new here and this is my first post after
lurking for quite some time.
Second off: I don't know much Python---yet.
Problem: I have come across a small open source application
that I find quite useful. It does have one major flaw though.
Its output is in imperial units. Converting
Python and Perl often have different design idioms - learning to write
*well* in a language involves understanding those idioms, and being
able to translate between languages involves understanding the source
language well enough to understand the intent of the program's code
(even if its poorly
On Dec 9, 1:33 pm, martin.sch...@gmail.com (Martin Schöön) wrote:
First off: I am new here and this is my first post after
lurking for quite some time.
Second off: I don't know much Python---yet.
Problem: I have come across a small open source application
that I find quite useful. It does
Martin Schöön wrote:
Hence, are there any Perl to Python converters? So far I
have only found bridgekeeper which really is (was?) consultancy.
Apart from that I only find people recommending a manual re-write.
Any thoughts/recommendations?
Voice of almost no experience. I once ran a
Howdie Python folks! I am very new to Python ( 3rd day now ) and it has
already earned its place as my fav. language to work in. I hope to
continue, and I really would appreciate some good resources if anybody
would care to contribute.
My current head-scratcher concerns something I can do in
Koncept wrote:
#!/usr/bin/perl
# Parse comma delimited lines and create a final frequency hash
# Real example would read a file line by line
my %dict = {};
my @lines = ( 1,2,3,4,5, 2,3,4,5, 3,4,5, 4,5, 5 );
foreach(@lines) { map( $dict{ $_ }++, split( , ) ); }
foreach( sort byKeys keys
Koncept wrote:
Howdie Python folks! I am very new to Python ( 3rd day now ) and it has
already earned its place as my fav. language to work in. I hope to
continue, and I really would appreciate some good resources if anybody
would care to contribute.
My current head-scratcher concerns
Hi All--
John Machin wrote:
how to duplicate the following bit of code using Python dictionaries.
[expletives deleted]
+1 QOTW
Metta,
Ivan
--
Ivan Van Laningham
God N Locomotive Works
http://www.andi-holmes.com/
John Machin wrote:
freq_dict = {}
...
if thing in freq_dict:
freq_dict[thing] += 1
else:
freq_dict[thing] = 1
or, less plainly,
freq_dict[thing] = freq_dict.get(thing, 0) + 1
or
try:
freq_dict[thing] += 1
except KeyError:
freq_dict[thing] = 1
STeVe
--
In article [EMAIL PROTECTED], Steven Bethard
[EMAIL PROTECTED] wrote:
I don't speak Perl, but based on your output, I'd probably do something
like:
py lines = [1,2,3,4,5, 2,3,4,5, 3,4,5, 4,5, 5]
py counts = {}
py for items in lines:
...for item in items.split(','):
...
18 matches
Mail list logo