2019-01-03 18:08:27 (edited by amerikranian 2019-01-03 18:10:00)

So I am sorry for a rather crude title, but python 3.7.2 or what ever it is is not printing or giving me back any output. More over, it doesn't mention any errors, it just sits there, showing >>> and my line of code if I type it in. In addition, the way I pasted in the code in the earlier versions, which was hitting alt space and selecting an option from there to paste, doesn't work. So help? Tips? Suggestions?
I should also note that I downloaded the python installer and then ran it to install the thing... not that it should have any impact but a handy bit of info none the less.

Thumbs up

2019-01-03 21:41:55

Hi.
Are you using idle? If so that's your problem right there. Try using VsCode or EdSharp, you will be doing yourself a huge favor. I haven't tried idle on python 3 but my guess is they did something to make it more inaccessible than it already is.
Hth.

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

Thumbs up

2019-01-03 22:09:18

What is idle? If Idle is the thing that pops up after typing python into the run prompt then yes, I'm using idle.
How do you use ed sharp? I downloaded it and I couldn't figure out. Mind giving a rough guide?

Thumbs up

2019-01-03 23:13:36

Hi.
No problem, I'm here to help. Yes I believe when you launch python from the command line, which is what you described, idle opens. The three greater signs are meant to indicate line breaks or something like that. I guess if you are sighted it would make more sense, but if you have little or no vision it would be very confusing.
Now if you just want to dash off a quick program, just write it in notepad and run it by typing the path of the file in the command line. The reason you need to do this is because if you run it by pressing enter on it, it will open quickly and then close, which is too fast for your screen-reader to read. When you run it from the command prompt, you can tell exactly what the script is doing. For example to run a program, type in C:\Users\Yourname\Pythonscript.py. Without the period after of course.
Now for EdSharp, just go to it on your start menu or desktop and press enter on it. You will have a blank page where you can write your code. First go to the menu bar and select python from the list of programming languages. Python is selected by default usually, but you should select python anyway just in case. Some others are c#, ruby, and a few others, but you don't need to worry about those right now. You probably know but python has indentation levels, in notepad it doesn't read these, you have to read line by line checking the indents manually. With EdSharp it says the indentation level as you type your code. For example, when you get to a point when you need to indent the first time, it will say level one when you press tab, and as you keep going level 2, 3, and so on. You will still need to check your indents in case you made a mistake, but you don't have to worry or guess at what indent level you are at now.
Hth.

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

Thumbs up

2019-01-03 23:51:08

I'm sorry, but there appears to be something missing here? How do I go to the menu bar to select python as a default language? I don't think I saw that option in the alt menus...
Right now, when I type in code, such as print("hi") it prompts me to choose with what should I run it with.

Thumbs up

2019-01-04 00:08:02

Double post... So I ran the script like you suggested from the command line, and well... The print statements and errors are not being read. Can ed sharp fix that, or do I have to revert back to python 3.6.4

Thumbs up

2019-01-04 01:10:10

Hi.
Woops sorry. I forgot to mention, you run a program with f5, to pick a compiler press control plus shift plus f5. To hear what compiler you are currently using press alt plus zero. If you don't want to use the shortcut for some reason, press alt f then press right arrow until you hear set default font and color, then up arrow aprox 6 or 8 times, and you will hear pick compiler along with the hotkey. Press enter on that, you will see several compilers down arrow until you get to python and press enter. Your code should then run properly in EdSharp.
No you shouldn't have any problem with command line showing print statements or errors, it should do that automatically. So it's not reading anything when you press enter? What exactly is it doing? Does it not speak at all? Or does it tell you there is something wrong with the code. At the very least it should give you an error message, or throw out some compilation error.

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

Thumbs up

2019-01-04 01:23:49

So I have a problem... when I run the thing by pressing f5, it still prompts to pick a program to run it with. However, control f5 seems to compile it and give me any errors it causes, so we're good. I do wonder, how are the ctrl f5 and f5 different?
For the future, how do I include an external module? I had pyp install pygame on my computer, but when I typed import pygame, the compiler wasn't happy with me.
As to your question, here's a script that I ran.
print("I'm a good boy.")
x = input("Do you agree with me?")
the only thing it read was my input.

Thumbs up

2019-01-04 01:26:53

I don't know what gave you this idea. but typing python on the commandline is *not* and will *never* be idle. If your hearing >>>, your not using idle. If your hearing anything but pains and unknowns for that matter, your not using idle. Your using the python console, which is completely accessible. Have you attempted using object navigation to see if the culperet was a trusty screenreader? Chances are an IDE will not help your issue, as most IDE's call home to python anyway.

If that's not the case, try writing to sys.stdout directly. Paste the following.

import sys
sys.stdout.write("hello world\n")

You should see the text hello world followed by 12 to signify the 12 bytes that were written.

Thumbs up +1

2019-01-04 01:31:38

Thanks @post 9. It was my nvda. go figure. So I can paste in the editor and check for errors now. Thank you again.

Thumbs up

2019-01-04 02:04:20

Hi.
I steered you wrong I'm sorry. I've used so many things it's hard to keep them all straight in my head. Yes the python console is accessible when you launch it from the command prompt. I got idle and console confused which I've done before.

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

Thumbs up +1

2019-01-04 08:47:14

no problem, happens to us all. I personally think it would do us a little good to forget that Idle ever existed. The python console is my best friend, pretty sure that's the way it'll always be. Also thanks for your edsharp info. I might play around with the source at some point, would be an interesting coding exercise to possibly hone my limited CS skill. Then again, I'm not the biggest fan of the language so maybe not

Thumbs up +2

2019-01-04 22:31:40

Hi.
What NVDA setting do you change to take away the greater signs in python console? It has always done that to me, I find it confusing, which is why I have rarely used the console myself.

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

Thumbs up

2019-01-11 01:22:43

Hi there!
For future reference, when asking, "Why TF isn't this code working?" it's best to give us some examples, just in case it is a syntax error!
For future reference though, NVDA 5, report dynamic content changes, should always be on, and then use object navigation to navigate in the python console window.
The python console window is just like any other command line utility.
On windows, this means that control v, for paste, should work fine.
To run a program using python, here's what I do:
1. press windows r for run.
2. Type cmd, for command line.
3. Navigate to the folder of choice using cd file names, for example:
cd Documents
cd code
cd test-project

5. Type in: python myprogram.py

If you have both python 2 and python 3, you may want to type either of these:
py -2 myprogram.py
py -3 myprogram.py

Hope this helps!

Nathan Smith
Managing Director of Nathan Tech
It's not disability
It's ability!