Re: python question

2020-07-20 Thread AudioGames . net Forum — Developers room : zywek via Audiogames-reflector


  


Re: python question

Ahh, it looks nice.Thanks.

URL: https://forum.audiogames.net/post/554123/#p554123




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: python question

2020-07-20 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: python question

You can write your code like this.  Note that this won't actually run, it's just showing you the idea:import sound
import keyboard
import player

class Game:
def __init__(self):
self.sound_engine = sound.SoundEngine()
self.keyboard = keyboard.KeyHandler()
self.player = player.Player(sound_engine = self.sound_engine, keyboard=self.keyboard)

def tick():
# do stuff to run the level.
self.player.tick()
self.sound_engine.update()
self.keyboard.handle_key_events()And player might look like this:class Player:
def __init__(self, sound_engine, keyboard):
self.keyboardf = keyboard
self.sound_engine = sound_engine
self.keyboard.register("up_arrow", self.forward)
self.keyboard.register("down_arrow", self.backward)

def forward(self):
self.moving_forward = True
self.moving_backward = False

def backward(self):
self.moving_forward = False
self.moving_backward = True

def tick(self):
if self.moving_forward:
self.position += 1
elif self.moving_backward:
self.position -= 1You can do similar other things like maintain lists of objects on Game, and pass the objects whatever they need when you create them.  There's lots of other ways of handling globals too.

URL: https://forum.audiogames.net/post/554112/#p554112




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: python question

2020-07-20 Thread AudioGames . net Forum — Developers room : zywek via Audiogames-reflector


  


Re: python question

So in your opinion passing something as parameter is enough as I need?I didn't see any code which operate on the same parts of code which is not reinitialized or initialized again, thus duplicated..

URL: https://forum.audiogames.net/post/554111/#p554111




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: python question

2020-07-20 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: python question

Circular imports are bad in any language. Just because you can doesn't mean you should.  Learn to fix this, not how to hack around it.You can do this in something like PHP because PHP doesn't have a proper package system, which introduces other problems.  You can do this in C++ because C++ is very old, and when it was first written they didn't have the computing power to have a proper package system.  Also, C++ requires a bunch of extra things to make it work.  In most modern languages you can't do it, and C++ and PHP don't think it's a good thing to do either.You need to learn how to write code that splits concerns up so that you don't have to do it this way.  Globals are only a good idea for very small programs.  When you use a global, you make it so that you have to think about the whole program all the time, even if it's larger than an entire bookshelf of novels.  The oint of passing parameters around is that when you read the function, you only have to be concerned with the function you're reading, not everything everywhere that might have touched the globals.  it lets you see where data comes from and where data is going, without having to memorize everything.I've worked on multiple 10 line codebases.  They get away without globals.  You can too.But either way, doing what gettext does will take as much work as just fixing your code.  What gettext does isn't about having a global, it's about working well with automated tools that can figure out which strings from your program will need translating without having to run the program.

URL: https://forum.audiogames.net/post/554107/#p554107




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: python question

2020-07-20 Thread AudioGames . net Forum — Developers room : zywek via Audiogames-reflector


  


Re: python question

I can pass something as parameters, but it's stupit. What is the logical explanation it's not possible in python. I can define something in php, something in c++ and it works. Not in python.

URL: https://forum.audiogames.net/post/554069/#p554069




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: python question

2020-07-20 Thread AudioGames . net Forum — Developers room : Hijacker via Audiogames-reflector


  


Re: python question

So take those situations as a challenge to find new and more appropriate way to handle those problems instead of solving them with more global variables.

URL: https://forum.audiogames.net/post/554053/#p554053




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: python question

2020-07-20 Thread AudioGames . net Forum — Developers room : zywek via Audiogames-reflector


  


Re: python question

I'm not importing gettext as the first module, I'm installing language and then defining a _ variable and it works as i wrote in first post.So I don't know, what i'm doing wrong. Sometimes I need to import file which contains variables, which have to be available in all submodules, and something "circular import" except.I'm  not a good programmer I know, but in my opinion, sometimes global variables available somewhere are required.

URL: https://forum.audiogames.net/post/554052/#p554052




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: python question

2020-07-20 Thread AudioGames . net Forum — Developers room : Hijacker via Audiogames-reflector


  


Re: python question

You can actually do the same thing gettext does, you can define something that will be globally available to all your submodules, theoretically. It is possible, but not just bad coding style, but, als Camlorn already said, its most likely to cause problems later on. If you really need globals, build a separate module around those, maybe even a static class, if you want to take the OOP-only route.Best Regards.Hijacker

URL: https://forum.audiogames.net/post/554035/#p554035




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: python question

2020-07-19 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: python question

You can't do what gettext does.  It's also not doing what you think.  I would have trouble explaining how this is possible to an experienced Python programmer, but it's not making a global variable.The manual for gettext doesn't assign to _ and tells you to call gettext.install() or something like that.  You should read the official documentation.  You will also need to make sure that import gettext is the first import statement at the top of main.py and that you configure gettext before importing other modules, or this will probably break.

URL: https://forum.audiogames.net/post/553916/#p553916




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: python question

2020-07-19 Thread AudioGames . net Forum — Developers room : zywek via Audiogames-reflector


  


Re: python question

So only gettext can do this magic thinks? Or can i define variables available in all submodules without importing anything?

URL: https://forum.audiogames.net/post/553880/#p553880




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: python question

2020-07-19 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: python question

I had to look this up, so congratulations on stumping me.  Gettext can do some magic stuff that lets it hook into things you should never hook into.  Don't try to duplicate it, it's very bad practice and will likely lead to bugs, and I can't even find complete documentation on it despite knowing roughly where and what to look for.basically there's a special magic way to make functions look like they're language built-ins.  _ isn't a global.  It sort of puts itself in the same category as something like range or open, if that makes sense.

URL: https://forum.audiogames.net/post/553872/#p553872




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


python question

2020-07-19 Thread AudioGames . net Forum — Developers room : zywek via Audiogames-reflector


  


python question

Hello. I have a question.When i define_ = gettext.gettextin main.py, so I can use _("Text to translate") in all imported submodules without importing gettext in each other.But when I definep = lucia.audio_backend.SoundPool()i have to import p from globals or something.What is the difference between _ and p defined in the same file?

URL: https://forum.audiogames.net/post/553870/#p553870




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Image Module In python Question

2020-05-11 Thread AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector


  


Re: Image Module In python Question

The declarations may be case sensitive, so you may need to import PIL in all caps, Image with a capitol I, etc. From the examples the declarations of opening a file would look like this:from PIL import Image

img = Image.open("your_image.jpg")
img.show()There are some examples [here], [here], and [here] that have more on how to use Pillow.

URL: https://forum.audiogames.net/post/528337/#p528337




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Image Module In python Question

2020-05-11 Thread AudioGames . net Forum — Developers room : Thatguy via Audiogames-reflector


  


Image Module In python Question

Hey everybody:Recently, I have been experiencing a lot of difficulty with python's pil library. I'm just really not sure why it's not working like it should. Here's what's up.So I try to import pil by typing:import pilBut apparently there is no module called pil, so I tried:pip install pillowand then imported it again. And again, python couldn't seem to figure out where pil was. So I did some research and figured out that you can try import imageinstead. So I got image imported, but now when I try to actually open a jpg file, I get an error that module image has no attribute open. The only solution to this problem I could find online was to import image plus my other libraries in a specific order, but I have no other imports. My program is this:import imageimage.open("picture_path")This is kind of annoying. Has anyone else ever experienced this problem, and if so, would you mind telling me if/how you got around it?Thank you very much.

URL: https://forum.audiogames.net/post/528281/#p528281




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: python question

2020-03-05 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: python question

