我真的看了很多地方但还没找到合适的 解决方案,所以我在这里要求希望有人有经验 与该主题。 问候, 托马斯。Hi,Sorry I''ve posted a similar question some weeks ago, but I got noanswers. I want to embed a Python application on a device with limitedresources, esp. storage limitations. Is there a way to reduce the Pythoninterpreter to a set of modules that''s urgently needed? Or is there amethod to have gzipped modules that are unzipped on the fly into memorywhen they''re accessed? That would be even better.Additionally, is there a Python module that contains all the stuffneeded for an embedded application like graphics, sound etc. or do Ihave to use the various bindings to libraries like cairo, Qt or similar?Is there a site that helps with those decisions?I''ve really looked at a lot of places but haven''t found a suitablesolutions yet, so I''m asking here in hope that someone has experiencewith that topic.Regards,Thomas.推荐答案 7月15日,11:51,Thomas Troeger< thomas.troeger .... @ siemens.com> 写道:On 15 Jul., 11:51, Thomas Troeger <[email protected]>wrote: 我真的看了很多地方,但还没有找到合适的 解决方案,所以我在这里要求希望有人有经验 与该主题。I''ve really looked at a lot of places but haven''t found a suitablesolutions yet, so I''m asking here in hope that someone has experiencewith that topic. 您排除了哪些解决方案?Which solutions did you rule out? Kay Schluehr写道:Kay Schluehr wrote: 7月15日,11:51,Thomas Troeger< thomas.troeger .... @ siemens.com> 写道:On 15 Jul., 11:51, Thomas Troeger <[email protected]>wrote: >我真的看过很多地方但还没有找到合适的解决方案,所以我在这里问我希望有人有经验与该主题。>I''ve really looked at a lot of places but haven''t found a suitablesolutions yet, so I''m asking here in hope that someone has experiencewith that topic. 您排除了哪些解决方案?Which solutions did you rule out? - Python + Qt,因为它对我的计划来说肯定有点过分。我只需要需要简单的图形和一些声音,没有小部件。基本上我正在寻找 的东西非常轻量级,有绘制图形的方法 基元和渲染字体 - 没有复杂的小部件,窗口, 滚动条等。而且,例如,Qt库是一个真正的 重量级,约有。单独为qt-3.3.8 10 MB。 - cairo / pango也一样,我写了一个测试程序(在C中,我是 必须说)有10个库的动态链接,大小都是250kb 。这对于一个小型嵌入式设备来说非常重要。 我想要一个解决方案,一共不超过10MB,并且口译员 如果包含所有模块,则为60 MB。我无法想象没有人在这之前遇到过这个问题吗?我正试图不再发明这个问题:^)- Python + Qt, because it''s definitely overkill for my plans. I onlyneed simple graphics and some sound, no widgets. Basically I''m lookingfor something really lightweight that has methods for drawing graphicprimitives and renders fonts -- no complicated widgets, windows,scrollbars and the like. And, for example, the Qt library is a realheavyweight with approx. 10 MB for qt-3.3.8 alone.- The same holds for cairo/pango, I''ve written a test program (in C, Imust say) that has dynamic links to 10 libraries that are all like 250kbin size. That''s a lot for a small embedded device.I''d like a solution that''s not over 10MB altogether, and the interpretercomes at a 60 MB if all modules are included. I can''t imagine noone hashad this problem before... and I''m trying to not invent the wheel again :^) 7月15日12:14,Thomas Troeger< thomas.troeger .... @ siemens.com> 写道:On 15 Jul., 12:14, Thomas Troeger <[email protected]>wrote: Kay Schluehr写道:Kay Schluehr wrote: 7月15日,11:51,Thomas Troeger< thomas.troeger .... @ siemens.com> 写道: On 15 Jul., 11:51, Thomas Troeger <[email protected]> wrote: 我真的看了很多地方但是避风港还没找到合适的 解决方案,所以我在这里要求希望有人有这个主题的经验 。I''ve really looked at a lot of places but haven''t found a suitablesolutions yet, so I''m asking here in hope that someone has experiencewith that topic. 您排除了哪些解决方案? Which solutions did you rule out? - Python + Qt,因为它对我的计划来说肯定有点过分。我只需要需要简单的图形和一些声音,没有小部件。基本上我正在寻找 的东西非常轻量级,有绘制图形的方法 基元和渲染字体 - 没有复杂的小部件,窗口, 滚动条等。而且,例如,Qt库是一个真正的 重量级,约有。单独为qt-3.3.8 10 MB。 - cairo / pango也一样,我写了一个测试程序(在C中,我是 必须说)有10个库的动态链接,大小都是250kb 。这对于小型嵌入式设备来说非常重要。- Python + Qt, because it''s definitely overkill for my plans. I onlyneed simple graphics and some sound, no widgets. Basically I''m lookingfor something really lightweight that has methods for drawing graphicprimitives and renders fonts -- no complicated widgets, windows,scrollbars and the like. And, for example, the Qt library is a realheavyweight with approx. 10 MB for qt-3.3.8 alone.- The same holds for cairo/pango, I''ve written a test program (in C, Imust say) that has dynamic links to 10 libraries that are all like 250kbin size. That''s a lot for a small embedded device. 你试过pygame吗?我认为它的占地面积很小。 问候,UweDid you try pygame ? I think it has a small footprint.Greetings, Uwe 这篇关于Python嵌入问题。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 09-05 11:01