Re: small python questions

2020-09-07 Thread AudioGames . net Forum — Developers room : Ty via Audiogames-reflector
Re: small python questions I personally think for this to even be considered as a sticky topic, it should involve more than Python, which, by the way, most questions are probably just a Google away, and probably would be aside from BGT and PureBasic. URL: https://forum.audiogames.net/post

small python questions

2020-09-07 Thread AudioGames . net Forum — Developers room : Simter via Audiogames-reflector
small python questions Hi.I thought i'd create this topic for smaller questions regarding python. I, for my part, was a lot of times in the situation where i had such a little problem that i didn't want to post another topic, so i thought this would be a good idea, also it could

Re: 2 python questions

2019-12-01 Thread AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
Re: 2 python questions Multi-threading is one answer, another solution for a non-blocking console can be found [here] using msvcrt:import msvcrt num = 0 done = False while not done: print(num) num += 1 if msvcrt.kbhit(): print "you pressed",msvcrt.getch()

Re: 2 python questions

2019-12-01 Thread AudioGames . net Forum — Developers room : Hijacker via Audiogames-reflector
Re: 2 python questions With the help of Cython it is possible to achieve real multithreading in Python. It is more complicated however. But the simple multithreading Python itself provides should be enough to support data processing while waiting for input just fine.Best Regards.Hijacker

Re: 2 python questions

2019-11-30 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
Re: 2 python questions A little side note: Pythons multithreading is not 'multithreading' as it is typically defined as. In a truly multithreaded application, you have multiple threads running concurrently with only locks and other synchronization mechanisms ensuring that data races don't

Re: 2 python questions

2019-11-30 Thread AudioGames . net Forum — Developers room : simter via Audiogames-reflector
Re: 2 python questions @4 and 5, thanks. I changing title already worked as expected. URL: https://forum.audiogames.net/post/481509/#p481509 -- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo

Re: 2 python questions

2019-11-30 Thread AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: 2 python questions As to the second question, yes you can. The question isn't how to do it, but how to deal with the simple fact, that two things are going on at once - firstone being tracking stdin, second your script's work.I could give you few examples, how it could be done

Re: 2 python questions

2019-11-30 Thread AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: 2 python questions As to the second question, yes you can. The question isn't how to do it, but how to deal with the simple fact, that two things are going on at once - firstone being tracking stdin, second your script's work.I could give you a few examples, how it could be done

Re: 2 python questions

2019-11-30 Thread AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: 2 python questions As to the second question, yes you can. The question isn't how to do it, but how to deal with the simple fact, that two things are going on at once - firstone being tracking stdin, second your script's work.I could give you a few examples, how it could be done

Re: 2 python questions

2019-11-30 Thread AudioGames . net Forum — Developers room : Ty via Audiogames-reflector
Re: 2 python questions @simter here is how you give a console a title in python 3. If you're using two I can convert it to 2 for you.import ctypesctypes.windll.kernel32.SetConsoleTitleW("Console") URL: https://forum.audiogames.net/post/481453/#p481453 -- Audiogames-reflect

Re: 2 python questions

2019-11-30 Thread AudioGames . net Forum — Developers room : Ty via Audiogames-reflector
Re: 2 python questions @1 I think you need a module for changing the console title. I know it's doable, but i'm not sure how. Let me do some searching and get back to you on that.In regards to your second question, I don't believe so.@2 He asked about python, not pb. URL: https

Re: 2 python questions

2019-11-30 Thread AudioGames . net Forum — Developers room : rory-games via Audiogames-reflector
Re: 2 python questions as to your second question, I know it's doable in pure basic, but it is slightly tedious. URL: https://forum.audiogames.net/post/481411/#p481411 -- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com

2 python questions

2019-11-30 Thread AudioGames . net Forum — Developers room : simter via Audiogames-reflector
2 python questions Hi. I was wanting to make a small game in py. It should take place in command line. How ever i have 2 questions.1. How do i change the console title? It's always just the file path and i know that pb has some function to fix that.2. Can i make input without causing

Re: Some Python Questions

2017-04-17 Thread AudioGames . net Forum — Developers room : Blademan via Audiogames-reflector
Re: Some Python Questions I agree with Hektor.If you intend to write code and don't feel like rewriting, trying to recover deleted files and otherwise dealing with code that you didn't back up, then you need a version control system. I recommend git. As mentioned above you probably have

Re: Some Python Questions

2017-04-16 Thread AudioGames . net Forum — Developers room : Hektor via Audiogames-reflector
Re: Some Python Questions You probably can just install over the previous version since you are just talking about installing a minor release update.  Pip is typically installed when you install Python.  To access PIP from the command line, one method is to press Windows Key+R

Re: Some Python Questions

2017-04-12 Thread AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
Re: Some Python Questions Formatting characters like those are more for inserting variables into strings, this can be useful if you want to input changing numbers or text into a static string. For example:import random number = random.randint(0,100) print "%i is a random number"

Re: Some Python Questions

2017-04-12 Thread AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
Re: Some Python Questions Formatting characters like those are more for inserting variables into strings, this can be useful if you want to input changing numbers or text into a static string. For example:import random number = random.randint(0,100) print "%i is a random number"

Re: Some Python Questions

2017-04-12 Thread AudioGames . net Forum — Developers room : Guitarman via Audiogames-reflector
Re: Some Python Questions HelloWell I'm doing well with learning python but I ran into a couple more questions.I was writing code, learning how to use variables. I got into strings, and the book said something about using python formatting characters. The ones I used were %s, %r, and %d

Re: Some Python Questions

2017-04-10 Thread AudioGames . net Forum — Developers room : Hrvoje via Audiogames-reflector
Re: Some Python Questions There's Python 2 to 3 convert script if you really need to feel the difference. However, once you get enough Python coding experience, you'll be able to transition to Python3 easily.Yep, the bad fact is that many libraries are still incompatible with Python3

Re: Some Python Questions

2017-04-08 Thread AudioGames . net Forum — Developers room : Guitarman via Audiogames-reflector
Re: Some Python Questions Hello.Thanks for all the posts! I appreciate hearing your thoughts and opinions. Yes Ethin I am using python 2, because learn python the hard way is written for python 2 and I want my code to match up with the book's examples to understand what I'm doing. I have

Re: Some Python QUestions

2017-04-07 Thread AudioGames . net Forum — Developers room : Hijacker via Audiogames-reflector
Re: Some Python QUestions Ethin wrote:@magurp244, you have a point. However, I do not see any reasons why we should still use it. The only reason I can think of is that there are still more libraries available for Python 2. The rift created by the two versions is quite good for us. If you

Re: Some Python QUestions

2017-04-07 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
Re: Some Python QUestions @magurp244, you have a point. However, I do not see any reasons why we should still use it. The only reason I can think of is that there are still more libraries available for Python 2. The rift created by the two versions is quite good for us. If you have read

Re: Some Python QUestions

2017-04-06 Thread AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
Re: Some Python QUestions Attempting to force people to switch won't make v3 more popular, and its not up to you or I to decide what version a person chooses to use given their current needs. The practical differences between the two versions are negligible so transitioning isn't

Re: Some Python QUestions

2017-04-06 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
Re: Some Python QUestions I sincerely hope you are not learning Python 2... because if you are, it's going to be a difficult transition for you when Python 2 is officially declared unsupported and deprecated (and, if I get my way, that will be soon). I say that because developers have

Re: Some Python QUestions

2017-04-05 Thread AudioGames . net Forum — Developers room : Guitarman via Audiogames-reflector
Re: Some Python QUestions Thanks. The way it was written in the book it seemed like I missed something somewhere. URL: http://forum.audiogames.net/viewtopic.php?pid=305923#p305923 ___ Audiogames-reflector mailing list Audiogames-reflector

Re: Some Python QUestions

2017-04-05 Thread AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
Re: Some Python QUestions Well you could delete the lines, but yes your idea is fine. Its fairly common for programmers to comment out code they don't want to necessarily delete in order to test segments or what have you. URL: http://forum.audiogames.net/viewtopic.php?pid=305909#p305909

Some Python QUestions

2017-04-05 Thread AudioGames . net Forum — Developers room : Guitarman via Audiogames-reflector
Some Python QUestions Hi.I'm making this topic because I am trying hard to learn python, and I am determined to succeed this time. So I don't have to create a new topic every time I have a question, I'm creating this so that whenever I have a programming question I can just post here

Re: Python Questions

2017-03-04 Thread AudioGames . net Forum — Developers room : superb via Audiogames-reflector
Re: Python Questions okay I installed accessible_output2. I get the error that says that %1 is not a valid win32 application. What do I do to fix this? URL: http://forum.audiogames.net/viewtopic.php?pid=300424#p300424 ___ Audiogames

Re: Python Questions

2017-03-03 Thread AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
Re: Python Questions To print a list without the brackets you can use this example:shopping = ['green eggs',1234,'ham',5678] print ', '.join(str(a) for a in shopping)Other than the aforementioned accessible_output2, libaudioverse, and [PyAL] , there's also [Pyglet]. For screen readers

Re: Python Questions

2017-03-03 Thread AudioGames . net Forum — Developers room : brian . kurosawa via Audiogames-reflector
Re: Python Questions But keep in mind that libaudioverse does have some audio problems, as i noticed on games that used it like the shooter engine and the new death match. I don't know if the developer fixed it successfully, but if not you could use PyAL. URL: http://forum.audiogames.net

