Dropbox如何在Windows和OS X上使用Python? [英] How does Dropbox use Python on Windows and OS X?

查看:89
本文介绍了Dropbox如何在Windows和OS X上使用Python?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows中,Dropbox客户端使用python25.dll和MS C运行时库(msvcp71.dll等).在OS X上,Python代码是编译后的字节码(pyc).

In Windows the Dropbox client uses python25.dll and the MS C runtime libraries (msvcp71.dll, etc). On OS X the Python code is compiled bytecode (pyc).

我的猜测是,他们使用的是他们编写的通用库,然后只需要对不同的平台使用不同的钩子即可.

My guess is they are using a common library they have written then just have to use different hooks for the different platforms.

这是什么开发方法?显然不是IronPython或PyObjC.这种范例对我很有吸引力,但是我的CS foo和Google foo却使我失望.

What method of development is this? It clearly isn't IronPython or PyObjC. This paradigm is so appealing to me, but my CS foo and Google foo are failing me.

推荐答案

Dropbox在Mac上使用wxPython和PyObjC的组合(0.8系列中的wxPython较少).看起来他们已经建立了一些UI抽象层,但是并没有什么让人不知所措的,也就是说,他们正在以正确的方式来开发跨平台应用程序.

Dropbox uses a combination of wxPython and PyObjC on the Mac (less wxPython in the 0.8 series). It looks like they've built a bit of a UI abstraction layer but nothing overwhelming—i.e., they're doing their cross-platform app the right way.

它们包含自己的Python,主要是因为Mac上包含的Python版本因操作系统版本而异(并且Dropbox支持回溯至10.4 IIRC);此外,他们还自定义了Python解释器,以改善线程和I/O行为.

They include their own Python mainly because the versions of Python included on the Mac vary by OS version (and Dropbox supports back to 10.4 IIRC); also, they've customized the Python interpreter a bit to improve threading and I/O behavior.

(我不为Dropbox工作,也不具备任何内部知识;我所做的只是阅读他们的论坛并检查了Dropbox应用程序捆绑包中site-packages.zip中的文件名.)

(I do not work for Dropbox or have any inside knowledge; all I did was read their forums and examine the filenames in site-packages.zip in the Dropbox app bundle.)

这篇关于Dropbox如何在Windows和OS X上使用Python?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