Also if you don't launch it from a command prompt but instead by clicking on the file, and if the text finishes writing before your screen reader can see that window, it won't autoread there either unless the program prints more text because the screen reader hasn't managed to start watching the window yet.Despite what @4 is saying, launching Python from a command prompt solves many more issues than it causes, and since I have heavily used Python for years including with dlls, I suspect @4's problem is context specific anyhow.So I would really start with that and see how many of your problems go away.

URL: https://forum.audiogames.net/post/506456/#p506456




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: python question

2020-03-05 Thread AudioGames . net Forum — Developers room : Ty via Audiogames-reflector


  


Re: python question

Hit NVDA + 5 and make sure speak dynamic content changes is on

URL: https://forum.audiogames.net/post/506444/#p506444




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: python question

2020-03-05 Thread AudioGames . net Forum — Developers room : Ty via Audiogames-reflector


  


Re: python question

@5 I myself use WXPython. Do *not* use TKinter, it is not accessible, but wxpython works fine for me

URL: https://forum.audiogames.net/post/506436/#p506436




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: python question

2020-03-04 Thread AudioGames . net Forum — Developers room : arturminyazev via Audiogames-reflector


  


Re: python question

helloi solved the problem, i started saving files in utf8 encoding.but i have an other problem: when i'm opening programs, nvda reads c:\path_to_python\python.exe terminal, and nothing else, and i must use num7 and num9 to read whats written here

URL: https://forum.audiogames.net/post/506399/#p506399




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: python question

2020-03-04 Thread AudioGames . net Forum — Developers room : arturminyazev via Audiogames-reflector


  


Re: python question

helloi solved the problem, i started saving files in utf8 encoding.

URL: https://forum.audiogames.net/post/506399/#p506399




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: python question

2020-03-04 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: python question

@7Interesting; I've never seen that particular issue. I believe if you use CFFI or Cython this is solved for you, because Python passes the right flags to LoadLibraryEx when loading C extension modules though.  I could be wrong, but I've done stuff with dlls before (i.e. the huge amount of Libaudioverse magic) and it hasn't been an issue.Even so, having to press 3 or 4 extra keys to edit every file...no thanks. Most projects are easily dozens of files, and you're only ever launching one.

URL: https://forum.audiogames.net/post/506192/#p506192




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: python question

2020-03-04 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: python question

@7Interesting; I've never seen that particular issue. I believe if you use CFFI or Cython this is solved for you, because Python passes the right flags to LoadLibraryEx when loading C extension modules though.  I could be wrong, but I've done stuff with dlls before (i.e. the huge amount of Libaudioverse magic) and it hasn't been an issue.Even so, having to press 3 or 4 extra keys to edit every file...no thanks.

URL: https://forum.audiogames.net/post/506192/#p506192




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: python question

2020-03-04 Thread AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector


  


Re: python question

@4, not true at all. Python file association comes in very handy.If I have a module that uses a DLL within my directory, typing "python script.py" will raise an error saying that the DLL cannot be found. However, typing "script.py" gets rid of this issue if you have association on.There is a work around for if you don't want association to be on (you just need to scan through my topics to find it), but I digress.@5, I am not sure, but browsing a couple pages back should yield your answer. In particular, WX and PyQT5 may be an option for accomplishing your desire. I have no experience with any of those libraries, though, so I cannot provide anymore information.

URL: https://forum.audiogames.net/post/506179/#p506179




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: python question

2020-03-04 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: python question

@5I don't know anything about easygui but NVDA is using WXPhoenix.  If you want more info than that I suggest a separate thread.

URL: https://forum.audiogames.net/post/506178/#p506178




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: python question

2020-03-04 Thread AudioGames . net Forum — Developers room : ambro86 via Audiogames-reflector


  


Re: python question

Hello to all. I take advantage of the post to ask a question about Python and graphical interfaces. Can anyone point me to a way to develop accessible graphical interfaces? Somewhere I read that with easygui you can do it, but how?Thank you.

URL: https://forum.audiogames.net/post/506176/#p506176




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: python question

