python-idle

how do I launch IDLE, the development environment for Python, on Mac OS 10.7?

怎甘沉沦 提交于 2019-12-18 10:22:49
问题 I am running python 2.7.1. I can't figure out how to launch the IDLE IDE. I am told it comes already installed with python, but I can't find it using spotlight. 回答1: In the stock Mac OS X python installation, idle is found in /usr/bin, which is not (easily) accessible from Finder and not indexed by Spotlight. The quickest option is to open the Terminal utility and type 'idle' at the prompt. For a more Mac-like way of opening it, you'll have to create a small app or shortcut to launch /usr/bin

Script fails with AttributeError when run in CMD, but executes fine in IDLE

爷,独闯天下 提交于 2019-12-18 09:03:38
问题 I am quite new and confused. I tried a simple script with tkinter and it worked fine in IDLE but when i try to launch it from CMD - the tkinter window opens and it looks fine , but when you attempt to click any button or file menu options an AttributeError raises: Exception in Tkinter callback Traceback (most recent call last): File "C:\Python33\lib\tkinter\__init__.py", line 1489, in __call__ return self.func(*args) File "060214_Manual_Evaluation_of_Protein-protein_Cross-Links.py", line 13,

What code can I use to check if Python is running in IDLE?

泄露秘密 提交于 2019-12-18 07:39:04
问题 Just as the title says. I want to write a script that behaves differently depending on whether it's running inside a console window or in IDLE. Is there an object that exists only when running in IDLE that I can check for? An environment variable? I'm using Python 2.6.5 and 2.7 on Windows. Edit: The answers given so far work. But I'm looking for an official way to do this, or one that doesn't look like a hack. If someone comes up with one, I'll accept that as the answer. Otherwise, in a few

What code can I use to check if Python is running in IDLE?

雨燕双飞 提交于 2019-12-18 07:38:46
问题 Just as the title says. I want to write a script that behaves differently depending on whether it's running inside a console window or in IDLE. Is there an object that exists only when running in IDLE that I can check for? An environment variable? I'm using Python 2.6.5 and 2.7 on Windows. Edit: The answers given so far work. But I'm looking for an official way to do this, or one that doesn't look like a hack. If someone comes up with one, I'll accept that as the answer. Otherwise, in a few

How to get IDLE to accept paste of Unicode characters?

北城余情 提交于 2019-12-18 04:23:25
问题 Oftentimes when I'm working interactively in IDLE, I'd like to paste a Unicode string into the IDLE window. It appears to paste properly but generates an error immediately. It has no trouble displaying the same character on output. >>> c = u'ĉ' Unsupported characters in input >>> print u'\u0109' ĉ I suspect that the input window, like most Windows programs, uses UTF-16 internally and has no trouble dealing with the full Unicode set; the problem is that IDLE insists on coercing all input to

python IDLE shell appears not to handle some escapes correctly

一笑奈何 提交于 2019-12-17 21:37:02
问题 For example \b backspace prints as quad (shown as [] in example below). But \n newline is Ok. >>> print 'abc\bd' abc[]d >>> print 'abc\nd' abc d Im running under Vista (pro), python 2.7 Ive tried googling this issue generally and in SO and cant find anything relevant, which seems odd and makes me wonder if theres some setting or other may be wrong in my setup. Not sure what to look for. 回答1: What am I doing wrong or what should I be looking for? Is it reasonable to expect backspace,

Basic Python Hello World Program Syntax Error

倾然丶 夕夏残阳落幕 提交于 2019-12-17 21:13:06
问题 I am not that really new in Programming but in Python I am really a newbie, and so when I started learning Python from the tutorials they encouraged me to use the IDLE editor for Python. And so as a newbie I had this weird Hello World problem. as you can see i use Python 2.6.6 in Linux(CentOS 6.2) and I tried almost all the possible syntaxes printing the simple HELLOWORLD provided in the documentation of python 2.6 and the new python 3 I tried printing contants like this print 1 + 1 and it

Why some characters can not be typed in Python's IDLE?

雨燕双飞 提交于 2019-12-17 20:21:58
问题 I don't know how to explain this, actually I'm looking for the explanation, so I'll just mention some steps to reproduce the issue. Hopefully someone will be able to understand and elaborate: Python 3.5.0 on Windows 8.1. (However this should be reproducible regardless of Python and Windows version.) Having Persian standard keyboard Installed. (It can be downloaded from here. Again I'm sure the problem is not limited to this specific keyboard and there are some characters in some other

Running Python script from IDLE on Windows 7 64 bit

别说谁变了你拦得住时间么 提交于 2019-12-17 18:59:26
问题 I'm trying to figure out how to successfully use Python 2.7.1 on windows 7. So far, I'm having to use the shell (IDLE) to create scripts and then run them from the cmd prompt. I feel this is slowing down the learning process and I was wondering if there was a way to run it from IDLE (I'm not able to create a pathway, so whenever i try to open or import a file i get an error) or some other program/text editor perhaps? Any help would be appreciated! I'm probably just doing something wrong. 回答1:

Can't run Python via IDLE from Explorer [2013] - IDLE's subprocess didn't make connection

时光毁灭记忆、已成空白 提交于 2019-12-17 16:13:23
问题 Resolved April 15, 2013. In windows 7 (64bit) windows explorer when I right clicked a Python file and selected "edit with IDLE" the editor opens properly but when I run (or f5) the Python 3.3.1 program, it fails with the "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection." error message. All other methods of starting IDLE for running my python 3.3.1 programs worked perfectly. Even the "Send to" method worked