Ask HN: Dropbox uses Python a lot, is it also the case for their Windows client?

2 points by josephernest ↗ HN
It is well known that Dropbox uses (or used) Python a lot for their operation - I have read this quite often here on HN or elsewhere. I imagine this is true for their backend servers.

Question: was their Windows client app mainly done in Python too? (the one that watches the filesystem for changes, stays in the bottom-right system tray icon notification area near the clock, has a GUI...)

If so, which py => exe freeze solution did they use?

How did they prevent the Python bytecode to be decompiled (obfuscation, or compilation in a similar way to Cython? another method?)

Did they open-source some of the tools they developed to make Python perform well as a language that can be distributed as a .exe?

I have tried py2exe and many similar tools, also Cython in embedded mode, and distribution as a .exe is usually not the strength of Python (usual tools work rather well, but sooner or later you find corner cases), so I am curious about the Dropbox company tools for this.

Are there articles about this?

5 comments

[ 2.9 ms ] story [ 25.3 ms ] thread
Dropbox has been moving away from Python. A lot of their new backend infrastructure is now written in Go. I don't have any inside knowledge, but it would surprise me if Dropbox ever used Python for their Windows client.

My guess is that it's a .NET executable, and was built using C#.

One way to know if it’s a .Net client is you can run ILDasm or DotPeek against the windows binary and see if it decompiles it.
Yes, their desktop clients were mainly written in Python (with Qt) and shared a lot of code between platforms.

Right now I'm looking at their installation folder under Windows. It still comes with python38.dll, as well as a whole bunch of .pyd files. There is some .exe of course, but that could be a small wrapper written in a different language. Anyway, a bundle doesn't make much sense in this case.

Although I can't be bothered to look for sources, I remember reading that they used a quite heavily modified interpreter, at least for obfuscation and optimization purposes.

Some clues can be found on their blog: https://dropbox.tech/application.

Oh this is interesting, I would be super interested to learn about how they embedded Python in their .exe. (Cython can do it, but there are also other ways).

I started reading the blog, but not so much about the packaging of their code into .exe distribution.