python程序发布工具没开发完共享一下先

链接:https://pan.baidu.com/s/1LMlnTI7qwzBd1Bl54VosLA 
提取码:2d9d

6月10日上传。

这个工具的主要作用是运行/发布python程序,还很不完善,后面我会不断增加功能。

1、各种支持库需要自己安装。例如安装pandas:

命令行,进入dlls文件夹,运行:

python -m pip install pandas

2、发布python程序:

新建一个python项目,然后列表选中它,单击右键,发布。

这个操作会修改setup.ini的配置:dist=1

要回到开发模式,需要手工修改:dist=0

3、生成可视界面的控件需要输入代码。例如:

'''
Created by catpy.
2020/6/9 16:42:09
'''

split1ss = '###[name:split1,type:splitter,width:5,align:alleft]###'

panel1rr = '###[name:panel1,type:panel,width:390,align:alleft,left:1,]###'

strpanel2 = '###[name:panel2,type:panel,align:alclient,]###'
print(strpanel2)

sssedit1 = '###[name:edit1,type:edit,parent:panel1,label:美国政治国家和资本权力先打起来了,text:aaa,width:200,top:40,left:140,]###'

button1aaa = '###[name:button1,type:button,click:test1(),parent:panel1,caption:按钮1,left:20,top:150,width:60,height:20,align:alcustom,]###'
button2aaa = '###[name:button2,type:button,click:test2(),parent:panel1,caption:按钮2,left:20,top:180,width:70,height:20,align:alcustom,]###'

memo1aaa = '###[name:memo1,type:memo,parent:panel1,left:20,top:220,width:370,height:100,lines:memo测试1,scrollbars:ssAutoBoth,]###'
memo2aaa = '###[name:memo2,type:memo,parent:panel1,left:20,top:350,width:370,height:100,lines:memo测试2,scrollbars:ssAutoBoth,]###'

lblaaa = '###[name:label1,type:label,size:19,parent:panel1,color:$008CFF,left:20,top:460,width:250,height:100,caption:label测试1111]###'

def test1():
    print("###memo1###","the test1 is selected!台海军事斗争新形势。")

def test2():
    print("###memo2###","the test2 is selected! 超级油轮的好时候来了?")





点击可视化测试一下:

此时点击按钮1和按钮2没反应,需要点击运行。

再点击按钮1和按钮2试试:

然后发布它。

4、运行发布的应用。

直接运行catpy.exe。

修改记录:

20200610:

    增加了对listbox的支持;

    增加了image控件支持;

    加密 python 代码后发布。

猜你喜欢

转载自blog.csdn.net/bq_cui/article/details/106645665