# Package Maker
- [Aral Balkan · How to make standalone OS X application bundles from PyQt apps using py2app](http://aralbalkan.com/1675)
- [Building Mac OS X applications with py2app](http://www.rkblog.rk.edu.pl/w/p/building-mac-os-x-applications-py2app/)
- [Hatchet: hack frozen PySide apps down to size](http://www.rfk.id.au/blog/entry/hatchet-hack-frozen-pyside-apps/), Feb 2011
- [How do I create a nice-looking DMG for Mac OS X using command-line tools?](http://stackoverflow.com/questions/96882/how-do-i-create-a-nice-looking-dmg-for-mac-os-x-using-command-line-tools/97025#97025)
- [Problem using py2app with the lxml package](http://stackoverflow.com/questions/868510/problem-using-py2app-with-the-lxml-package)
TODO:
- simple pyside
- multiple packages/modules (third part/yours)
- non-script resources, suck as icon, image, xml etc
## py2app bugs
./dist/your_app_name.app/Contents/MacOS/your_app_name
crash log
Qt internal error: qt_menu.nib could not be loaded. The .nib file should be placed in QtGui.framework/Versions/Current/Resources/ or in the resources directory of your application bundle.
Abort trap
solution
build package with [py2app_setup.py](https://gist.github.com/1378312)
crash log
On Mac OS X, you might be loading two sets of Qt binaries into the same process. Check that all plugins are compiled against the right Qt binaries. Export DYLD_PRINT_LIBRARIES=1 and check that only one set of binaries are being loaded.
Segmentation fault
solution
sudo mv /opt/local/lib/libQtGui.4.dylib ./
problem:
loading two sets of Qt binaries
solution:
create a empty qt.conf file
http://www.thetoryparty.com/2009/08/27/pyqt-and-py2app-seriously-i-dont-know-what-to-do-with-you-when-youre-like-this/
problem:
load and render image failed
solution:
use PIL and convert image into png
http://www.thetoryparty.com/2009/08/27/pyqt-and-py2app-seriously-i-dont-know-what-to-do-with-you-when-youre-like-this/
## py2exe bugs
### __file__ not defined
NameError: global name '__file__' is not defined
- http://www.py2exe.org/index.cgi/WhereAmI
- http://stackoverflow.com/questions/595305/python-path-of-script
- http://stackoverflow.com/questions/247770/retrieving-python-module-path
__file__ doesn't works in package build by py2exe.
solution:
def we_are_frozen():
"""Returns whether we are frozen via py2exe.
This will affect how we find out where we are located."""
return hasattr(sys, "frozen")
def module_path():
""" This will get us the program's directory,
even if we are frozen using py2exe"""
if we_are_frozen():
return os.path.dirname(unicode(sys.executable, sys.getfilesystemencoding( )))
return os.path.dirname(unicode(__file__, sys.getfilesystemencoding( )))
#PWD = os.path.dirname(os.path.realpath(__file__))
PWD = module_path()
### ImportError exception
ImportError: No module named gzip
ImportError: No module named dom
缺少什么模块,在 options -> py2exe -> includes 里添加什么模块。
options = {
"py2exe": {
"includes": ["PyQt4", "sip", "gzip", "xml.dom.minidom"],
- http://www.py2exe.org/index.cgi/Py2exeAndPyQt
没有合适的资源?快使用搜索试试~ 我知道了~
Qt-Python-Binding-Examples-master.zip_pyqt_python qt_python_qt_b
共181个文件
py:123个
png:30个
md:12个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 89 浏览量
2022-09-20
23:41:26
上传
评论
收藏 675KB ZIP 举报
温馨提示
python QT binding library
资源推荐
资源详情
资源评论
收起资源包目录
Qt-Python-Binding-Examples-master.zip_pyqt_python qt_python_qt_b (181个子文件)
.gitignore 152B
gui.ico 19KB
captcha.jpg 1KB
jquery-2.1.1.min.js 82KB
LICENSE 1KB
notes-on-qt-on-mac.md 4KB
readme.md 3KB
qt-designer.md 2KB
README.md 1KB
some_existing_applications.md 734B
notes_on_resources.md 731B
readme.md 346B
README.md 286B
readme.md 248B
README.md 246B
README.md 58B
README.md 45B
quit-in-alive-threads-python-not-responding-20111123.png 193KB
java.png 35KB
java.png 35KB
ruby.png 22KB
lisp.png 19KB
lisp.png 19KB
qt-logo.png 17KB
qt-logo.png 17KB
python.png 10KB
python.png 10KB
objc.png 10KB
objc.png 10KB
FreeBSD.png 10KB
FreeBSD.png 10KB
Plan 9.png 9KB
Plan 9.png 9KB
csharp.png 7KB
Mac.png 6KB
Mac.png 6KB
offline-50x50.png 5KB
online-50x50.png 5KB
c.png 5KB
c.png 5KB
javascript.png 4KB
Ubuntu.png 4KB
Ubuntu.png 4KB
mic-64x64.png 3KB
camera.png 2KB
perl.png 2KB
exit.png 1KB
tetris.py 11KB
qwinutils.py 10KB
auto_create_qrc.py 6KB
badge_button.py 6KB
tab.py 6KB
simple_contact_list.py 6KB
tree-in-model-view.py 5KB
tray.py 5KB
setup.py 5KB
setup.py 5KB
listview_with_bugs.py 5KB
dnd_file_into_app_complex.py 5KB
brower_with_inspector.py 5KB
listview_with_dnd.py 5KB
brower_eval_custom_js.py 5KB
get_dropped_item_modelindex_in_listview.py 4KB
tray_catch_cmd_q.py 4KB
brower.py 4KB
contact_locator.py 4KB
listview.py 4KB
simple_listview_with_icon_filter.py 3KB
custom_simple_dialog_ii.py 3KB
im_sign_in_window.py 3KB
auto_save_win_geometry.py 3KB
textedit.py 3KB
copy_txt_of_btn_between_wins_in_dnd.py 3KB
auto_set_secondary_window_geometry.py 3KB
custom_simple_dialog.py 3KB
simple_listview_with_icon.py 2KB
export_txt_of_btn_in_dnd.py 2KB
copy_txt_of_btn_in_dnd.py 2KB
markdown_editor.py 2KB
auto_config_geo_for_multiple_wins_app.py 2KB
find_item_by_typing.py 2KB
custom_combobox_item.py 2KB
auto_adjust_size_to_fit_img.py 2KB
popup_menu_by_right_click.py 2KB
custom_right_click_popup_menu.py 2KB
add_group.py 2KB
get_file_dialog.py 2KB
get_font_dialog.py 2KB
editable_listview.py 2KB
display_png_file_with_grayscale.py 2KB
toolbar.py 2KB
popup_menu_in_treeview.py 2KB
build_in_dialogs.py 2KB
drawing_brush.py 2KB
get_color_dialog.py 2KB
switching_multiple wins_in_im.py 2KB
use_buildin_icon.py 2KB
move_btn_in_dnd.py 2KB
notify_primary_win_while_sheet_win_has_closed.py 1KB
label.py 1KB
共 181 条
- 1
- 2
资源评论
weixin_42653672
- 粉丝: 93
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功