2020-03-04 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: python question

First: I'm assuming that you're talking about clicking on your .py files, not python.exe itself.  If Python.exe itself is immediately closing you have a different class of problem.You need to open a command prompt and run Python from there.  Python myfile.py.  If Python isn't on your path, you may need to go into control panel and add it.  This will print the error.  The problem you're having is that if a program which uses the terminal immediately exits, it's closing before you can read it.I always run Python from the terminal manually, and have changed the Python file association to Notepad++.  You can only get away with clicking on .py files to run them as long as everything is 100% okay.  Otherwise you get something like this when it errors and can't tell what's wrong without already being in a terminal, so it's kinda useless to have .py files associated with python.exe.

URL: https://forum.audiogames.net/post/506169/#p506169




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: python question

2020-03-04 Thread AudioGames . net Forum — Developers room : Ty via Audiogames-reflector


  


Re: python question

Is it python 2 or 3 on the school computers? That does make a difference, especially if it's a console app or uses lots of older libsIf it's console, print "Hello world!"becomes print("Hello world!")andname = raw_input("Type your name.")becomesname = input("Please type your name.")Also maybe there are some errors in your code, try adding these lines to the top of the fileimport sysf2 = open("Errors.log", "a")sys.stderr = f2This writes tracebacks that aren't shown in the console in a file

URL: https://forum.audiogames.net/post/506163/#p506163




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: python question

2020-03-04 Thread AudioGames . net Forum — Developers room : ambro86 via Audiogames-reflector


  


Re: python question

Hi, you probably have version 2.7 on one computer and the latest version on the other? Because if so, some instructions change. For example:Python 2.7print "Hello!"Version 3 or higherprint ("Hello!")That is, from version 3, brackets must also be inserted.Another change is that in version 2.7 the raw_input function is used to request input from the user, while in version 3 the simple input is used. Exampleage = input ("Insert your age:")Cheers.

URL: https://forum.audiogames.net/post/506154/#p506154




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


python question

2020-03-04 Thread AudioGames . net Forum — Developers room : arturminyazev via Audiogames-reflector


  


python question

helloi'm beginner at programming, i started learning python at school 2 weeks ago, and on school's computers i wrote some symple  programs, and it works fine, but i can't launch it on my laptop, i installed latest python release, and, the program immediately closes, when i'm pressing enter on it like i have some errors in code but on school computers all works fine.what i can do?

URL: https://forum.audiogames.net/post/506119/#p506119




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: newbie python question

2019-11-20 Thread AudioGames . net Forum — Developers room : jfayre via Audiogames-reflector


  


Re: newbie python question

Ok, can anyone give me an idea how to use the timer in Lucia? I can import it, but can't figure out how to actually start an instance of a timer. There doesn't seem to be any documentation for the timer utility.

URL: https://forum.audiogames.net/post/478501/#p478501




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: newbie python question

2019-11-20 Thread AudioGames . net Forum — Developers room : jfayre via Audiogames-reflector


  


Re: newbie python question

Brilliant! I actually didn't know about Lucia. I'm downloading it now. This might do exactly what I need.

URL: https://forum.audiogames.net/post/478472/#p478472




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: newbie python question

2019-11-20 Thread AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector


  


Re: newbie python question

Number two's approach would work, but there is an easier way of doing it, at least for me. If you haven't heard, an engine called Lucia has made it's appearance on the forum. The engine offers both speech and timer capabilities, though speech uses accessible_output 2.If you don't want to bother with Lucia, there are always my guides in the articles room which cover the same things (I believe part 2 hits timers and speech). You still end up using accessible_output 2, but it is up to you if you even need to show the game window.While AO is no longer being updated (to my knowledge), it is a solid and error-free solution to text to speech. It also comes with the benefit of cross-platform functionality, though I suspect that you do not really care for that part. Still, something to keep in mind for the future.Hope this was helpful. For being a newbie, you sure have accomplished a lot, much more than a lot of folks around here who are getting started with the language have.

