From: Martin =?utf-8?B?U2Now7bDtm4=?= on
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. And I did a minute amount
of Turbo Pascal code, too little and too many years ago to count.

Since then I have done some stuff in Matlab and (very basic) UNIX
scripts.

Does HTML, css and LaTeX count?

So why Python? Well, I thought it would be fun to learn a little
about GUI programming and a friend who is a real programmer recommended
Python + PyQt. I have bought some books and lurked here for about
a year but haven't managed to get going yet. I figured I needed
some kind of project for that and now I have two.

Learning Python and PyQt is spare time killer/brain teaser activity.

The thermal contact conductance stuff is something that come in
handy at work.

So here is what I plan to do based on your kind advice and some
thinking of my own.

1) I fix the unit thing by adding a conversion to the results
presentation routine.

2) Recreating the functionality of the program in Python and PyQt
will be a 'long term' educational project at home. There are
various bits and pieces there: data base handling, GUI design, math,
logic, error/exception handling...

We have long, dark winters where I live :-)

All the best,

/Martin
From: Colin W. on
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 though.
> Its output is in imperial units. Converting isn't a big deal
> for occasional use but if I start to use this stuff on a
> regular basis...
>
> So I down-loaded the source code and found this thing is written
> in Perl.
>
> Should I learn enough Perl to add the conversion? Probably
> but this may be a nice excuse to get my Python education
> going and if I do I might as well re-do the user interface.
>
> If I do re-write this thing in Python I might need to learn both
> Perl and Python...
>
> 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?
>
> TIA,
>
> /Martin

Martin,

If you convert the Perl, you continue the other fellow's errors. If you
do it yourself, you'll be able to make your own - there should be fewer
of them.

Google: unit conversion python

you'll have lots of offers.

Colin W.
From: r0g on
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
> manipulating measurement instruments. And I did a minute amount
> of Turbo Pascal code, too little and too many years ago to count.
>
> Since then I have done some stuff in Matlab and (very basic) UNIX
> scripts.
>
> Does HTML, css and LaTeX count?
>
> So why Python? Well, I thought it would be fun to learn a little
> about GUI programming and a friend who is a real programmer recommended
> Python + PyQt. I have bought some books and lurked here for about
> a year but haven't managed to get going yet. I figured I needed
> some kind of project for that and now I have two.
>
> Learning Python and PyQt is spare time killer/brain teaser activity.
>
> The thermal contact conductance stuff is something that come in
> handy at work.
>
> So here is what I plan to do based on your kind advice and some
> thinking of my own.
>
> 1) I fix the unit thing by adding a conversion to the results
> presentation routine.
>
> 2) Recreating the functionality of the program in Python and PyQt
> will be a 'long term' educational project at home. There are
> various bits and pieces there: data base handling, GUI design, math,
> logic, error/exception handling...
>
> We have long, dark winters where I live :-)
>
> All the best,
>
> /Martin


I'd recommend you start from scratch and refer to the perl version if
and when you need to. 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 glade) rather than hand coded anyway so it will
probably provide little insight. Also, they probably didn't make it with
QT which is fairly different from GTK. It's like the housing industry,
demolition + newbuild is almost always cheaper than renovation. If you
can spare yourself the ordeal of learning perl and the chore of
interpreting somebody else's perl then grasp it with both hands!

Good luck. I'm sure you'll be fine - python is a deeply pleasing
language to work in :)

Roger.
From: Martin =?utf-8?B?U2Now7bDtm4=?= on
r0g <aioe.org(a)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 glade) rather than hand coded anyway so it will
> probably provide little insight. Also, they probably didn't make it with
> QT which is fairly different from GTK.

Tk is what they used.

/Martin
From: Aahz on
In article <87zl5rnayz.fsf(a)crunchbang.Belkin>,
Martin =?utf-8?B?U2Now7bDtm4=?= <martin.schoon(a)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 occasional use but if I
>start to use this stuff on a regular basis...

I'd write an imperial to metric converter in Python ;-)
--
Aahz (aahz(a)pythoncraft.com) <*> http://www.pythoncraft.com/

Looking back over the years, after I learned Python I realized that I
never really had enjoyed programming before.