学习
实践
活动
工具
TVP
写文章

Python27 反射

图中输入choice的内容是一个字符串,正常调用d.eat()这可不是一个字符串。 报错提示Dog中不存在attribute choice(字符串)

23220

Python27中Json对中文的处理

应用场景如下:从api下载数据,json解析,存入字典,定期保存。重启程序需要加载保存的文本。 问题1:json中都是unicode串,存到文本里都是些\u**...

441100
  • 广告
    关闭

    2022腾讯全球数字生态大会

    11月30-12月1日,邀您一起“数实创新,产业共进”!

  • 您找到你想要的搜索结果了吗?
    是的
    没有找到

    查看Python安装路径

    'C:\\Python27\\lib\\site-packages\\docutils-0.14-py2.7.egg', 'C:\\Python27\\lib\\site-packages\\decorator -4.2.1-py2.7.egg', 'C:\\Windows\\system32\\python27.zip', 'C:\\Python27\\DLLs', 'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win', 'C:\\Python27\\lib\\lib-tk', 'C:\\Python27', 'C:\\Python27\\lib\\site-packages ', 'C:\\Python27\\lib\\site-packages\\win32', 'C:\\Python27\\lib\\site-packages\\win32\\lib', 'C:\\Python27 \\lib\\site-packages\\Pythonwin', 'C:\\Python27\\lib\\site-packages\\wx-2.8-msw-unicode'] 得解。

    1.1K20

    Python如何安装第三方模块

    Copying setuptools-15.2-py2.7.egg to c:\python27\lib\site-packages setuptools 15.2 is already the active easy_install.exe script to C:\Python27\Scripts Installing easy_install-2.7-script.py script to C:\Python27 \Scripts Installing easy_install-2.7.exe script to C:\Python27\Scripts Installed c:\python27\lib\site-packages Python27\Scripts Installing pip2.7.exe script to C:\Python27\Scripts Installing pip2-script.py script to C:\Python27\Scripts Installing pip2.exe script to C:\Python27\Scripts Using c:\python27\lib\site-packages

    24820

    CentOS6.5 Python 2.7

    /configure --prefix=/usr/local/python27     make&&make install 2、下载ipython https://pypi.python.org/ pypi/ipython/4.2.0     tar xvf ipython-4.2.0.tar.gz     cd ipython-4.2.0     /usr/local/python27/bin /python2.7 setup.py install         ln -sv /usr/local/python27/bin/python2.7 /usr/bin/python27          ln -sv /usr/local/python27/bin/ipyton /usr/bin/ 使用ipython时直接报错         1、报错:ImportError: No module named traitlets     在github 上下载https://github.com/ipython/traitlets     # /usr/local/python27/bin/python2.7

    46110

    Python 安装

    /configure --prefix=/usr/local/python27  make && make install 4、安装ipython tar xvzf ipython-1.2.1.tar.gz 调用python来安装 /usr/local/python27/bin/python2.7 setup.py build  #编译 /usr/local/python27/bin/python2.7 setup.py install #安装,它会安装到/usr/local/python27/bin/ 做软连接到 ln -sv /usr/local/python27/bin/python2.7 /usr /bin/python27 ln -sv /usr/local/python27/bin/ipython /usr/bin/ipython 至此安装完毕,python27即可使用,原有旧版本输入python

    27510

    Python学习笔记5—Python模块

    \\Lib\\idlelib', 'C:\\Windows\\system32\\python27.zip', 'D:\\Python27\\DLLs', 'D:\\Python27\\lib', 'D :\\Python27\\lib\\plat-win', 'D:\\Python27\\lib\\lib-tk', 'D:\\Python27', 'D:\\Python27\\lib\\site-packages '] >>> sys.path.append('/tmp') >>> sys.path ['E:\\Note\\Python', 'D:\\Python27\\Lib\\idlelib', 'C:\\Windows \\system32\\python27.zip', 'D:\\Python27\\DLLs', 'D:\\Python27\\lib', 'D:\\Python27\\lib\\plat-win',  'D:\\Python27\\lib\\lib-tk', 'D:\\Python27', 'D:\\Python27\\lib\\site-packages', '/tmp']     赋值语句,variables

    19520

    CentOS6.X 安装mycli

    /configure --prefix=/usr/local/python27 && make -j4 && make install && export PATH=$PATH:/usr/local/python27 /bin/ ### cd /root/ins_mycli unzip setuptools-36.0.1.zip cd setuptools-36.0.1 /usr/local/python27/bin python2.7 setup.py install ### cd /root/ins_mycli tar xf pip-1.5.6.tar.gz cd pip-1.5.6 && /usr/local/python27 /bin/python2.7 setup.py build && /usr/local/python27/bin/python2.7 setup.py install ### /usr/local/python27 /bin/pip install mycli echo 'alias mycli="/usr/local/python27/bin/mycli"' >> /root/.bashrc

    55830

    python-环境准备python,ip

    Public    Python-2.7.6.tar.xz  Videos [root@localhost ~]# [root@localhost Python-2.7.6]# /usr/local/python27 /bin/python2.7 setup.py build [root@localhost ipython-1.2.1]# /usr/local/python27/bin/python2.7 setup.py install [root@localhost ipython-1.2.1]# ls /usr/local/python27/bin/ 2to3  ipcluster     ipengine  iptest /bin/python2.7 /usr/bin/python27 `/usr/bin/python27' -> `/usr/local/python27/bin/python2.7' [root@localhost ipython-1.2.1]# ln -sv /usr/local/python27/bin/ipython /usr/bin/ `/usr/bin/ipython' -> `/usr/local/python27

    24710

    Python的最大递归深度错误 “max

    \lib\site-packages\bs4\element.py", line 1045, in __str__     return self.encode()   File "C:\Python27 element.py", line 1055, in encode     u = self.decode(indent_level, encoding, formatter)   File "C:\Python27 \lib\site-packages\bs4\element.py", line 1195, in decode_contents     formatter))   File "C:\Python27 , formatter)   File "C:\Python27\lib\site-packages\bs4\element.py", line 1195, in decode_contents      (val, formatter)   File "C:\Python27\lib\site-packages\bs4\element.py", line 163, in format_string

    58610

    每天一点点python----安装Pyt

    /configure --prefix=/usr/local/python27 make && make install 三、安装ipython-->python一个拓展模块,支持很多方便快捷的功能,例如补全 releases/download/rel-1.2.1/ipython-1.2.1.tar.gz  tar xf ipython-1.2.1.tar.gz cd ipython-1.2.1 /usr/local/python27 /bin/python2.7 setup.py install # 查看安装结果 ls /usr/local/python27/bin/ 2to3  idle  ipcluster  ipcontroller 四、创建链接 ln -s /usr/local/python27/bin/python2.7 /usr/bin/python27 ln -s /usr/local/python27/bin/ipython

    22910

    编译安装python

    /configure --prefix=/usr/local/python27 [root@stu Python-2.7.10]# make && make install 安装ipython [root ~]# tar xf ipython-3.2.1.tar.gz [root@stu ~]# cd ipython-3.2.1 [root@stu ipython-3.2.1]# /usr/local/python27 /bin/python2.7 setup.py build [root@stu ipython-3.2.1]# /usr/local/python27/bin/python2.7 setup.py install 建立链接 [root@stu ~]# ln -sv /usr/local/python27/bin/python2.7 /usr/bin/python27 `/usr/bin/python27' ->  `/usr/local/python27/bin/python2.7' [root@stu bin]# ln -sv /usr/local/python27/bin/ipython /usr/bin/

    24910

    python导入父级别目录

    \DLLs’, ‘D:\to ols\Python27\lib’, ‘D:\tools\Python27\lib\plat-win’, ‘D:\tools\Python27\ \lib\lib-tk’, ‘D:\tools\Python27’, ‘D:\tools\Python27\lib\site-packages’, ‘D:\tools\Python27 sys.path.append(“E:\”) print(sys.path) [”, ‘C:\Windows\system32\python27.zip’, ‘D:\tools\Python27 \DLLs’, ‘D:\to ols\Python27\lib’, ‘D:\tools\Python27\lib\plat-win’, ‘D:\tools\Python27\ \lib\lib-tk’, ‘D:\tools\Python27’, ‘D:\tools\Python27\lib\site-packages’, ‘D:\tools\Python27

    2.2K10

    pyinstaller

    >python.exe --version Python 2.7.14 C:\Python27> 安装 C:\Python27>python.exe -m pip install pyinstaller > 查看信息 C:\Python27>Scripts\pyinstaller.exe -v 3.3.1 C:\Python27>Scripts\pyinstaller.exe -h usage: pyinstaller C:\Python27> 准备 python 脚本 C:\Python27\test>type command.py import os import re command ='netstat -ant \test> 这个脚本的作用就是查看本地哪些 TCP 的端口有打开并且处于监听状态 打包脚本 C:\Python27\test>C:\Python27\Scripts\pyinstaller.exe - C:\Python27\test>dir 驱动器 C 中的卷没有标签。

    29430

    Python+RobotFramework接口自动化测试避坑指南

    C:\Python27\lib\site-packages\robot\htmldata\lib\jsxcompressor.min.js目录下需有jsxcompressor.min.js文件,可以避免执行测试用例时 'c:\users\190146\appdata\local\temp\RIDEcbrrku.d\report.html' failed: No such file or directory: C:\Python27 \Lib\site-packages\robot\htmldata\rebot下 002.以下文件开头需要添加三行代码: 1.C:\Python27\Lib\ site-packages\robot\htmldata\htmlfilewriter 2.C:\Python27\Lib\site-packages\robot\reporting \Lib\site-packages\robot\reporting文件下的logreportwriters.py文件和C:\Python27\Lib\site-packages\robot\htmldata

    11420

    python+robotframework实现接口自动化测试(一)

    C:\Python27\lib\site-packages\robot\htmldata\lib\jsxcompressor.min.js目录下需有jsxcompressor.min.js文件,可以避免执行测试用例时 'c:\users\190146\appdata\local\temp\RIDEcbrrku.d\report.html' failed: No such file or directory: C:\Python27 \Lib\site-packages\robot\htmldata\rebot下 002.以下文件开头需要添加三行代码: 1.C:\Python27\Lib\ site-packages\robot\htmldata\htmlfilewriter 2.C:\Python27\Lib\site-packages\robot\reporting \Lib\site-packages\robot\reporting文件下的logreportwriters.py文件和C:\Python27\Lib\site-packages\robot\htmldata

    17310

    在Anaconda中实现多版本Pytho

    2.在conda中创建一个名为python27的环境,并下载对应版本的Python2.7 cmd下输入 conda create --name python27 python=2.7  如图: ? 3.激活python27 cmd下输入  activate python27  如图: ? 4.在python27的环境下下载Spyder cmd下输入  conda install spyder  如图: ? 6.打开Anaconda3安装目录下的envs\python27\Scripts文件夹,找到Spyder.exe即为Python2.7的Spyder。 如图所示: ?

    22910

    Python+RobotFramework接口自动化测试避坑指南2.0

    ;C:\Python27\Scripts;C:\Python27\Lib\site-packages 2.首先安装:wxPython2.8-win32-unicode-2.8.12.1-py27 安装所在的目录,如截图所示: cd Python27 cd Scripts pip list【查看安装列表,有些安装程序必不可少】 crypto 1.4.1可以在C:\Python27\Scripts目录下使用命令:pip install crypto(回车)安装,安装完成后会自动安装:cryptography 1.6 如果所需要的程序都安装好了 ,可以在目录:C:\Python27\Scripts下使用命令:python ride.py【启动ride.py文件】 注意事项: 1.不能随意更改robotframework-ride-1.3.win32 .exe和wxPython2.8-win32-unicode-2.8.12.1-py27.exe和robotframework-2.8.1.win32.exe的安装目录,一般默认安装在:C:\Python27

    8110

    windows平台python 2.7环境编译安装zbarlight

    \include -Ic:\python27\PC -c src/zbarlight/_zbarlight.c -o build\temp.win32-2.7\Release\src\zbarlight \libs -Lc:\python27\PCbuild -Lc:\python27\PC\VS9.0 -llibzbar-0 -lpython27 -lmsvcr90 -o build\lib.win32 \lib\site-packages\zbarlight-1.2-py2.7-win32.egg' (and everything under it) creating c:\python27\lib\ site-packages\zbarlight-1.2-py2.7-win32.egg Extracting zbarlight-1.2-py2.7-win32.egg to c:\python27\lib \site-packages zbarlight 1.2 is already the active version in easy-install.pth Installed c:\python27

    78220

    CentOS6.x升级安装python2

    /configure --prefix=/usr/local/python27     #make     #make install     #cd /usr/bin     #mv python python26     #ln -sf /usr/local/python27/bin/python /usr/bin/python 三、解决yum兼容问题     #vim /usr/bin/yum   修改第一行 easy_install     #wget https://bootstrap.pypa.io/get-pip.py     #python get-pip.py     #ln -sf /usr/local/python27 /bin/pip /usr/bin/pip     #ln -sf /usr/local/python27/bin/easy_install /usr/bin/easy_install 五、安装ipython ,MySQLdb模块     #pip install ipython     #ln -sf /usr/local/python27/bin/ipython   /usr/bin/ipython

    20310

    扫码关注腾讯云开发者

    领取腾讯云代金券