1

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?.!

Thumbs up

2

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.2.8: Accessible Paint Tool

Thumbs up

3

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

Thumbs up

4

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.

Thumbs up

5

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.
If you like the post, then please give it a thumps up.
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.
Happy gaming... :D

Thumbs up

6

Hello guys!
Thanks for the tips.

Thumbs up

7

@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.

Thumbs up

8

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.

Thumbs up

9

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.
Playing music and coding, are kinds of real world magic.

Thumbs up

10

Interesting. Thanks for your replies.

Best regards SLJ.
If you like the post, then please give it a thumps up.
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.
Happy gaming... :D

Thumbs up

11 (edited by Hektor 2017-09-14 00: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.

Thumbs up

12

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

Thumbs up

13

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.
Playing music and coding, are kinds of real world magic.

Thumbs up

14

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

Thumbs up

15

@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.

Thumbs up

16

Interesting. Well I learned something new thanks Ethin.

Guitarman.
Playing music and coding, are kinds of real world magic.

Thumbs up