Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

    Python has been a backbone of Dropbox since its early days as it 
    allowed the startup to write code once but deploy it across platforms.
Can anybody elaborate on this? Is the argument that Python is cross-platform because everybody uses GNU tools on every platform, or are there other reasons why Python is more cross-platform than other languages?


1) CPython is written in portable readable C code. 2) CPython has been around since 1991, and thus people have had the time to port it properly. 3) Python have shown an interest in supporting both Unix and Windows for a long time (and later OS X), thus every new change has to describe how it will interact with both systems.

You as an python developer don't have to worry much about different platforms since every new library and language feature tries to work the same on all supported platforms. (of course this doesn't always happen)


The "batteries included" philosophy and commitment to making CPython work on multiple platforms has gone a long way. I don't think it has much to do with GNU tools specifically.

An interview with Guido himself that discusses some of the multiplatform emphasis in the development of python: http://oreilly.com/pub/a/oreilly/frank/rossum_1099.html


Perhaps as Python has had Windows installers for a longer period of time?

If me memory serves me correctly, Python has had simple Windows binary install packages (from Python.org and ActiveState) longer that most other scripting languages in the same class, that did not need require an additional layer like Cygwin.


No compile step. Python exists for a great many platforms.

Also true for several other "scripting" languages.


But python code is compiled (and saved as *.pyc files). The compiled code is then executed by a VM, in the same way as Ruby, Java and C# and a lot of other languages work.

Therefore, it is a bit stange to see people referring to Ruby or Python as 'scripting' languages. I'd call shell script a 'scripting' language, but not Java or Python.


No compile STEP means there is a REPL, there is no waiting seconds, minutes, hours while a compiler compiles and links code to native format, code on arch 'A' can be run on arch 'B' without [re|cross]compiling it and a few other less important things.

That there happens to be an PURELY optional for performance only pre-parsed representation for the interpreter is immaterial.


I really don't the sentence as "the best language to deploy across platforms", but as "it works across platforms".

I started using Python on Windows machines, and I was able to develop programs that run without any problem or adaptation on Linux servers. That include thing like GTK, making a GUI and working on Windows and Linux.

It is possible that I could achieve that in other languages, I guess. But it had that capability, for sure... And for Dropbox that's a very interesting feature, as they have a client that needs to run on Windows, Linux and OS X...


Yeah, I don't think that trait distinguishes Python from Ruby or Perl, or even Java, for that matter. Cross-platform compatibility is an advantage of interpreted languages in general.


Not if we're talking about the real world (implementation), rather than the theoretical capability of a language in itself. Perl and Ruby don't see much love on Windows, particularly with GUI toolkits and the like. Python is the only one of the three that feels comfortable using on Windows, from the skeleton of the app down to actually distributing it. Java is really good at cross platform apps though.

This is one of the few things that irks me in programming communities, often you'll seen criticism or praise of a point in a language, and then some language lawyer comes and talks about what said language can do in theory, rather than looking at the practicalities of actual, real world implementations, the community and culture surrounding it and so on. No one gives a crap if any dynamic language COULD be made to work the right way on many OS, people care if the work is done, not if it COULD be done.

The worst offenders are of course people victim of the sufficiently smart compiler curse.


This is what I was wondering about, because I have so far failed to install a single Python package on Windows without it breaking on some Unix dependency.


What Python package you tried to install that comes with "Unix dependency"?

I have 163 packages in my local pypi, and they work fine on Linux, Windows, and OS X.


Perhaps I'm just unlucky. To be fair, I've only tried to run like 3 python packages.


If you're pulling a pure python package (like Django, Tornado or requests) then you're golden on any platform python is available for. If you're pulling a python package that contains C bits (like PIL, msgpack-python) then you'll need the compiler toolchain and associated libraries.

Luckily, most such packages (the popular ones at least) can be obtained in other ways (PIL through a win only download, or get a pure-python alternative like msgpack-pure-python).


I use Ruby for light scripting on a Windows machine. RubyInstaller worked just fine and so do the irb shell and my scripts. Dropbox is a web app, so who cares about GUI toolkits? Perhaps you're right that the Python community tried harder, earlier, to support Windows and other non-UNIX platforms. But it's hard to imagine Dropbox actually selecting Python to build their web app for that reason. Maybe in their earlier days they used a hosting service that supported Python but not Ruby, Perl, etc.? Who knows...


You wrote 513 characters about a subject you don't know anything about. Why is that ? You didn't use dropbox, you don't know how it works (hint, what made it so popular is the desktop client that syncs your data in the first place. And it's written with wxpython.), but you felt compelled to write 513 chars about your ignorance and wild speculation ("Maybe in their earlier days blabla").

Then comparing apples to oranges "I use Ruby for light scripting" vs "widely deployed desktop app with users from the three major desktop systems (Windows, OS X, Linux)."

This kind of behavior is a serious annoyance in online discussions.


I'm sorry if I annoyed you, but there's really no need to be rude. It's a subject I never claimed to know a lot about, but it's also false to say that I don't know "anything" about it. I'm here to learn more, not to show off what I already know.

If you were actually here to contribute, you might give a concrete example of why Python is more cross-platform compatible than other interpreted languages (because someone built a better Windows GUI toolkit for it?), but if you just want to put down and feel smarter than someone you don't know, you're wasting your time and keystrokes.

The fact that you actually bothered to count how many characters I typed strongly suggests the latter.


Now you're doing more of the same, not contributing anything of value to the discussion in 689 characters.


Dropbox also have a desktop client that's written in python. Presumably with a slightly different UI layer and packaging method depending on the target OS, but with the underlying functionality shared.


OK, that makes more sense. I don't use Dropbox and didn't realize they had a desktop GUI client.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: