扩展 PythonCE 以从 PythonCE 轻松访问 gsm/camera/gps
似乎没有适用于 Windows 移动设备的脚本语言可以访问电话(短信、彩信、打电话、拍照)。 我想知道创建一个能够实现这一点的 Python 库(用 C 编写一些东西,在 PythonCE 中编译和导入)会有多复杂。
问题:应该从哪里开始了解如何编译 PythonCE 模块,该模块将为 Windows mobile 上的 Python 提供附加功能。 另外,需要什么工具包。 Mac(Leopard)上有可能吗?
As it seems there is no scripting language for Windows mobile devices that gives access to phone (sms, mms, make a call, take photo). I wonder how complex it would be to make a Python library that would enable that (write something in C, compile, and import in PythonCE).
Question: Where shall start to understand how to compile a PythonCE module that will give additional functionality to Python on Windows mobile. Also, what is the required toolkit. Is it at all possible on Mac (Leopard)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
第一步,您应该尝试创建调用您想要的功能的可执行程序。 例如,要发送短信,看来您需要调用 MailSwitchToAccount,传递“SMS”等 - 熟悉平台上的 C API。
要创建可执行文件,您需要 Visual Studio 和 Windows Mobile SDK。 它们在 Windows 上运行。 对于交叉编译,有 CeGCC (http://cegcc.sourceforge.net/docs/using .html),但使用它可能会使事情比使用 Microsoft 工具更复杂。
当您拥有执行所需功能的可执行文件时,使用它们创建 Python 扩展模块应该很容易。 只需遵循扩展和嵌入教程即可。
As the first step, you should try to create executable programs that invoke the functions you want. For example, to send SMS, it appears you need to call MailSwitchToAccount, passing "SMS", and so on - familiarize yourself with the C API on the platform.
To create executables, you need Visual Studio, and the Windows Mobile SDK. Those run on Windows. For cross-compilation, there is CeGCC (http://cegcc.sourceforge.net/docs/using.html), but using it probably makes things more complicated than using the Microsoft tools.
When you have executables that perform the functions you desire, creating Python extension modules out of them should be easy. Just follow the extending-and-embedding tutorials.
MSDN 有大量用于 Windows Mobile 上的 C++ 开发的示例,并且 SDK 附带了多个示例应用程序。 不幸的是,VS Express 版本(免费版本)不附带用于智能设备的编译器。 唯一的免费选项是较旧的 eMbedded Visual C++ (eVC),它现在已有大约 8 年历史且不受支持(尽管它仍然可以为至少 CE 5.0 及以上的设备创建应用程序)。
MSDN has plenty of samples for C++ development on Windows Mobile, and the SDK comes with several sample application. Unfortunately VS Express editions (the free ones) do not come with compilers for Smart Devices. The only free option is the older eMbedded Visual C++ (eVC), which is now something like 8 years old and not supported (though it can still create apps for devices at least up through CE 5.0).
刚刚尝试建立一个环境来编译 pythonce 模块(http://pythonce.sourceforge.net/Wikka/SConsBuild )但似乎我只能使用2003 PPC SDK并且它没有最新的功能可用。 即使我按照教程中的所有步骤操作,示例 spammodule.c 也无法编译:(
just tried establishing an environment to get pythonce modules compiled (http://pythonce.sourceforge.net/Wikka/SConsBuild) but seems that I can only use 2003 PPC SDK and it has no recent functions available. Even when I followed all the steps in tutorial, sample spammodule.c does not compile :(