Re: Python Questions

2017-03-03 Thread AudioGames . net Forum — Developers room : raven via Audiogames-reflector
Re: Python Questions for i in list: print(i)For sound, there's libaudioverse at https://github.com/camlorn/libaudioverseIt's just a pip install libaudioverse awayfor speech, there's accessible_output2, but you have to have to use the hg+ prefix, like this:pip install hg+http://hg.q

Re: Python Questions

2017-03-03 Thread AudioGames . net Forum — Developers room : superb via Audiogames-reflector
Re: Python Questions thanks. I have 2 more questions:1. How do you print the items in a list without the brackets that a list usually contains?2. What would be the best libraries for sound and screen reader usage in Python and sound usage, and what would be a good way to install them

Re: Python Questions

2017-02-28 Thread AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
Re: Python Questions Use can use the pickle module to pack and unpack lists, dictionaries, and other data for writing to a text document. Example:import pickle #write data def write(data,name): tmp = open(name,'w') pack = pickle.dumps(data) tmp.write(pack) tmp.close

Python Questions

2017-02-27 Thread AudioGames . net Forum — Developers room : superb via Audiogames-reflector
Python Questions Hello Guys. This is a topic where users can come and write about anything python-related--if they need help with something, or want to show off their skills--this is the place.So, let me get the ball rolling with a question:How do you write a high score to a file

Re: Some python questions.

2016-07-11 Thread AudioGames . net Forum — Developers room : jawharh via Audiogames-reflector
Re: Some python questions. Typ at the end of the script a = raw_input() URL: http://forum.audiogames.net/viewtopic.php?pid=267634#p267634 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https

Re: Some python questions.

2016-07-08 Thread AudioGames . net Forum — Developers room : cartertemm via Audiogames-reflector
Re: Some python questions. in reply to your first question, I think your dealing with a script that doesn't have any user interaction. If you press enter, the program will  run, but will stay active only until all the system operations have been completed.  I recommend  browsing

Some python questions.

2016-07-08 Thread AudioGames . net Forum — Developers room : momo7807 via Audiogames-reflector
Some python questions. Hi everyone.I need your help in python.1. Whenever I write a program, my window just disappears instantly. It means that, if I run my program, a program window appears and disappears after 3 seconds, even before I test the program. How can I solv this?When I did

Re: Some python questions

2016-06-23 Thread AudioGames . net Forum — Developers room : superantoha via Audiogames-reflector
Re: Some python questions Hi.How are you trying to install the packages?I never had any problems installing them from pypi using pip. URL: http://forum.audiogames.net/viewtopic.php?pid=265533#p265533 ___ Audiogames-reflector mailing list

Re: Some python questions

2016-06-22 Thread AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
Re: Some python questions According to this bug report filed almost a month ago, it seems pefile's Python 3.x support was recently added and is still a bit buggy, which may be related to your issue. One of the posters linked to a possible fix:stephenrauch commented 23 days agopefile

Re: Some python questions

2016-06-22 Thread AudioGames . net Forum — Developers room : momo7807 via Audiogames-reflector
Re: Some python questions Thanks very much I figured that out. But I got another question. I've ried install pefile because pefile is required for pyinstaller. But I had an error message telling that the code can't decode position 208000 bla bla bla bla. How can I solv this problem?Thanks

Re: Some python questions

2016-06-22 Thread AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
Re: Some python questions You can download an installer for pywin32 off source forge, here's the download for the 32 bit and 64 bit version for Python 3.5:Pywin32x32Pywin32x64 URL: http://forum.audiogames.net/viewtopic.php?pid=265476#p265476

Re: Some python questions

2016-06-22 Thread AudioGames . net Forum — Developers room : momo7807 via Audiogames-reflector
Re: Some python questions I can't install cx_freeze I've encountered an error that a .tat file is missing and I don't know how to find the file.And, what is the easiest way to install pywin32 on python 3.5.1, without visual studio?When I tried that, I got an error telling that join

Re: Some python questions

2016-06-21 Thread AudioGames . net Forum — Developers room : Dino via Audiogames-reflector
Re: Some python questions I was just trying to do this yesterday. What I worked out was that using cx_Freeze, an alternate program to Pyinstaller, worked without modification. Maybe try this and see if it works any better.Link to downloadLink to documentation URL: http

Some python questions

2016-06-21 Thread AudioGames . net Forum — Developers room : momo7807 via Audiogames-reflector
Some python questions Hello.I'm using python 3.5.1, and there are many modules that you can't install on python 3 environment, especially if you have the latest version. I wanna try pyinstaller, and it doesn't work without modification so I'm making some modifications to make pyinstaller