如果您对使用pypubsub&wxpython在Windows之间传输数据获取TypeError:和python传输文件感兴趣,那么这篇文章一定是您不可错过的。我们将详细讲解使用pypubsub&wx
如果您对使用 pypubsub & wxpython 在 Windows 之间传输数据获取 TypeError:和python 传输文件感兴趣,那么这篇文章一定是您不可错过的。我们将详细讲解使用 pypubsub & wxpython 在 Windows 之间传输数据获取 TypeError:的各种细节,并对python 传输文件进行深入的分析,此外还有关于46-wxpython 4 使用 grid 展示表格、Deepin Linux Python3 wxpython 的安装、Eclipse 开发 wxpython import wx 后出现红叉、How to install python, wxPython and ride on CENTOS的实用技巧。
本文目录一览:- 使用 pypubsub & wxpython 在 Windows 之间传输数据获取 TypeError:(python 传输文件)
- 46-wxpython 4 使用 grid 展示表格
- Deepin Linux Python3 wxpython 的安装
- Eclipse 开发 wxpython import wx 后出现红叉
- How to install python, wxPython and ride on CENTOS
使用 pypubsub & wxpython 在 Windows 之间传输数据获取 TypeError:(python 传输文件)
如何解决使用 pypubsub & wxpython 在 Windows 之间传输数据获取 TypeError:
我正在尝试使用 PyPubSub 在两个 wxpython 窗口之间传递数据。下面我将代码缩减为基础知识。当我在主窗口的 textcntrl 中填写数据并点击按钮将其传递到第二个窗口(CoordFrame)时我得到了什么我收到以下错误-
TypeError: sendMessage() 需要 2 个位置参数,但给出了 3 个
我能找到的每个例子都显示在 pub.sendMessage 中传递两个参数;这就是我认为我正在做的事情。传递的第三个参数是什么,它从哪里形成以及如何停止它?我尝试了各种参数组合和数据类型,包括二进制。
''''''
from pubsub import pub
import wx
class MainFrame (wx.Frame):
def __init__(self,parent,title):
super(MainFrame,self).__init__(parent,title = title,size = (200,200))
self.panel = MainPanel(self)
class CoordFrame (wx.Frame):
def __init__(self,title):
super(CoordFrame,200))
self.panel = CoordPanel(self)
class MainPanel(wx.Panel):
def __init__(self,parent):
super(MainPanel,self).__init__(parent)
vsizer = wx.BoxSizer(wx.VERTICAL)
self.tbxNewMap = wx.TextCtrl(self,id=1001,pos=(20,20),size = (50,style = wx.TE_CENTER|wx.TE_NOHIDESEL|wx.TE_PROCESS_ENTER)
vsizer.Add(self.tbxNewMap)
self.btnEnterNewMap = wx.Button(self,id=1002,label = "New Data",pos = (20,80),size = (80,40))
vsizer.Add(self.btnEnterNewMap,wx.EXPAND)
self.Bind(wx.EVT_BUTTON,self.onButtonNewMap,id=1002)
def onButtonNewMap(self,event):
temp = self.tbxNewMap.GetValue()
pub.sendMessage("coord_listener",temp)
coordframe = CoordFrame(None,"Entry")
coordframe.Show()
class CoordPanel(wx.Panel):
def __init__(self,parent):
super(CoordPanel,self).__init__(parent)
vsizer = wx.BoxSizer(wx.VERTICAL)
pub.subscribe(self.coord_listener,"coord_listener")
self.tbxNewMapNumber = wx.TextCtrl(self,id=1000,style = wx.TE_CENTER|wx.TE_NOHIDESEL|wx.TE_PROCESS_ENTER)
vsizer.Add(self.tbxNewMapNumber)
def coord_listener(self,message):
newmapnum = message
self.tbxNewMapNumber.SetValue(newmapnum)
self.tbxNewMapNumber.Refresh()
class GMDash(wx.App):
def OnInit(self):
self.mainframe = MainFrame(parent = None,title = "Dashboard")
self.mainframe.Show()
return True
app = GMDash()
app.MainLoop()
''''''
解决方法
在对 sendmessage
的调用中使用命名参数,您需要注册发送消息的侦听器 before
,而不是像您目前所做的那样。
见下文:
from pubsub import pub
import wx
class MainFrame (wx.Frame):
def __init__(self,parent,title):
super(MainFrame,self).__init__(parent,title = title,size = (200,200))
self.panel = MainPanel(self)
class CoordFrame (wx.Frame):
def __init__(self,title):
super(CoordFrame,200))
self.panel = CoordPanel(self)
class MainPanel(wx.Panel):
def __init__(self,parent):
super(MainPanel,self).__init__(parent)
vsizer = wx.BoxSizer(wx.VERTICAL)
self.tbxNewMap = wx.TextCtrl(self,id=1001,pos=(20,20),size = (50,style = wx.TE_CENTER|wx.TE_NOHIDESEL|wx.TE_PROCESS_ENTER)
vsizer.Add(self.tbxNewMap)
self.btnEnterNewMap = wx.Button(self,id=1002,label = "New Data",pos = (20,80),size = (80,40))
vsizer.Add(self.btnEnterNewMap,wx.EXPAND)
self.Bind(wx.EVT_BUTTON,self.onButtonNewMap,id=1002)
#Register the subscrption *before* sending the message
self.coordframe = CoordFrame(None,"Entry")
def onButtonNewMap(self,event):
temp = self.tbxNewMap.GetValue()
pub.sendMessage("coord_listener",message=temp)
#coordframe = CoordFrame(None,"Entry")
self.coordframe.Show()
class CoordPanel(wx.Panel):
def __init__(self,parent):
super(CoordPanel,self).__init__(parent)
vsizer = wx.BoxSizer(wx.VERTICAL)
pub.subscribe(self.coord_listener,"coord_listener")
self.tbxNewMapNumber = wx.TextCtrl(self,id=1000,style = wx.TE_CENTER|wx.TE_NOHIDESEL|wx.TE_PROCESS_ENTER)
vsizer.Add(self.tbxNewMapNumber)
def coord_listener(self,message):
print(message)
newmapnum = message
self.tbxNewMapNumber.SetValue(newmapnum)
self.tbxNewMapNumber.Refresh()
class GMDash(wx.App):
def OnInit(self):
self.mainframe = MainFrame(parent = None,title = "Dashboard")
self.mainframe.Show()
return True
app = GMDash()
app.MainLoop()
46-wxpython 4 使用 grid 展示表格
转载:https://blog.csdn.net/soslinken/article/details/79024938#%E4%BD%BF%E7%94%A8%E6%A0%B7%E4%BE%8B
wxpython 4 使用 grid 展示表格
文章导航
- wxgridGrid
- 使用样例
- CreateGrid 方法
- SetCellValue 方法
- SetRowLabelValue SetColLabelValue
- 事件
- 疑问
wx.grid.Grid
Grid这个控件主要是用于显示和编辑表格数据。
控件样式在OS X 系统下显示样式
使用样例
import wx
import wx.grid
class GridFrame(wx.Frame):
def __init__(self, parent):
wx.Frame.__init__(self, parent)
# Create a wxGrid object
grid = wx.grid.Grid(self, -1)
# Then we call CreateGrid to set the dimensions of the grid
# (100 rows and 10 columns in this example)
grid.CreateGrid(100, 10)
# We can set the sizes of individual rows and columns
# in pixels
grid.SetRowSize(0, 60)
grid.SetColSize(0, 120)
# And set grid cell contents as strings
grid.SetCellValue(0, 0, ''wxGrid is good'')
# We can specify that some cells are read.only
grid.SetCellValue(0, 3, ''This is read.only'')
grid.SetReadOnly(0, 3)
# Colours can be specified for grid cell contents
grid.SetCellValue(3, 3, ''green on grey'')
grid.SetCellTextColour(3, 3, wx.GREEN)
grid.SetCellBackgroundColour(3, 3, wx.LIGHT_GREY)
# We can specify the some cells will store numeric
# values rather than strings. Here we set grid column 5
# to hold floating point values displayed with width of 6
# and precision of 2
grid.SetColFormatFloat(5, 6, 2)
grid.SetCellValue(0, 6, ''3.1415'')
self.Show()
if __name__ == ''__main__'':
app = wx.App(0)
frame = GridFrame(None)
app.MainLoop()
这个demo 是从官方文档中摘取的
英语好的亲们 ,直接看代码上的注释就好了,在此只把一些关键方法提出来说明一下。
CreateGrid 方法
可以使用该方法初始化一个固定行数、列数的Grid界面。行列数创建后仍可以使用方法增加行列。
grid.CreateGrid(100, 10)
- 1
SetCellValue 方法
可以使用SetCellValue 将指定行列的单元格内的值进行设置。
grid.SetCellValue(0, 0, ''wxGrid is good'')
- 1
SetRowLabelValue 、 SetColLabelValue
可以用于改变行标签、列标签。样例界面中,行标签 1、2、3等, 列标签A、B、C等。
SetRowLabelValue第一个参数代表的是当前第几行
SetColLabelValue第一个参数代表的是当前第几列
grid.SetRowLabelValue(0,"1") //第一行标签 1
grid.SetColLabelValue(0,"A") //第一列标签 A
- 1
- 2
以上几个方法就可以做一个简单的数据展示grid了!
事件
关于grid有几个关键的事件说明一下
事件 | 说明 |
---|---|
EVT_GRID_CELL_CHANGING | 单元格内数据发生变化中 |
EVT_GRID_CELL_CHANGED | 单元格内数据发生变化后 |
EVT_GRID_CELL_LEFT_CLICK | 左键单击单元格 |
EVT_GRID_CELL_LEFT_DCLICK | 左键双击单元格 |
EVT_GRID_CELL_RIGHT_CLICK | 右键单击单元格 |
EVT_GRID_CELL_RIGHT_DCLICK | 右键双击单元格 |
EVT_GRID_SELECT_CELL | 选中单元格事件 |
绑定事件代码
self.Bind(wx.EVT_GRID_CELL_CHANGED,self.cellChanged,self.grid)
- 1
第一个参数:事件
第二个参数:响应方法
第三个参数:事件对象
响应方法需要特别提示一下:
方法必须有一个event 参数 不然无法响应。
def cellChanged(self , event) :
//todo write event response code
- 1
- 2
疑问
在文档中,有个说明,就是在大型数据展示的时候,可以使用setTable(),方法设置一个wx.grid.GridTableBase的自定义子类。这样就可以做到数据与界面逻辑分离。
但是我写了一个GridTableBase的子类,setTable后并没有什么反应。不知道是怎么回事。只能是使用setCellValue 方法 循环将数据放置在grid上。
有大牛知道这个东西在 wxPython 4 中怎么使用吗。可以给小弟一个demo参考一下吗?
Deepin Linux Python3 wxpython 的安装
在 Deepin Linux 下 pip3 install wxpython 后,安装编译报错。
经过搜索后发现需要用 Linux 的包管理器安装,输入如下命令,问题解决
sudo apt install python3-wxgtk4.0
Eclipse 开发 wxpython import wx 后出现红叉
使用 eclipse+Pydev 作为 wxpython 的开发环境时,经常出现 import wx,没有问题,但是使用 wx 模块里面的内容就会出现各种红叉,但是程序运行没有问题,这种问题肯定是 wx 路径的问题,在 Libraries 里面把 wx 的具体路径再添加上,虽然其父路径已经添加,然后 apply 一下,这种情况似乎消失,程序运行没有问题,之后再去了刚才的 wx 的具体路径之前的报错现象也没有了。
2. 现在没有红叉了 但是运行时会提示找不到模块:
Traceback (most recent call last):
File "D:\pywork\mypython\wx\wxexample.py", line 16, in <module>
class sayHello(wx.App):
AttributeError: ''module'' object has no attribute ''App''
这个原因是因为当前 D:\pywork\mypython\ 的路径没有加入 pythonpath 有两种方法可以解决
第一种:新建 python 项目,选择把 src 加入 path, 这时在这个项目下的 wxpython 就不会报错了
第二种方法,在把原有项目的 src 加入 python path 下
How to install python, wxPython and ride on CENTOS
0. empty $ROBOTREPO/PACKAGES directory
# rm -rf /repo/root/robot/PACKAGES
# mkdir /repo/root/robot/PACKAGES
1. Install gcc,g++,gtk2-devel,libSM-devel,gstreamer*
# yum -y install gcc
# yum -y install gcc-c++
# yum install gtk2-devel
# yum install libSM-devel
# yum install gstreamer*
//for install python2.7 to support sqlite3
# yum install sqlite-devel
//for ride error ''robot.libraries.Dialogs'' failed: ImportError: No module named tkinter
# yum install tcl-devel tk-devel tkinter
//for install mercurail
# yum install bzip2 bzip2-devel bzip2-libs
2. Install Python-2.7.11
# tar -xvf Python-2.7.11.tgz
# cd Python-2.7.11
//for dynamic
# ./configure --prefix=/repo/root/robot/PACKAGES --enable-shared
//for static (not success)
# ./configure --disable-shared LDFLAGS="-static -static-libgcc" CPPFLAGS="-static"
# ./configure LDFLAGS="-static -static-libgcc" CPPFLAGS="-static" --prefix=/repo/root/robot/PACKAGES --enable-shared
//for make and install
# make && make install
# check if installed successfully
# ls -l /repo/root/robot/PACKAGES/lib/python2.7/lib-dynload/Python-2.7.11-py2.7.egg-info
-rw-r--r-- 1 root root 1525 May 24 02:45 /repo/root/robot/PACKAGES/lib/python2.7/lib-dynload/Python-2.7.11-py2.7.egg-info
//NOTES:
如果后面运行ride过程中,发现python有些module没有安装,可以用yum重新安装此module,然后再编译安装python2.7.
wxPython,robotframework-3.0和robotframework-ride-1.5.2不需要再重新编译安装。
//例如遇错:ride.py: ImportError: No module named tkinter
//解决方法:
# yum install tkinter
# cd Python-2.7.11
# ./configure --prefix=/repo/root/robot/PACKAGES --enable-shared
# make && make install
3. install wxWidgets-2.8.12
http://wxwidgets.org/downloads/
# tar -xvf wxWidgets-2.8.12.tar.gz
# cd wxWidgets-2.8.12
# mkdir bld
# cd bld
# ../configure --prefix=/repo/root/robot/PACKAGES/lib/python2.7/site-packages/wx-2.8-gtk2-unicode --with-gtk --with-gnomeprint --with-opengl --enable-debug --enable-geometry --enable-graphics_ctx --enable-sound --with-sdl --enable-mediactrl --enable-display --disable-debugreport --enable-unicode --with-libjpeg=builtin --with-libpng=builtin --with-libtiff=builtin --with-zlib=builtin
touch .make (编辑.make,写入下面三行)
make $*
make -C contrib/src/gizmos $*
make -C contrib/src/stc $*
# chmod +x .make
# ./.make clean
# ./.make
# ./.make install
4. install wxPython-2.8.12.1 (should install wxWidgets firstly )
# tar -xvf wxPython-src-2.8.12.1.tar.bz2
# cd wxPython-src-2.8.12.1
# cd wxPython
# /repo/root/robot/PACKAGES/bin/python setup.py build_ext --inplace --debug WX_CONFIG=/repo/root/robot/PACKAGES/lib/python2.7/site-packages/wx-2.8-gtk2-unicode/bin/wx-config BUILD_GLCANVAS=0
# export ROBOTREPO=/repo/root/robot
# source /repo/root/robot/.robot.profile
# export LD_LIBRARY_PATH=/repo/root/robot/PACKAGES/lib/
# /repo/root/robot/PACKAGES/bin/python2.7 setup.py build
# /repo/root/robot/PACKAGES/bin/python2.7 setup.py install
//NOTES:
UILD_GLCANVAS=0,这个很关键哦,开始出现一大堆编译错误都是因为它。后来看见文档中,
If you get errors about being unable to find libGLU, wxGLCanvas being undeclared, or something similar then you can add BUILD_GLCANVAS=0 to the setup.py command line to disable the building of the glcanvas module.豁然开朗
WX_CONFIG=$opt/wx/2.8/bin/wx-config 中的路径为wxWidgets configure时设置的路径
//check if wxPython has been installed successfully:
# export LD_LIBRARY_PATH=/repo/root/robot/PACKAGES/lib/python2.7/site-packages/wx-2.8-gtk2-unicode/lib
# ls -l /repo/root/robot/PACKAGES/lib/python2.7/site-packages/wxPython_common-2.8.12.1-py2.7.egg-info
-rw-r--r-- 1 root root 1281 May 24 03:27 /repo/root/robot/PACKAGES/lib/python2.7/site-packages/wxPython_common-2.8.12.1-py2.7.egg-info
# /repo/root/robot/PACKAGES/bin/python
>>> import wx
>>> wx.version()
''2.8.12.1 (gtk2-unicode)''
如果执行到这一步,还是报错:
wxPython not found.
You need to install wxPython 2.8.12.1 or 3.0.2 or newer with unicode support to run RIDE. wxPython can be downloaded from http://sourceforge.net/projects/wxpython/files/wxPython/
则检查PYTHONPATH,只用/repo/TEST_PACKAGES或者/repo/atxuser/robot/PACKAGE中的一个,不能两个都写!!
export PYTHONPATH=/repo/TEST_PACKAGES/robot/PACKAGES/lib/python2.7:/repo/TEST_PACKAGES/robot/PACKAGES/lib/python2.7/site-packages
5. install robotframework-3.0
# export LD_LIBRARY_PATH=/repo/root/robot/PACKAGES/lib/
# cd robotframework-3.0
# /repo/root/robot/PACKAGES/bin/python setup.py install --prefix=/repo/root/robot/PACKAGES/
# check if it has been installed successfully
# ls -l /repo/root/robot/PACKAGES//lib/python2.7/site-packages/robotframework-3.0-py2.7.egg-info
6. install robotframework-ride-1.5.2
# cd robotframework-ride-1.5.2
# /repo/root/robot/PACKAGES/bin/python setup.py install --prefix=/repo/root/robot/PACKAGES/
# check if it has been installed successfully
# ls -l /repo/root/robot/PACKAGES//lib/python2.7/site-packages/robotframework_ride-1.5.2-py2.7.egg-info
7. set correct python path in the following files
//modify the following python path to "/usr/bin/env python"
#!/usr/bin/env python
# grep -r "robot" * | grep repo | grep root
PACKAGES/bin/2to3:#!/repo/root/robot.up/PACKAGES/bin/python2.7
PACKAGES/bin/pydoc:#!/repo/root/robot.up/PACKAGES/bin/python2.7
PACKAGES/bin/python-config:#!/repo/root/robot.up/PACKAGES/bin/python2.7
PACKAGES/bin/img2py:#!/repo/root/robot.up/PACKAGES/bin/python2.7
PACKAGES/bin/pybot:#!/repo/root/robot.up/PACKAGES/bin/python
PACKAGES/bin/python2-config:#!/repo/root/robot.up/PACKAGES/bin/python2.7
PACKAGES/bin/xrced:#!/repo/root/robot.up/PACKAGES/bin/python2.7
PACKAGES/bin/editra:#!/repo/root/robot.up/PACKAGES/bin/python2.7
PACKAGES/bin/smtpd.py:#!/repo/root/robot.up/PACKAGES/bin/python2.7
PACKAGES/bin/pywxrc:#!/repo/root/robot.up/PACKAGES/bin/python2.7
PACKAGES/bin/pyalamode:#!/repo/root/robot.up/PACKAGES/bin/python2.7
PACKAGES/bin/pyshell:#!/repo/root/robot.up/PACKAGES/bin/python2.7
PACKAGES/bin/ride.py:#!/repo/root/robot.up/PACKAGES/bin/python
PACKAGES/bin/python2.7-config:#!/repo/root/robot.up/PACKAGES/bin/python2.7
PACKAGES/bin/idle:#!/repo/root/robot.up/PACKAGES/bin/python2.7
PACKAGES/bin/img2xpm:#!/repo/root/robot.up/PACKAGES/bin/python2.7
PACKAGES/bin/pyalacarte:#!/repo/root/robot.up/PACKAGES/bin/python2.7
PACKAGES/bin/pywrap:#!/repo/root/robot.up/PACKAGES/bin/python2.7
PACKAGES/bin/rebot:#!/repo/root/robot/PACKAGES/bin/python
PACKAGES/bin/img2png:#!/repo/root/robot.up/PACKAGES/bin/python2.7
PACKAGES/bin/helpviewer:#!/repo/root/robot.up/PACKAGES/bin/python2.7
PACKAGES/bin/pycrust:#!/repo/root/robot.up/PACKAGES/bin/python2.7
PACKAGES/bin/robot:#!/repo/root/robot/PACKAGES/bin/python
8. install these python libraries under site-packages directory.
//install the following python libraries under site-packages directory
//getting the following packages from >>>> https://pypi.python.org/pypi <<<<<
//a sample to install pycrypto-2.6.1
# tar -xvf pycrypto-2.6.1.tar.gz
# cd pycrypto-2.6.1
# export LD_LIBRARY_PATH=/repo/root/robot/PACKAGES/lib/
# /repo/root/robot/PACKAGES/bin/python setup.py install --prefix=/repo/root/robot/PACKAGES
# ls -l /repo/root/robot/PACKAGES/lib/python2.7/site-packages/Crypto/
# ls -l /repo/root/robot/PACKAGES/lib/python2.7/site-packages/pycrypto-2.6.1-py2.7.egg-info
//another sample to install package
# export ROBOTREPO=/repo/root/robot
# source /repo/root/robot/.robot.profile
# cd package_xxx_xxx
# python setup.py install --prefix=/repo/TEST_PACKAGES/robot/PACKAGES
1 ply-3.6
pysmi-0.0.6
pysnmp-4.3.0
pyasn1-0.1.9
2 numpy-1.9.3
3 ecdsa-0.13
4 pycrypto-2.6.1
paramiko-1.15.2
5 Imaging-1.1.7 (get from http://pythonware.com/products/pil/)
6 pexpect-3.3
7 simplejson-3.8.0
8 mercurial
9 yum install libxml2 libxml2-devel libxslt libxslt-devel
lxml-3.5.0
>>>>adding by Ahbijit requirement:
1. alabaster 0.7.9
2. pytz-2016.6.1.tar.gz
3. Babel-2.3.4.tar.gz
4. pycparser-2.14.tar.gz
5.
yum install libffi-devel
cffi-1.7.0.tar.gz
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DUSE__THREAD -I/usr/lib/libffi-3.0.5/include -I/repo/TEST_PACKAGES/robot/PACKAGES/include/python2.7 -c c/_cffi_backend.c -o build/temp.linux-i686-2.7/c/_cffi_backend.o
gcc -pthread -shared build/temp.linux-i686-2.7/c/_cffi_backend.o -L/repo/root/TEST_PACKAGES/robot/PACKAGES/lib -lffi -lpython2.7 -o build/lib.linux-i686-2.7/_cffi_backend.so
/usr/bin/ld: cannot find -lpython2.7
collect2: ld returned 1 exit status
error: command ''gcc'' failed with exit status 1
>>>>pay attention to wrong path"-L/repo/root/TEST_PACKAGES/robot/PACKAGES/lib", correct it in all configure file.
grep -r "repo" * | grep root | grep TEST_PACKAGES
6. idna-2.1.tar.gz
7. enum34-1.1.6.zip
8. ipaddress-1.0.16.tar.gz (md5)
9. six-1.10.0.tar.gz (md5)
10. cryptography-1.5.tar.gz (md5, pgp)
11. docutils-0.12.tar.gz (md5)
12. futures-3.0.5.tar.gz (md5)
13. imagesize 0.7.1
14. py2-ipaddress 3.4.1
15. MarkupSafe 0.23
16. Jinja2 2.8
17. Logbook 1.0.0
18. ptyprocess 0.5.1
19. py 1.4.31
20. pycrypto 2.6.1
21. Pygments 2.1.3
22. trollius 2.1
23. pyshark 0.3.6.1
>>>modify setup.py
From:
install_requires=[''lxml'', ''py'', ''trollius==1.0.4'', ''logbook''],
To:
install_requires=[''lxml'', ''py'', ''trollius==2.1'', ''logbook''],
24. snowballstemmer 1.2.1
25. Sphinx 1.4.6
26. subprocess32 3.2.7
27. wheel 0.29.0
28. yolk 0.4.3
29. pytest 3.0.1
30. requests 2.11.1
31. scapy 2.3.2
32. xmltodict 0.10.2
//cp the following directory from old robot REPO site-packages path
# cp -r ncclient/ /repo/root/robot.up/PACKAGES/lib/python2.7/site-packages
The following is the result of checking import total 40 required packages:
# python
Python 2.7.11 (default, Jun 28 2016, 10:29:51)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import alabaster
>>> import pytz
>>> import babel
>>> >>> import pycparser
>>> import cffi
>>> import pyasn1
>>> import idna
>>> from enum import Enum
>>> import ipaddress
>>> >>> import six
>>> import cryptography
>>> >>> import docutils
>>> from concurrent import futures
>>> >>> >>> import imagesize
>>> >>> import ipaddress
>>> from markupsafe import Markup
>>> import jinja2
>>> import logbook
>>> import lxml
>>> import paramiko
>>> import ptyprocess
>>> import pexpect
>>> import ply
>>> import py
>>> from Crypto.Hash import SHA256
>>> import pygments
>>> import trollius
>>> import pyshark
>>> import pysmi
>>> import pysnmp
>>> from robotide import main
>>> import snowballstemmer
>>> import sphinx
>>> import subprocess32
>>> import wheel
>>> import yolk
>>> import pytest
>>> import requests
>>> import scapy
>>> import xmltodict
>>>
9. copy all lib files *.so.* from old repo PACKAGE/lib directory
cp /repo/root/robot/PACKAGES/lib/libclearlooks.so ./
cp /repo/root/robot/PACKAGES/lib/libcrux-engine.so ./
cp /repo/root/robot/PACKAGES/lib/libexpat.so.0 ./
cp /repo/root/robot/PACKAGES/lib/libglide.so ./
cp /repo/root/robot/PACKAGES/lib/libhcengine.so ./
cp /repo/root/robot/PACKAGES/lib/libindustrial.so ./
cp /repo/root/robot/PACKAGES/lib/libmist.so ./
cp /repo/root/robot/PACKAGES/lib/libmysqlclient_r.so ./
cp /repo/root/robot/PACKAGES/lib/libmysqlclient_r.so.15 ./
cp /repo/root/robot/PACKAGES/lib/libmysqlclient_r.so.15.0.0 ./
cp /repo/root/robot/PACKAGES/lib/libpixmap.so ./
cp /repo/root/robot/PACKAGES/lib/libredmond95.so ./
cp /repo/root/robot/PACKAGES/lib/libsmooth.so ./
cp /repo/root/robot/PACKAGES/lib/libsvg.so ./
cp /repo/root/robot/PACKAGES/lib/libtcl8.5.so ./
cp /repo/root/robot/PACKAGES/lib/libthinice.so ./
cp /repo/root/robot/PACKAGES/lib/libtk8.5.so ./
cp /repo/root/robot/PACKAGES/lib/libwx_base-2.8.so ./
cp /repo/root/robot/PACKAGES/lib/libwx_base-2.8.so.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_base-2.8.so.0.8.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_base_net-2.8.so ./
cp /repo/root/robot/PACKAGES/lib/libwx_base_net-2.8.so.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_base_net-2.8.so.0.8.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_baseu-2.8.so.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_baseu-2.8.so.0.8.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_baseu_net-2.8.so.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_baseu_net-2.8.so.0.8.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_baseu_xml-2.8.so.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_baseu_xml-2.8.so.0.8.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_base_xml-2.8.so ./
cp /repo/root/robot/PACKAGES/lib/libwx_base_xml-2.8.so.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_base_xml-2.8.so.0.8.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2_adv-2.8.so ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2_adv-2.8.so.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2_adv-2.8.so.0.8.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2_aui-2.8.so ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2_aui-2.8.so.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2_aui-2.8.so.0.8.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2_core-2.8.so ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2_core-2.8.so.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2_core-2.8.so.0.8.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2_html-2.8.so ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2_html-2.8.so.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2_html-2.8.so.0.8.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2_qa-2.8.so ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2_qa-2.8.so.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2_qa-2.8.so.0.8.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2_richtext-2.8.so ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2_richtext-2.8.so.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2_richtext-2.8.so.0.8.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2u_adv-2.8.so.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2u_adv-2.8.so.0.8.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2u_aui-2.8.so.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2u_aui-2.8.so.0.8.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2u_core-2.8.so.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2u_core-2.8.so.0.8.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2u_gizmos-2.8.so.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2u_gizmos-2.8.so.0.8.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2u_gizmos_xrc-2.8.so.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2u_gizmos_xrc-2.8.so.0.8.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2u_gl-2.8.so.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2u_gl-2.8.so.0.8.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2u_html-2.8.so.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2u_html-2.8.so.0.8.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2u_media-2.8.so.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2u_media-2.8.so.0.8.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2u_ogl-2.8.so.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2u_ogl-2.8.so.0.8.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2u_qa-2.8.so.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2u_qa-2.8.so.0.8.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2u_richtext-2.8.so.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2u_richtext-2.8.so.0.8.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2u_stc-2.8.so.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2u_stc-2.8.so.0.8.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2u_svg-2.8.so.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2u_svg-2.8.so.0.8.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2u_xrc-2.8.so.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2u_xrc-2.8.so.0.8.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2_xrc-2.8.so ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2_xrc-2.8.so.0 ./
cp /repo/root/robot/PACKAGES/lib/libwx_gtk2_xrc-2.8.so.0.8.0 ./
cp /repo/root/robot/PACKAGES/lib/libxml2.so.2 ./
cp /repo/root/robot/PACKAGES/lib/libxml2.so.2.9.3 ./
cp /repo/root/robot/PACKAGES/lib/ ./
10. install glibc under PACKAGES directory
// download from http://ftp.ntu.edu.tw/gnu/glibc/
# tar -xvf glibc-2.14.tar.gz
# mkdir glibc-build
# cd glibc-build
#tar -zxvf ../glibc-linuxthreads-2.7.tar.gz
#tar -zxvf ../glibc-libidn-2.7.tar.gz
#cd ..
#export CFLAGS="-g -O2"
#cd glibc-build
#../configure --prefix=/repo/root/robot/PACKAGES/glibc-2.14 --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin --disable-sanity-checks
#make
#make install
11. remove all pyc and pyo files
//remove all pyc files
# cd /repo/root/robot
# find . -name *.pyc > find_pyc.sh
# sed -i ''s/^/rm -rf /g'' find_pyc.sh
# chmod 775 find_pyc.sh
# ./find_pyc.sh
//remove all pyo files
# find . -name *.pyo > find_pyo.sh
# sed -i ''s/^/rm -rf /g'' find_pyo.sh
# chmod 775 find_pyo.sh
# ./find_pyo.sh
//remove shell files
# rm -rf find_pyc.sh
# rm -rf find_pyo.sh
关于使用 pypubsub & wxpython 在 Windows 之间传输数据获取 TypeError:和python 传输文件的介绍已经告一段落,感谢您的耐心阅读,如果想了解更多关于46-wxpython 4 使用 grid 展示表格、Deepin Linux Python3 wxpython 的安装、Eclipse 开发 wxpython import wx 后出现红叉、How to install python, wxPython and ride on CENTOS的相关信息,请在本站寻找。
本文标签: