Python Forum
platform independent programming with Python - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: General (https://python-forum.io/forum-1.html)
+--- Forum: News and Discussions (https://python-forum.io/forum-31.html)
+--- Thread: platform independent programming with Python (/thread-30136.html)



platform independent programming with Python - PythonMarlem - Oct-06-2020

Hello,

An important reason why I want to get really good at Python is that I can develop software
in Windows that also runs on Ubuntu and MacOS.

Question:
Is there a website, YouTube video or tutorial with which I can learn what things
I have to pay attention to so that my programs run on all operating systems?


RE: platform independent programming with Python - Larz60+ - Oct-06-2020

Since python is an interpreted language, the code rarely needs any tweaking from OS to OS,
so rare in fact that I never worry about it. The only thing that comes to mind is that there are some character encodings that don't play well between all OS's. Stick to UTF-8 and that goes away.


RE: platform independent programming with Python - micseydel - Oct-06-2020

What is your goal? What problem are you trying to solve? Most Python is automatically be platform-independent. There are an unbounded number of platform-dependent things though, I think it would be better for you to narrow things down for us (significantly) rather than us speculate about the particular things you might come across.

I wouldn't be surprised if there are generic resources, but they're not something I'm familiar with. Perhaps someone else on the forum will know, but I wouldn't bank on it.