URL: https://forum.audiogames.net/post/478440/#p478440




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: newbie python question

2019-11-20 Thread AudioGames . net Forum — Developers room : Hijacker via Audiogames-reflector


  


Re: newbie python question

Easy solution. Just use one and the same single-threaded loop for your checks/message output and don't use an actual sleep command. You just have two variables which contain the time you want to check next:import time

def main():
  next_check_flaps = time.time() + (10*60*1000) # 10 minutes from now in milliseconds
  next_check_city = time.time() + (5*60*1000) # 5 minutes from now in milliseconds

  while True:
now = time.time()

if now > next_check_flaps:
  # tell me the flaps
  next_check_flaps = now + (10*60*1000)
if now >= next_check_city:
  # tell me the city
  next_check_city = now + (5*60*1000)

time.sleep(100) # you need to sleep a bit to prevent intense CPU usage, but not too long, at least 10 ms i'd recommend
# do consider some alternative way to stop this loop, and try to incorporate that directly into the head condition of the loop, writing endless loop from the start isn't recommendedBest Regards.Hijacker

URL: https://forum.audiogames.net/post/478398/#p478398




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


newbie python question

2019-11-20 Thread AudioGames . net Forum — Developers room : jfayre via Audiogames-reflector


  


newbie python question

Hi all,I am very new to coding in Python, so I apologize if my questions are extremely obvious.For the past few months, I've been working on a python script which interfaces with Microsoft Flight Simulator or Prepar3d. The add-on tells you the nearest city to your aircraft's position. I'm also adding some functionality to read out some aircraft instrumentation such as flap positions.Here is my problem. The script reads out the position of the nearest city every 10 minutes. In addition to this, I want to be able to monitor various instruments on the aircraft and output any changes in real time. So, I need a second loop to be running that isn't affected by the 10 minute sleep time between position announcements.In researching this, I think that the threading module would do what I need. I now have a version that will read flap positions when they change.The trouble I'm running into is with TTS. I'm currently using the pyttsx3 library to do tTS output. I'm having trouble with what seems to be the engine not releasing itself between one thread and another. I also need to figure out how to handle if two tts announcements overlap each other. What is the recommended way to handle windows TTS in python and how can I handle concurrent messages?I know about the accessibleOutput2 module, but don't know if that's being maintained anymore.

URL: https://forum.audiogames.net/post/478380/#p478380




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: python question related to ren'py

2018-12-15 Thread AudioGames . net Forum — Developers room : zenothrax via Audiogames-reflector


  


Re: python question related to ren'py

Better ask on the renpy forums. Never used it.

URL: http://forum.audiogames.net/post/398896/#p398896




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


python question related to ren'py

2018-12-06 Thread AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector


  


python question related to ren'py

hi all, my question is reelly short and simple:for those of you who knows ren'py, and used it with python before, I already know how to create a variable in python with ren'py. but after creating and manapulating the variable from the python block, how can i access the variable in the python block using the ren'py engine? i hope any one can understand me atleest.

URL: http://forum.audiogames.net/post/397072/#p397072




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: Python question

2016-06-28 Thread AudioGames . net Forum — Off-topic room : magurp244 via Audiogames-reflector


  


Re: Python question

The 64bit 2.7 version is here.

URL: http://forum.audiogames.net/viewtopic.php?pid=266220#p266220





___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: Python question

2016-06-28 Thread AudioGames . net Forum — Off-topic room : leibylucwgamer via Audiogames-reflector


  


Re: Python question

@magurp244,THe Pywin32 installer only works with Python 3.5.  Is there a version that supports 2.7?Luke

URL: http://forum.audiogames.net/viewtopic.php?pid=266201#p266201





___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: Python question

2016-06-24 Thread AudioGames . net Forum — Off-topic room : kaigoku via Audiogames-reflector


  


Re: Python question

