6 ms·
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 elabor
by natural219 14y ago
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?
- Thrymr 14y agoThe "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 http://oreilly.com/pub/a/oreilly/frank/rossum_1099.html
- bsg75 14y agoPerhaps 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.
- kyllo 14y agoYeah, 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.
- Nikaido 14y agoNot 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.
- natural219 14y agoThis 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.
- j-kidd 14y agoWhat 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.
- natural219 14y agoPerhaps I'm just unlucky. To be fair, I've only tried to run like 3 python packages.
- shuzchen 14y agoIf 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).
- kyllo 14y agoI 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...
- 14y ago
- njharman 14y agoNo compile step. Python exists for a great many platforms. Also true for several other "scripting" languages.
- Luyt 14y agoBut 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.
- njharman 14y agoNo 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.
- driax 14y ago1) 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)
- jaimebuelta 14y agoI 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...