in lecture 2, the professor is putting the data in an editor which runs using IDLE, I can't seem to find an editor like the one he is using. Help. Thanks
Like this one? http://www.youtube.com/watch?v=SLvTCHhu5SE&list=ECB2BE3D6CA77BB8F7&feature=player_detailpage#t=1656s That is IDLE. There is both an editing and an output part of IDLE. Open IDLE, under File select New Window. You should get the second window he is using. When you write something in this, be sure to save it as a filename.py file. The filename part is for you, but the .py is important for IDLE and Python. Also, if you want a more developed editing environment, there is PyScripter http://code.google.com/p/pyscripter/ This is very close to the commercial grade IDEs, but is for free. If your goal is not just to learn the basics of Python, but also to learn what developing in Python is like, this will be a good choice. On the other hand, if you just want to learn the basics of Python and are mostly there to learn about programming, IDLE is just fine. IDLE is just less helpful in some respects, which can be good for a learner! I mention PyScripter because it also has a runtime window on the bottom. If you can't get IDLE's two windows working, PyScripter will have that out of the box.
I can recommend this short guide into IDLE https://hkn.eecs.berkeley.edu/~dyoo/python/idle_intro/index.html It made the basics very clear for me. And now I'm going to go and try out PyScripter as e.mccormick recommends above.
I did intend to use pyscripter to do this course, but I couldn't get it to run the version that the course suggests. So I tried pydev (an eclispe add on for python). While I got it to work with the version of python we are using I ran into another problem. Both of these editors have the same problem that I cant get past though. When coding I like to have the code im working on set to the right of the screen and the work im reading from, course notes etc on the left. This is fine when im coding, but as soon as I run the code it runs it in the editor screen and not in a separate (alt tabable (?) ) window like the python imterpreter does. So untill that issue is resolved then I think im sticking with the Python idle.
That's weird you couldn't run Python 2.6.x in PyScripter, because it's supposed to support it and it does in my case. First thing I thought of was the mismatching software versions (like e.g. 32-bit instead of 64-bit). Also, in PyScripter you can choose manually which version of Python you are going to work with. Well, just in case. I'm sure you've tried this.
The software versions may be the problem, though because the interpreter/console window cant move out of the confines of the programme I dont think ill investigate more.
I'm sorry, I don't want to spam, but just to make sure we're talking about the same thing. I've just tried to move the interpreter in PyScripter found out that and its position actually can be changed. As far as I can judge, it can be placed in three ways: at the bottom (by default), symmetrically at the top (if you drag it there) and wherever you like as a separate window (just like IDLE shell) if you drag it somewhere else, like to the right.
That is not spam. That is jsut discussing a related thing to what the poster asked about, which is good!
Indeed you can. Though as long as pyscripter is active on the right side of my screen I can't see what im reading from on the left side. Whilst working from notes or examples I like to see it as im working instead of alt tabbing every few seconds.
You can open the txt editor by pressing ctrl + N
Hi everyone! I also had trouble finding the editor that the professor was using in lecture 2. I was able to figure out that making a New Window would give me the second window the professor is using. But I have a few questions: This New Window that I open from the original is considered the 'editor' correct? While the original IDLE tab is the 'outcome' and this is the place that my coding commands should run in correct? So I have been doing this but every time I come to save it won't let me save as a py.file and I think this is the reason why my program doesn't run in the outcome tab. Basically, when I go to save the New Window the only Save as Type options I have are: Python and text files (*.py, *pyw, *txt) <--probably the right choice but I'm not sure All text files (*.*) All files (*.*) In other words, can someone help me figure out how to input raw data as a user and not as a coder? So I would program: x = int (raw_input('Enter an integer: ')) Enter an integer: #<--This shows up directly under the above code in the IDLE editor (New Window) but not in the IDLE Shell where I want the user to enter an integer
@yak, yes, you are right, what you open as a 'new window' in IDLE is a text editor and what opens initially (as well as when you press f5 to run a script from a text editor) is a shell, which can be used both for typing a code (and it will execute lines instantaneously) or for running a script from a text editor window. When saving a new script in IDLE I simply type file_name.py, because that 'Python and Text Files' doesn't save it as a .py file. But even if you save it as .txt you can later rename it by simply changing .txt for .py. Now, in IDLE, to turn on the 'user mode', you need to have a script in a text editor window, save it and then run it (from the menu or by pressing f5) and then the 'user' will be dealing with the programme executed in the shell. If you have raw_input('Enter something') in your script, the shell will ask a user to enter something and then continue executing your code. Does it make sense?
It is best to save as a .py file because then IDLE will realize it needs to do the code highlighting when it opens it back up.
@ansakoy yes it does make sense! Thank you so much I will work on this right now! @e.mccormick thanks for the advice I will save it as the .py file :)
Join our real-time social learning platform and learn together with your friends!