These are the basic instructions to run your Python script:1. In Windows, type Windows plus R for the Run Dialogue.2. In Windows, type "cmd" for the command line interface.3. In most operating systems, if environment variables are properly set, you can type:"python example.py"Obviously, don't include the quotes in your commands, and replace example.py with your script name.Hope this helps.

URL: http://forum.audiogames.net/viewtopic.php?pid=265678#p265678





___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: Python question

2016-06-22 Thread AudioGames . net Forum — Off-topic room : wanderer via Audiogames-reflector


  


Re: Python question

Either run it from the Windows console like this:py Or use the interactive prompt, which you can either access from the start menu, or, as of python 3.something, just type "python" from anywhere in a console window. Personally I think IDEs are kind of overrated, especially if you're new to coding; it's better to get some knowledge of the command line up front as it can potentially give you a lot more control and make your life easier.

URL: http://forum.audiogames.net/viewtopic.php?pid=265478#p265478





___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: Python question

2016-06-22 Thread AudioGames . net Forum — Off-topic room : magurp244 via Audiogames-reflector


  


Re: Python question

Hm, I think this post may belong in the developer section, heh.Anyway, the default interpreter that comes with python called IDLE doesn't really play nice with screen readers unfortunately. There are other developers here who usually use either notepad or the command prompt for writing and running code. However, I did discover that the PythonWin interpreter seems to work with NVDA, although to view any text output you have to switch window views in it. Either way, you could give it a shot by installing Pywin32 64 bit version and see if it works for you.

URL: http://forum.audiogames.net/viewtopic.php?pid=265477#p265477





___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Python question

2016-06-22 Thread AudioGames . net Forum — Off-topic room : leibylucwgamer via Audiogames-reflector


  


Python question

Hi all:For those of you who have experience with this, I'm wondering how to use the Python interpreter from python.org.  I'm learning to code with Python, and am looking for a way to test some code offline.I'm obviously a noob at this, so I'm sorry if my terminology of "interpreter" isn't correct.I'm learning from Codecademy, which has been successful so far.  I can test online with the script editor built in to practice with the course, and I'm gleaning that if I just create a notepad document and rename the file extension to .py it'll be run by the interpreter.  Please let me know if I'm wrong.I'm running 3.5.1 on Win10.Any help would be greatly appreciated.Luke

URL: http://forum.audiogames.net/viewtopic.php?pid=265441#p265441





___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: python question

2015-10-14 Thread AudioGames . net Forum — Developers room : frastlin via Audiogames-reflector


  


Re: python question

Is python installed? because you should be typing:python setup.py install

URL: http://forum.audiogames.net/viewtopic.php?pid=234853#p234853





___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: python question

2015-10-14 Thread AudioGames . net Forum — Developers room : momo7807 via Audiogames-reflector


  


Re: python question

No, It didn't work.Command: Path c:\pyaudiogame0.04\pyaudiogame0.04Setup.py installResult: Error package directory pyaudiogame doesn't exist.I've changed the name of the directory to pyaudiogame, but it doesn't work.What should I do now? And Is there any way to create an audio based menu with other libraries? Without pyaudiogame.

URL: http://forum.audiogames.net/viewtopic.php?pid=234850#p234850





___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: python question

2015-10-14 Thread AudioGames . net Forum — Developers room : momo7807 via Audiogames-reflector


  


Re: python question

Yes, I'm using python 3.5.0. And python setup.py install works, but the problem is, It can't detect the correct directory.

URL: http://forum.audiogames.net/viewtopic.php?pid=234869#p234869





___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: python question

2015-10-14 Thread AudioGames . net Forum — Developers room : frastlin via Audiogames-reflector


  


Re: python question

Yes of coarse. You just need to create an iterator and assign it to move forward and back when the correct keys are pressed. Then when you hit enter, a callback function runs.accessible_output2 is the package that makes the speech.http://hg.q-continuum.net/accessible_output2/

URL: http://forum.audiogames.net/viewtopic.php?pid=234852#p234852





___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: python question

