python-idle

Python IDLE. Auto-complete/Show completions not working

馋奶兔 提交于 2019-11-30 14:38:39
问题 IDLE is being very dodgy as to when it will actually show an Auto-complete menu. As of late it hasn't been working at all, or, more specifically, only works during an interactive session. I've been using Code Blocks for C, and have gotten really used to the very nice auto-complete features, so it's a bit frustrating not having them -- especially while trying to learn a new frame work and what class is associated with which methods, etc, etc.. Is there an easy fix to get IDLE auto-complete

Default working directory for Python IDLE?

丶灬走出姿态 提交于 2019-11-30 13:37:14
Is there a configuration file where I can set its default working directory? It currently defaults to my home directory, but I want to set it to another directory when it starts. I know I can do "import os" followed by "os.chdir("")" but that's kind of troublesome. It'd be great if there is a conf file that I can edit and change that setting, but I am unable to find it. In particular, I've looked into my OS (Ubuntu)'s desktop entry '/usr/share/applications/idle-python3.2.desktop', which doesn't contain a conf file, but points to '/usr/lib/python3.2/idlelib/PyShell.py', which points to config-*

Python error - IDLE's subprocess didn't make connection. Either IDLE can't start or personal firewall software is blocking connection

萝らか妹 提交于 2019-11-30 12:37:49
I am new to programming and i decided to learn Python first, so; I installed Python, latest version 3.4. and I am trying to open Python IDLE(GUI) mode, so when I open I get message "IDLE's subprocess didn't make connection. Either IDLE can't start or personal firewall software is blocking connection.". My firewall is not problem beacuse I put Python throught it. I also tried to reinstall it and it didnt made diffirence. So please if somenone can help! Thank you on your time :D Delete all newely created .py files in the directory with Python. for example random.py, end.py - that was my problem

Cleanest way to run/debug python programs in windows

蹲街弑〆低调 提交于 2019-11-30 12:36:44
问题 Python for Windows by default comes with IDLE, which is the barest-bones IDE I've ever encountered. For editing files, I'll stick to emacs, thank you very much. However, I want to run programs in some other shell than the crappy windows command prompt, which can't be widened to more than 80 characters. IDLE lets me run programs in it if I open the file, then hit F5 (to go Run-> Run Module). I would rather like to just "run" the command, rather than going through the rigmarole of closing the

SyntaxError: multiple statements found while compiling a single statement python

耗尽温柔 提交于 2019-11-30 10:01:41
问题 this is my code, super simple: #borders of the bbox longmax = 15.418483 #longitude top right longmin = 4.953142 #longitude top left latmax = 54.869808 #latitude top latmin = 47.236219 #latitude bottom #longitude longstep = longmax - longmin longstepx = longstep / 1000 #longitudal steps the model shall perfom #latitude latstep = latmax - longmin latstepx = latstep / 1000 #latitudal steps the model shall perform I try to run in it in the Python IDLE (python 3.3) and this errormessage occurs

Python, writing multi line code in IDLE

核能气质少年 提交于 2019-11-30 08:40:23
问题 How do i write >>> x = int(raw_input("Please enter an integer: ")) >>> if x < 0: ... x = 0 ... print 'Negative changed to zero' ... elif x == 0: ... print 'Zero' ... elif x == 1: ... print 'Single' ... else: ... print 'More' ... this in IDLE. As soon as I hit enter after writting first line, it executes the first line and i am not able to write full code. I am very new to python, just started it today. Any help will be appreciated. 回答1: Try File => New Window in top menu. Then write your code

Delaying but not disabling iPhone auto-lock

核能气质少年 提交于 2019-11-30 07:35:46
I currently have a very simple app for which the only interaction is shaking the iPhone. However eventually the screen dims and auto-locks since the iPhone is not getting any touch events. I was wondering if there is a way to reset the auto-lock time-out when shaken? I know that to disable auto-lock completely I would do this: [[ UIApplication sharedApplication ] setIdleTimerDisabled: YES ] but I don't really want to disable it completely; if the iPhone is legitimately not being used it should auto-lock as expected. Thanks for your help. You could toggle the value of [UIApplication

“Edit with IDLE” option missing from context menu

时光怂恿深爱的人放手 提交于 2019-11-30 07:11:34
问题 I have Python 2.7.5 that installed with ArcGIS 10.2.2. When I first right-clicked a .py script I'd previously written it listed the "Edit with IDLE" option in the context menu. However, this option no longer appears when I right-click a .py file. I have read numerous threads concerning this issue and attempted some of them, such as modifying/removing registry keys and then reinstalling/repairing the software. I am not interested in using an IDE at this point, though many will be happy to know

How to physically print python code in color from IDLE?

人盡茶涼 提交于 2019-11-30 03:50:14
问题 I have searched for an answer to this but the related solutions seem to concern 'print' ing in the interpreter. I am wondering if it is possible to print (physically on paper) python code in color from IDLE? I have gone to: File > Print Window in IDLE and it seems to just print out a black and white version without prompting whether to print in color etc. Edit: It seems like this might not be available so the option is to copy code to a text editor like SciTE and print from there - quite like

Cleanest way to run/debug python programs in windows

人走茶凉 提交于 2019-11-30 03:05:29
Python for Windows by default comes with IDLE, which is the barest-bones IDE I've ever encountered. For editing files, I'll stick to emacs, thank you very much. However, I want to run programs in some other shell than the crappy windows command prompt, which can't be widened to more than 80 characters. IDLE lets me run programs in it if I open the file, then hit F5 (to go Run-> Run Module). I would rather like to just "run" the command, rather than going through the rigmarole of closing the emacs file, loading the IDLE file, etc. A scan of google and the IDLE docs doesn't seem to give much