Hi David,
Sorry about my brilliant assumptions on your use of Notepad++.
I took the opposite approach to Python. I don't really have a use for an
interpreted language because I can whip up whatever I want and compile
it into an executable. Although with that having had been said, I did
think I'd eventually look at the bigger picture. But so far my only
focus has been NVDA.
It's interesting that checking always on top solved your problem with
Window-Eyes. I took a look at mine along with a wild guess and saw that
I reclassed the Scintilla editor window to a standard edit. Although I'm
sure I went through all of the options and tried to intuit what would
help and hurt accessibility. However, as I've said, using it with
Window-Eyes wasn't my priority.
As for running your code? As far as I know the Python IDE is not
accessible. And that's all Notepad++ is sending your code to. It's a
typical IDE where you can run, step through, and error check your code.
But I'm pretty sure when I started out on this adventure its
inaccessibility was the reason the folks at NVDA recommended Notepad++.
But all is not lost. All you have to do is open the command prompt and
run it from there. It will react like the Python console and give you
any error messages. You might be able to run it from within the console
too, but I breezed over these things in my reading because I wasn't
planning on writing any stand-alone programs.
Assuming the Python folders are in the path, which they should be by
default, just enter the following:
python fileName.py (if you're in the folder where the py file is.)
python drive:\folderName\fileName.py (if not.)
Now, if you want to dabble with NVDA, here's a good starting lineup.
First I'll give you a little demo of the NVDA Python console. They
created this so you would get a snapshot of the program you were in when
you entered it. So let's open the standard Windows Notepad. Now press
NVDA+Control+Z.
This console provides variables relating to the program you were in when
you opened it:
fg = foreground window.
focus = focused window.
nav = The navigator object.
Remember that the snapshot makes fg and focus static. So you can't
Alt+Tab back to the program and change them. The change will not be
reflected in the console. But the nav object is alive. Otherwise just
exit the console, make the change, and open it again.
When you enter the console you're at the command line. F6 jumps you back
and forth between it and the output window. I just went to the output
window, arrowed up, and Control+Shift+End to select what I did. So here
we go!
>>> print(fg.name)
Untitled - Notepad
>>> # But where are we truly at?
>>> print(api.getForegroundObject().name)
NVDA Python Console
>>> # Back to Notepad.
>>> print focus.value
Hi, David! I'm just hanging out here in the Notepad editor.
>>> # That's the text in the editor.
>>> # Care for a ternary operation?
>>> # First I must import controlTypes.
>>> import controlTypes
>>> print True if focus.role == controlTypes.ROLE_EDITABLETEXT else False
True
>>> # Let's see if we can get the status bar.
>>> for w in fg.children:
... if w.role == controlTypes.ROLE_STATUSBAR:
... statusBar = w
... break
...
>>> # the elipsis is waiting for another statement.
>>> # So we have to press [Enter] to say "That's it."
>>> print True if statusBar else False
True
>>> print(statusBar.displayText)
Windows (CRLF) Ln 2, Col 1 100%
>>> # We should delete things we create here
>>> # because exiting only hides the console.
>>> # Oh, but wait!
>>> type(statusBar)
<class 'NVDAObjects.IAccessible.IAccessible'>
>>> # Good to know.
>>> del statusBar
>>> print True if statusBar else False
Traceback (most recent call last):
File "<console>", line 1, in <module>
NameError: name 'statusBar' is not defined
>>> # I knew that! Hahaahaahaaha!
>>> exit()
And finally, here's some resources you might want to go over.
1. The main developer guide.
https://www.nvaccess.org/files/nvda/documentation/developerGuide.html
2. The add-on developer guide.
https://github.com/nvdaaddons/DevGuide/wiki/NVDA-Add-on-Development-Guide
3. Joseph Lee's tutorial. Thanks to Lloyd for telling me about this.
I've talked to Joseph on the add-on list and oddly he didn't mention it.
It's a typical TeamTalk session, but, it should give you at least an
idea about developing add-ons.
https://www.dropbox.com/s/ilod4cutwoa5fec/Your_First_NVDA_App_Module.zip?dl=1
Hope this helps. And good luck.
Regards,
Tom
On 7/2/2019 7:44 AM, David wrote:
Tom,
thanks for your feedback.
Sure, the one and only reason for me to bring Notepad plus-plus to my
computer, was to get an environment for learning Python.
Now, there would be two main avenues for learning a new programming
language. You could decide for a given project, and learn your ways, as
you taylor your coding directly into that project. Like when a person
wants to build add-ons for say NVDA. You then learn exactly how to do
that kind of coding, and it might have many benefits if you let NVDA be
the screen reader when you operate the code and the editor - as well as
the testing environment. Drawback of this approach, of course, is that
you only learn what to do in connection with that kind of projects. Much
like if you concentrate on learning to bake breads, getting really good
at that kind of bakery, but leaving out the rest of the cooking skills
of grandma.
The other approach, would be to learn general programming in that
language. That is, start out with small coding, of tiny tools, that
might come in handy for your daily projects. For eaxample, learning to
code a tiny currency calculator, or some kind of an automated file
handling program. Benefit of this approach, mainly sits in the fact that
you learn the basics of the language, end up falling into numerous
pitfalls in your coding, and generally grow in experience - all while
your coding could be kept somehow affordable, and likely won't crash
either your screen reader, or your computer. Then, when you feel
comfortable with the new programming language, and think you have got
the grasp of it, it is time to move on to the really big projects like
NVDA coding. And then you will be prepared that your big prject is going
to take you all down. Smiles. To me, it always have seemed most
effecient to take this latter approach.
So, I got Notepad double-plus installed, and found the solution to my
initial trouble. Under the View menu, I had to check the box that said
"Always on top". Now Win-Eyes will read to me what I write in the editor.
But my next issue is, that I want to test my code. Notepad Plus does
offer me the chance of doing this, by calling the Python Shell, and test
run my code there. Unfortunately, here I ran into the next bundle of
snakes.
The Python shell seem to be inaccessible. And I cannot seem to find any
place to perform settings that would make it more readable to me. That
is, I did find my way into the Options screen of the Shell, but no
matter what I have tried, the shell screen seem just as blank to
WinEyes. And without reading the shell screen, how will I know what
results my code produces?
So, I brought out Jaws, hoping for it to read the screen of the Python
Shell a bit better. Oh, it did not really bring me anything further.
Good enough, my Jaws is version 18, and maybe they have come up with
better functionality in later versions.
Tom, you suggested NVDA, so why not give that a run. But sorry to let
you be informed, not even NVDA would read the Shell screen. Meaning, I
was unable to see any results from my code.
If you, or anyone else, have some idea of what I might need to adjust,
in order to have my screen reader tell me what is in the Shell window of
Python - I would be very much pleased. Or, is there any other way of
testing my code, where the screen reader will let me know the results?
Any other testing environment for my Python code?
Sure, since I am not programming for NVDA, that is, not making code that
will drill itself into NVDA and control the behavior of the screen
reader, I cannot just send my code to NVDA and say: "hey what do you
want to do with this piece of a cake?" In that way, building general
applications slightly differs from what a developer of add-ons will be
doing. If you build for the screen reader, well then the screen reader
is your testing environment. The behavior of your screen reader, will
prove to you whether or not you have succeeded in your coding. But when
you code for the computer, your screen reader needs to act as your eyes,
letting you know what results your computer produces. And that is where
I am stuck.
I know this would have belonged on the Scripting list, which we enjoyed
in the former days. To my knowledge though, that one has been
discontinued, or noone has at least been posting there for a couple of
years.
Again, all ears for whatever experience someone has. Even, does anyone
know of a mailing list, or other resource, that deals with blind
programmers - Python or more generally?
Thanks, and to all who did not make sense of this techie stuff, sorry
for the clutter.
David
On 7/1/2019 2:10 PM, Tom Kingston via Talk wrote:
Hi David,
I use Notepad++ for NVDA programming. And that's really what it's
designed for. You can choose your programming language and options
relative to programming.
Of course you can use it for a Notepad replacement. But I'm not really
sure what the benefit would be other than the fact that it's a
multi-document editor.
I am able to use it with Window-Eyes. Although it is a bit funky. But
I only installed it to use as a Python editor for NVDA. So I haven't
plowed through all the options trying to get it to work optimally with
Window-Eyes.
If you're looking for something between MS Word and Notepad there is
Jarte. It's basically an extended version of Wordpad that adds spell
checking and other features. And it is specifically designed with a
screen-reader support mode. I don't really use it all that much, so I
can't comment from the perspective of it being my main word processor.
There are free and paid versions of it. I forget the difference now,
but here's the homepage.
http://www.jarte.com/?so=j&ed=p&ve=61
Hth,
Tom
On 7/1/2019 2:11 AM, David via Talk wrote:
Does anyone here have any experience with the alternative Notepad
program, named Notepad Plus Plus?
I seem to remember users suggesting it for certain projects, back in
time. I now decided to just give it a short go. Got it installed, and it
opens just fine. WinEyes reads all the menus fine.
But whenever I try to write something, things seem to jam. Sure, the
text I am writing, does get spoken by the screen reader, since I have
the key echo set to words. But if I try to arrow through the text,
nothing happens. I can press the arrows as much as I want, WinEyes has
gone for his coffee break. And if I try the Ctrl-Shift-W, to have the
complete window read out, it reads the menu bar, but nothing of my
entered text.
Just wondering, is there any settings that needs be done - either in
Notepad Double Plus, or in WinEyes? Is there any set file for this
editor? Or, is this software accessible for blind usage at all?
Thanks for any feedback.
_______________________________________________
Any views or opinions presented in this email are solely those of the
author and do not necessarily represent those of Ai Squared.
For membership options, visit
http://lists.window-eyes.com/options.cgi/talk-window-eyes.com/trailerdavid%40hotmail.com.
For subscription options, visit
http://lists.window-eyes.com/listinfo.cgi/talk-window-eyes.com
List archives can be found at
http://lists.window-eyes.com/private.cgi/talk-window-eyes.com
.
_______________________________________________
Any views or opinions presented in this email are solely those of the author
and do not necessarily represent those of Ai Squared.
For membership options, visit
http://lists.window-eyes.com/options.cgi/talk-window-eyes.com/archive%40mail-archive.com.
For subscription options, visit
http://lists.window-eyes.com/listinfo.cgi/talk-window-eyes.com
List archives can be found at
http://lists.window-eyes.com/private.cgi/talk-window-eyes.com