2015-10-13 Thread AudioGames . net Forum — Developers room : frastlin via Audiogames-reflector


  


Re: python question

You should be putting everything into C:\users\yourname\someFolderNameor c:\SomeFolderNameBecause1. python doesn't like names with spaces and2. anything in program files won't work.Panda3d is active and so is pyglet

URL: http://forum.audiogames.net/viewtopic.php?pid=234773#p234773





___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: python question

2015-10-08 Thread AudioGames . net Forum — Developers room : severestormsteve1 via Audiogames-reflector


  


Re: python question

Firstly you may not want to store that in the temp directory; Those files get deleted.

URL: http://forum.audiogames.net/viewtopic.php?pid=234269#p234269





___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: python question

2015-10-08 Thread AudioGames . net Forum — Developers room : momo7807 via Audiogames-reflector


  


Re: python question

HiFirst, python setup.py install doesn't work. So I typed this.Path c:\temp\pyaudiogame-0.04\pyaudiogame-0.04Then, I typed setup.py install.But it couldn't detect the pyaudiogame directory.But I've installed all the requirements using this method. What should I do next?And how to create a audio based menu using other modules? I can use pygame or pyglet, but I think it has been discontinued. Any other active game development libraries?Thanks

URL: http://forum.audiogames.net/viewtopic.php?pid=234265#p234265





___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: python question

2015-10-08 Thread AudioGames . net Forum — Developers room : momo7807 via Audiogames-reflector


  


Re: python question

No, I've created a new folder called temp. So it's not an actual temp directory.

URL: http://forum.audiogames.net/viewtopic.php?pid=234327#p234327





___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: python question

2015-10-08 Thread AudioGames . net Forum — Developers room : momo7807 via Audiogames-reflector


  


Re: python question

HiOne more question. How can I allow command line to acces everything I want? When I attempt to install something, It sometimes displays a permission error. I'm using the admin account in my windows, And I have only 1 account. What should I do?Thanks

URL: http://forum.audiogames.net/viewtopic.php?pid=234340#p234340





___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: python question

2015-10-07 Thread AudioGames . net Forum — Developers room : frastlin via Audiogames-reflector


  


Re: python question

pyaudiogame comes with a prebuilt python installed, so you should use that. Otherwise:You don't do anything with the folder. You download the zip file, unzip it, go into the requirements folder, and go into each folder in there. While you are in the folder where each package's setup.py is, you open up a prompt there and type:python setup.py installand it will install everything. Once you have installed all the requirements, then you can do the same with pyaudiogame.But I would really suggest going to:http://learnpythonthehardway.org/book/and going through that tutorial. It is way more developed than the pyaudiogame tutorial is and you will learn about packages directly from there.

URL: http://forum.audiogames.net/viewtopic.php?pid=234185#p234185





___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: python question

2015-10-05 Thread AudioGames . net Forum — Developers room : momo7807 via Audiogames-reflector


  


Re: python question

HiSo I solved the problem, but I've encountered another problem.When I run the setup.py install, It doesn't detect the pyaudiogame directory, So I got this error.Error packige directory pyaudiogame does not exist.I've extracted the pyaudiogame and I've set path to the right directory. What should I do?Thanks

URL: http://forum.audiogames.net/viewtopic.php?pid=233946#p233946




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: python question

2015-10-05 Thread AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector


  


Re: python question

If you are in the correct directory, and you have the file association that runs .py files with python, try:setup.py installI haven't tried pyaudiogame, but this usually works.

URL: http://forum.audiogames.net/viewtopic.php?pid=233833#p233833




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

python question

2015-10-04 Thread AudioGames . net Forum — Developers room : momo7807 via Audiogames-reflector


  


python question

Hi all.So I want to start very basic of python, but I don't know how to install pyaudiogame.I typed python setup.py install but python couldn't find the setup.py file. what should I do?Thanks

URL: http://forum.audiogames.net/viewtopic.php?pid=233828#p233828




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector