2017-08-27 23:28:29

Hi all
I'd like to learn python and try my hand at making games for myself and others in this community to enjoy. I use both mac and windows and would like to learn python as i've heard pretty much only good things about it. As far as coding experience for me goes, I took a computer class last semester in school and learned basic coding for basic stamp v 2.5, its basicly a language that you use when coding hardware like what buttons to press and what speakers do what, robotic stuff, but not really good for games although I did build and create a simple reaction game with this for my final exam.
However, going back to python, what version is best for screenreaders? My system does not already have it, my pc at least, haven't checked my mac but I dout it would either. What version is needed, also what libraries allow me to do cross platform coding? Also, does anyone on here use IDEs? If so, what ones do you use? Also as i'm new to all of this, if somebody wouldn't mind it explaining it a bit, IDEs and libraries and such, that would help. Thanks

I am the blind jedi, I use the force to see. I am the only blind jedi.

2017-08-28 08:45:54

Hi.
The easiest thing is to use your Mac for coding and testing. It have Python 2.7 preinstalled, and you just run your .py files directly from the terminal to test your program.
I can't answer the other questions since I'm totally new to Python, and I'm currently trying to learn the basics. 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-08-28 10:25:47 (edited by magurp244 2017-08-28 10:28:37)

Python comes in two versions, 2.7 and 3.x, the reason for which is kind of stupid but we'll not get into that. Both versions are more or less the same with a few small differences, like some bracket use for Print statements or unicode handling. Either one will do, but be careful if you plan on switching code between the two versions. You can also start reading the free online book of Learn Python The Hard Way, which has versions for either [Python 2] and [Python 3] respectively.

IDE stands for [Integrated Developer Environment] and are the tools people use to actually write scripts. There are others such as IDLE, Notepad++, Code Blocks, Pythonwin, etc. Each have varying degree's of accessibility and i'm sure others will be along to share their preferred tools, but you could just as easily use any text editor like notepad or wordpad to write the scripts and then run them from the command line by typing "python myscript.py".

Python, and indeed most languages, come with a core set of functions such as Loops, Conditions, Variables, Arrays, etc. Libraries are used to extend these functions to perform more tasks, for example Pyglet and Pygame both feature functions for creating a window, handling key and mouse input, as well as audio playback, all features that are either not available or only have basic functions in core Python. If you plan on making audio games, both Pyglet or Pygame would be a good choice to start with. If you plan on adding TTS functions you can look into the Tolk, Accessible Output, or Pyttsx libraries. For advanced audio there's libaudioverse, PyAL, or some scripts I have that extend Pyglets OpenAL functionality.

Cross platform capabilities largely depend on the libraries you choose to use, most of the ones i've mentioned are already fully cross platform though, libaudioverse doesn't have mac support just yet and Accessible Ouput is windows only.

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

2017-08-28 15:07:24

So my mac will already have it? Also, you said to run the script you just go to command prompt with windows r or termonal aplication on mac? Just wanna be sure. Also not sure if it matters, but I have windows 7 and mac OS siera if those mean anything

I am the blind jedi, I use the force to see. I am the only blind jedi.

2017-08-28 15:10:40

Sorry for double posting, but if I were to make an audiogame that uses jaws or NVDA or some kind of screen reader support, would I need a different library for that like one with advanced audio functions?

I am the blind jedi, I use the force to see. I am the only blind jedi.

2017-08-28 23:25:50 (edited by magurp244 2017-08-28 23:27:00)

I can't really comment about mac as i've never used one, but for windows yes you can use the command prompt to run scripts, assuming the paths are setup properly. Both of those operating systems should be fine, although i've heard instances of built in Mac versions of python not working for development purposes out of the box. You can try following these [python 2] or [python 3] guides for setting it up on mac.

As for screen readers, yes you would need separate libraries for screen reader support, but they are not related to the Advanced Audio libraries. For screen reader support with Jaws or NVDA i'd recommend the [Tolk Library], you can grab the latest version from AppVeyor. There are two others I mentioned, Accessible Output which is windows only but also supports many screen readers, and Pyttsx which only supports SAPI, NSSpeechSynthesizer, and espeak for windows, Mac, and linux respectively.

The Advanced Audio libraries are more for 3D positional audio, hrtf, and special effects like reverb and such.

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

2017-08-29 00:30:29

@magurp244
accessible_output2 works just fine on os X

2017-08-29 00:34:14

Oh? I was going by the Pypi verison of Accessible Output, not Accessible_Output2, but I stand corrected.

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

2017-08-29 03:52:50

Ok so on windows, if you hit f2, you can changethe filepath to, say, My game.py. How do you do that on os10? Rename in the shortcut menu just changes the title of the file, and the where pop up button only shows real text document, microsoft word or a few other ones but not python. Is there something I need to install? Or itS text edit not the right editer for this?

I am the blind jedi, I use the force to see. I am the only blind jedi.

2017-08-29 08:56:35

Hi.
On the Mac, yes, opening the terminal, navigate to the folder where your Python file is located and type: python myproject.py does run your file.
Regarding to text editor, I use Text made. I don't remember the website, but it should be easy to find on Google. The issue is that Text edit don't save it as the right file extension, and the easiest solution to this is to use an other text editor.

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-08-29 16:10:20

to rename a file in MacOS finder press enter on it. I think you can also press VO+shift+m (right click) and there is a rename option. If you are already in the terminal, you can use the mv command.
e.g:
mv my_file.txt my_file.py
also the touch command creates files for you as long as they are text based. I'm not 100% sure on all of the specifics, so if anyone could explain that better feel free. the command is:
touch file1.py file2.py file3.py
you can give as many args to the touch command as you wish and it will create the files.

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-08-29 17:31:42

Regarding renaming on the mac, I did use the rename option in the shortcut menu with shift vo m, but that doesn't let you change the file path.

I am the blind jedi, I use the force to see. I am the only blind jedi.

2017-08-29 22:42:00

@Rory, you can't change the file path with rename on windows or Linux either. The only way you can do this is via symlinks or by moving or copying the file. To change the file path, either symlink it (ln on mac and Linux, mklink on windows), move it (mv on Mac and Linux, move on Windows) or copy (cp on Mac and Linux, copy on Windows) the file.

"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-08-30 07:57:50

Regarding the file extension on the Mac: The way Text Edit saves the documents, you can't always change the extension by renaming the file. I'm not sure on why.

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-08-30 13:39:20

The reason for that is because, unlike Windows, which uses file extensions to determine file types, Mac and Linux use a far more efficient method: MIME types. They determine the MIME type by detecting the file extension, it's contents, and it's language. (I have no idea how to change that, and I really wouldn't try it, either. You can still run Python scripts by mv'ing the file and running it that way.)

"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