pyscripter

强烈推荐10 个 Python IDE 和代码编辑器!

孤人 提交于 2020-11-13 17:57:57
Python 非常易学,强大的编程语言。Python 包括高效高级的数据结构,提供简单且高效的面向对象编程。 Python 的学习过程少不了 IDE 或者代码编辑器,或者集成的开发编辑器(IDE)。这些 Python 开发工具帮助开发者加快使用 Python 开发的速度,提高效率。高效的代码编辑器或者 IDE 应该会提供插件,工具等能帮助开发者高效开发的特性。 1. Vim Vim 可以说是 Python 最好的 IDE。Vim 是高级文本编辑器,旨在提供实际的 Unix 编辑器‘Vi’功能,支持更多更完善的特性集。Vim 不需要花费太多的学习时间,一旦你需要一个无缝的编程体验,那么就会把 Vim 集成到你的工作流中 2. Eclipse with PyDev Eclipse 是非常流行的 IDE,而且已经有了很久的历史。Eclipse with Pydev 允许开发者创建有用和交互式的 Web 应用。PyDev 是 Eclipse 开发 Python 的 IDE,支持 Python,Jython和 IronPython 的开发。 3. Sublime Text 4. Emacs GNU Emacs 是可扩展,自定义的文本编辑器,甚至是更多的功能。Emacs 的核心是 Emacs Lisp 解析器,但是支持文本编辑。如果你已经使用过 Vim,可以尝试一下 Emacs。 5.

解决PyScripter中文乱码问题

こ雲淡風輕ζ 提交于 2020-02-29 19:34:05
环境: PyScripter 2.6.0.0 python3.4 问题: PyScripter有个小坑,打开文件后中文都成了乱码。在PyScripter中新建的文件中文可以正常显示,但是重新打开后中文乱码。 PyScripter中文乱码原因: 原因是如果文件头部没有编码声明,那么PyScripter会默认使用ANSI打开文件。 而PyScripter默认的文件模板也不带编码声明,重新打开文件时间不以UTF-8打开,所以乱码。 解决的办法: 1、用其它编辑器打开文件,添加这一行声明并保存: # -*- coding: UTF-8 -*- 2、修改PyScripter的文件模板也添加上这一行: # -*- coding: UTF-8 -*- 这样每次用PyScripter 新建python代码文件时间都会自动带上这行代码声明。很是非常十分方便-_-! 具体操作步骤: 工具 → 选项 → 文件模板 → python脚本 → 然后在模板中添加编码声明: # -*- coding: UTF-8 -*- → 点击更新!!!←这一步非常重要,修改后要记得点更新才会保存。 PyScripter 的所有配置都保存在PyScripter.ini中,路径是 你的用户目录/AppData\Roaming\PyScripter/PyScripter.ini C:\Users\Administrator

Python: How to end a while loop while it is running if the while condition changes during the loop?

喜夏-厌秋 提交于 2020-01-22 02:06:55
问题 I need some help with code in a text based game I am trying to make. My game uses health, and the code starts off with "while health>0:", and in another point in the game, when health eventually =0, the loop still continues. How do I make the loop end when health=0, without finishing the whole loop. Here is an example: health=100 while health>0: print("You got attacked") health=0 print("test") Should the code not be stopping when health=0, and not print "test"? How to I get it to stop when

importing numpy works with interpreter but not fully with pyscripter in python

谁说我不能喝 提交于 2019-12-13 06:59:27
问题 I'm working with python 3.3 (x64), and pyscripter 2.5.3 (x64), numpy 1.7 for python 3.3 (x64). When I import numpy in a script, I don't have all the functions of numpy available, only few of them (not a lot, and not array )? As if it doesn't manage to import all the file from numpy If I use IDLE it works fine, same with notepad++. 回答1: Depends on which Python engine you are using in pyscripter. The IDE offers a connect to its own internal installation of python and a remote installation

Can I run a Kivy program from within Pyscripter?

江枫思渺然 提交于 2019-12-13 05:54:11
问题 I've entered this code in Pyscripter: import kivy kivy.require('1.7.2') from kivy.app import App from kivy.uix.label import Label class MyApp(App): def build(self): return Label(text='Hello Kivy') MyApp().run() I then press the Run button (the green triangle). I get the following error: Import error: No module named kivy What can I do to make this work? P.S. I know I can leave Pyscripter and use kivy.bat, but I would like to use the debugging capabilities within Pyscripter. 回答1: I think this

How to change font (size/family) in PyScripter?

非 Y 不嫁゛ 提交于 2019-12-13 00:55:56
问题 I just started taking an online course for computer science learning Python. I use PyScripter, and at the site, the examples are in "Source Code Pro". I really like that font, and have already downloaded it and use it in Notepad++, but I would also like to know how to use it in PyScripter, but I cannot find anywhere in the editing panels or context menus that allow for font changing. (Additionally, the text is too small). I don't know if Stack Overflow is a great place for this as I think SO

Python Syntax Error

半世苍凉 提交于 2019-12-12 02:30:06
问题 I'm on Windows and I'm using PyScripter. For some reason everything results in a syntax error, even code that very obviously does not have a syntax error. For example, print 6 gets a syntax error, as does, a = 6 print a list = (1, 2, 7, 3) print list print 3 + 3 or any other code I can think of that involves printing. Did I download Python wrong, am I setting it up wrong, or what? 回答1: Are you using Python 3? The print function in Python three must use parentheses: a = 6 print(a) 回答2: I think

Numpy package for “python 2.7.8 and pyscripter 2.5.3” (64 bit windows 7)

亡梦爱人 提交于 2019-12-12 00:43:44
问题 I have python 2.7.8 and pyscripter 2.5.3 (64 bits)installed on windows 7....Can anyone tell me which is the numpy package to download for my OS..I went through many sites and installed many numpy and python versions to work on my pyscripter resulting in only wastage of time and getting more confused by uninstalling each..I see that most of the sites give .exe (superpack) files for 32 bit.The same version and all works perfectly with 32 bit windows 8 os.. I saw .whl files for 64 on http://www

Python based quickselect Implementation resulting in error

北城余情 提交于 2019-12-11 15:12:57
问题 I have small python code that implements the quickselect discussed here. import random def Quickselect(A, k): if not A: return pivot = random.choice(A) i = 0 A1 = [] A2 = [] # Two new arrays A1, A2 to store the split lists for i in range(len(A)): if A[i] < pivot : A1.append(A[i]) else: A2.append(A[i]) if k < len(A1): return Quickselect(A1, k) if k > len(A) - len(A2): return Quickselect(A2, k-(len(A) - len(A2))) else: return pivot pass def main(): A = [45,1,27,56,12,56,88] print(Quickselect(A

PyScripter Rpyc

孤人 提交于 2019-12-07 11:38:41
问题 maybe somebody could give me a couple guidelines how to install Rpyc to PyScripter. I use PyScripter 1.9.9.7 with Python 2.6. I have tried to google it and found some instructions, but still have not succeeded... Thanks! 回答1: Grab the file rpyc-2.60-py24.zip from here: http://code.google.com/p/pyscripter/downloads/list Under your python2.6 install directory go to the following subdirectory \Lib\site-packages\ check if you already have an rpyc subdirectory, \Lib\site-packages\Rpyc\ if you do,