[Tutor] Mosel to Python

Alan Gauld alan.gauld at yahoo.co.uk
Thu Sep 29 04:56:26 EDT 2022


On 29/09/2022 09:33, Priede Vazquez, Natalia via Tutor wrote:
> Hello! My name is Natalia and I have experience programming in Mosel language. 

I had never heard of Mosel but I had a look at the website and it
looks quite interesting. (A mix of C and Pascal!) Based on my quick
skim through the tutorial I don't think converting to Python should
be too difficult.

While we are not Mosel experts (most of us at least, there may be some)
we can certainly help with Python. If you need to translate some Mosel
it will help if you include the Mosel code and an explanation of what it
does. Then we can advise on the Pythonic equivalent.

Also, when translating between languages there is always a temptation to
do a simple line by line translation, That will usually work but often
results in inefficient code in the new version. Often there will be a
better, more idiomatic way, to write the code using native features
of Python (especially the many standard and 3rd party library modules).
So you might be best translating whole blocks of code or even whole
functions at a time.

But basically, feel free to ask questions. Show us any error messages
you get and code snippets (we are happy with up to 100 lines inside a
post. Anything bigger should go on a pastebin - we don't get attachments
on the list)

Finally, let us know the OS and Python version you are using.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos






More information about the Tutor mailing list