2017-09-12 06:57:33

Hello guys
I'm starting to learn python, and I installed python 2.7 on my pc that runs Windows.
The problem I can not open is the python console to create programs.
Can someone help me?.!

2017-09-12 07:35:19

The default editor for python, IDLE, is not very screen reader accessible to begin with. You can create scripts with a simple text editor like notepad, just save the documents as plain text with *.py on the end. You can then run them from the command line by typing "python myscript.py", assuming your paths are setup correctly. There are also other more accessible IDE's around, such as Notepad++. Others may be along to share their preferred tools as well.

-BrushTone v1.3.3: Accessible Paint Tool
-AudiMesh3D v1.0.0: Accessible 3D Model Viewer

2017-09-12 07:39:44

Hi,

I wouldn't call the interactive input Python offers itself as a console actually. When I hear console, I usually think of terminals like the Linux shell, but thats indeed not what Python has to offer. The two things Python can give us itself are:
1. A scientilla based IDE (which isn't that great and you should probably try to get something better) and
2. an interactive command input, which allows us to test commands, conditions and small programs on the fly.
None of those should you be using to "create" programs.
Well, you didn't really describe your problem yet. You only said "it doesn't let me do that", but why? Whats your exact problem?
I'd recommend you to create a test program file (like test.py), write some hello world example into it, like follows:

def main()
  print 'Hello world!'

main()

Open some command prompt, navigate into the folder where the test.py file is currently located, and type "python test.py". As long as your PATH environment variable is set up correctly, python should interpret the file and print you some hello world statement.

Best Regards.
Hijacker

2017-09-12 14:11:43

Man, people still want to learn Python 2... ah well...

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.
My Github

2017-09-12 16:32:02

Is there anything wrong by learning Python 2? The book I'm studying says you need to learn Python2 before you can learn Python3. Most programs are made in Python2 anyway. I'm sorry, but I'm not sure I got your point. smile

Best regards SLJ.
Feel free to contact me privately if you have something in mind. If you do so, then please send me a mail instead of using the private message on the forum, since I don't check those very often.
Facebook: https://facebook.com/sorenjensen1988
Twitter: https://twitter.com/soerenjensen

2017-09-12 18:46:14

Hello guys!
Thanks for the tips.

2017-09-12 19:10:07

@SLJ, you don't need to learn Python 2 before learning Python 3. In fact, I'd say learning Python 2 before 3 hinders you a little because there are several differences between the two languages (like Python 2 have multiple different types of strings and Python 3 not having such a thing). Yes, a lot of stuff is written in Python 2. But a lot of stuff is written in Python 3, too.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.
My Github

2017-09-12 19:45:51

As someone who learned and used Python since 2009, I'll say go for Python3. Many of my Python2 code worked with not much need for convertion. Of course, there are differences, but as a starter you even won't notice them at the beginning.

2017-09-13 05:50:38

Hi.
@Slj, it is not true that you have to learn python 2 before 3. That's probably something the author put in to force or scare you into using python 2. Either one is fine, the problem you have is that once you get good at programming you will need libraries to do certain things that python can't do itself. Python 2 has many libraries that have been finished, but python 3 still has many libraries that are still being worked on, or have been abandoned. For example wx python which controls mouse and keyboard input is fully developed for python 2, but the one for python 3 is still being worked on today. What I'm saying is you can't use a python 2 library for 3 and the other way around. Since you're a beginner, I would personally recommend using python 2 while your learning and then once you have the basics down move on to python 3. Python 2 supports older systems which is nice if you want backward compatibility, python 3 is faster and a little easier to use. There really is no good and bad, it all depends on you're personal preference.
Hth.
@Diego, I don't know what you mean by console. Just stick to using notepad for now it will make things a lot easier for you.

Guitarman.
What has been created in the laws of nature holds true in the laws of magic as well. Where there is light, there is darkness,  and where there is life, there is also death.
Aerodyne: first of the wizard order

2017-09-13 07:51:20

Interesting. Thanks for your replies.

Best regards SLJ.
Feel free to contact me privately if you have something in mind. If you do so, then please send me a mail instead of using the private message on the forum, since I don't check those very often.
Facebook: https://facebook.com/sorenjensen1988
Twitter: https://twitter.com/soerenjensen

2017-09-14 01:18:47 (edited by Hektor 2017-09-14 01:21:51)

If you are using Windows, one way of using Python in console mode would be te:

* From the desktop, bring up the Run dialog (Windows+r)
* Focus will be placed in a field, type: cmd
*  Press Enter.

This will place you in a Window with a DOS prompt.

* Type: python
* Press ENTER

This will start python in console mode.

You can also access Python in this same way from the Windows PowerShell. When you are in the PowerShell window just enter the same python command.

When you are done with the python console, just type:

exit()

at the python console prompt and you will be returned to the DOS or PowerShell prompt.

It is also possible to setup a desktop icon that will do all of that for you and just drop you in a Python console if you wish. I can write that up later if you wish.

The Python console is a good place to try out small snipets of code--especially when you are learning.  I also find myself using it as a calculator.

2017-09-16 05:21:42

if you want you can to use  the visual st[udio

2017-09-17 05:53:15

Hello.
Python and visual studio? I don't think that works. Visual studio is more for microsoft languages, c# c++, visual basic, things like that. I could be wrong but I 'm pretty sure abut this.

Guitarman.
What has been created in the laws of nature holds true in the laws of magic as well. Where there is light, there is darkness,  and where there is life, there is also death.
Aerodyne: first of the wizard order

2017-09-17 14:37:20

there is python plugins for VS. I personally never got them to work, but I think that was more an accessibility issue with VS2015.

I don’t believe in fighting unnecessarily.  But if something is worth fighting for, then its always a fight worth winning.
check me out on Twitter and on GitHub

2017-09-17 19:47:17

@Guitarman, VS is not just for Microsoft languages, and C++ is not a Microsoft language (unless you count the CLR extensions to it when you use the appropriate project type). But you can certainly add other languages to it that are not MS-specific: There's D for Visual Studio; Python Tools for Visual Studio; RemObjects Elements...

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.
My Github

2017-09-18 04:05:23

Interesting. Well I learned something new thanks Ethin.

Guitarman.
What has been created in the laws of nature holds true in the laws of magic as well. Where there is light, there is darkness,  and where there is life, there is also death.
Aerodyne: first of the wizard order