Re: Problem using screen reader output libraries in python3

Launching the program from a different location changes the working directory, so when it goes to look for the required files, it won't find them. You'll need to check for the files directory and change the current working directory in your program with the sys and os libraries before you do anything else. Example:

#the script is called test.py
import os,sys

#print the Current Working Directory
print(os.getcwd())

#print the files directory, note this can contain other data
print(sys.argv)

#change the current directory to the files directory, but
#remove the name of the file from the string.
os.chdir(sys.argv[0].strip('test.py'))

#print new current working directory
print(os.getcwd())

For Tolk you'll need Tolk.py, Tolk.dll, and if your going with the x86 drivers you'll also need dolapi32.dll, nvdacontrollerclient32.dll, and SAAPI32.dll.

-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : kianoosh via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector

Reply via email to