Re: python help.

2020-10-11 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: python help.

Or throw input() at the end, and it won't shut down until you hit enter.But in general you need to be running programs from a command prompt anyway because that's the only way to see errors, at least unless you know enough to set up and use a logging framework and such, which you probably don't want to do even if you did know how.

URL: https://forum.audiogames.net/post/579459/#p579459




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


Re: python help.

2020-10-11 Thread AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector


  


Re: python help.

make sure that you run the code in the command prompt, then it will say all the numbers... but a simple while loop should do the job

URL: https://forum.audiogames.net/post/579432/#p579432




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


python help.

2020-10-11 Thread AudioGames . net Forum — Developers room : moaddye via Audiogames-reflector


  


python help.

So, this is not a help me to learn python thread. What I want to know is, if I make a simple program that counts to 10, is there a way I could run it in a way where it doesn't just like display a blank screen, do 1 10 and then shutdown sometimes without even speaking? I don't have the code right now, but the blank thing just annoys me.

URL: https://forum.audiogames.net/post/579426/#p579426




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


Re: Python help!

2020-04-14 Thread AudioGames . net Forum — Developers room : Cerulean via Audiogames-reflector


  


Re: Python help!

I see this is a very old post, but people often search the forums with questions like this. My friend over at nathantech.net has made a really nice audio tutorial on coding in python. I personally recommend this as it helped me get started. https://nathantech.net/products/tutorials/index.php

URL: https://forum.audiogames.net/post/519532/#p519532




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


Re: python help.

2017-04-13 Thread AudioGames . net Forum — Developers room : Kyleman123 via Audiogames-reflector


  


Re: python help.

he doesn't really say in the documentation to do this. you will need the prerelease if you wish to follow the documentation.

URL: http://forum.audiogames.net/viewtopic.php?pid=306914#p306914





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

Re: python help.

2017-04-13 Thread AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector


  


Re: python help.

so how do i use the pre?

URL: http://forum.audiogames.net/viewtopic.php?pid=306882#p306882





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

Re: python help.

2017-04-13 Thread AudioGames . net Forum — Developers room : raven via Audiogames-reflector


  


Re: python help.

--pre installs prereleases, source.--Pre gets you the latest version, usually a few commits behind the head of Master.--pre is recommended at this time because until 1.0, Camlorn's mostly going to release alphas.

URL: http://forum.audiogames.net/viewtopic.php?pid=306881#p306881





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

Re: python help.

2017-04-13 Thread AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector


  


Re: python help.

I just said pip install libaudioverse.i can not remember the exact spelling, but i did it. i can run some of mason's projects with python, and they use libaudioverse.

URL: http://forum.audiogames.net/viewtopic.php?pid=306877#p306877





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

Re: python help.

2017-04-11 Thread AudioGames . net Forum — Developers room : Blademan via Audiogames-reflector


  


Re: python help.

@Hektor.I'm confused, what about libaudioverse setup is difficult at all? The manual has examples, you can install the library with one command (pip install --pre libaudioverse), and if you don't understand something, you can ask the libaudioverse mailing list which is specifically for that purpose.While I agree that someone new to python might not want to try a full 3-d game for their first project (I'm a fairly experienced python coder and making my 3-d game has definitely caused me some head scratching), I don't believe libaudioverse is the cause of this; it's simply the considerations and choices you have to make as far as how your game will operate, how you will load and save maps and the map state, etc.If you know of specific considerations I've missed here concerning libaudioverse, please let me know - I'd also be happy to provide examples for those not sure how to do something with the library if I understand how 
 to do it.

URL: http://forum.audiogames.net/viewtopic.php?pid=306679#p306679





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

Re: python help.

2017-04-10 Thread AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector


  


Re: python help.

Hello all.I feel that i want to stick with python 2, because there are a lot of libraries for python 2.more than there is for python 3.Nvda is writen in python 2, yes, because i think that wxpython is still in development for python 3.and learnpythonthehardway.org is a very nice book to read. and i agree, a first programmer like me, will not use 3d audio in a game yet, altho i have libaudioverse and pyglet installed on my computer.thanks

URL: http://forum.audiogames.net/viewtopic.php?pid=306617#p306617





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

Re: python help.

2017-04-10 Thread AudioGames . net Forum — Developers room : Hrvoje via Audiogames-reflector


  


Re: python help.

Regarding LibAudioVerse and how hard or easy it is for beginners, you can't make game with 3D sound with no experience in programming at all. You really can't. There's no beginner friendly 3D library. OpenAl for Python as an alternative is even harder to use, as all functions are low-level type. As a beginner, you're best to go with 2D sound and Pygame. Don't use Pyglet, you'll get confused. Use Pygame as it's more beginner friendly, then after you get some experience you can try switching to Pyglet vs. Libaudioverse combination.And, regarding Python3, it certainly has some really nice features that I like, especially some implemented in 3.6, but compatibility with external libraries is still worse than with Python2. Therefore, it's quite normal that some devs don't wanna switch to or even recommend Python3.

URL: http://forum.audiogames.net/viewtopic.php?pid=306613#p306613





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

Re: python help.

2017-04-10 Thread AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector


  


Re: python help.

@GuirtarmanI don't think its a fear of moving forward, so much as how puerile and arbitrary he finds Python 3 to be. I won't get into it either, but if you feel so inclined do a bit of reading on the subject and decide for yourself.The other option would be PyAL or Pyglet if you want to expand its OpenAL bindings, you'd need to install OpenAL as well though, so maybe just as involved as libaudioverse. I do have some example scripts around though.

URL: http://forum.audiogames.net/viewtopic.php?pid=306612#p306612





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

Re: python help.

2017-04-10 Thread AudioGames . net Forum — Developers room : Hektor via Audiogames-reflector


  


Re: python help.

What are the other options for liaudioverse? I was looking at it earlier and I am not sure I would recommend using that library for a new python programmer. It looks like it is a good library for audio, but the setup is a bit involved for beginners.

URL: http://forum.audiogames.net/viewtopic.php?pid=306608#p306608





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

Re: python help.

2017-04-10 Thread AudioGames . net Forum — Developers room : Guitarman via Audiogames-reflector


  


Re: python help.

Hi.I did not know about this, I just saw an add on his website that said he was writing learn python 3.6. I don't want to read posts about how python 3 is bad, I will probably use it someday so I don't want to turn against it before I know anything about it. It's strange that he's so against python 3, maybe he's afraid of moving forward.I figure I'll stick with python 2 for now, because most of the programmers I've talked to say python 2 has at least 4 or 5 more years before it's taken out. I think nvda is written in python 2, although they might have upgraded it to python 3 after all this time.

URL: http://forum.audiogames.net/viewtopic.php?pid=306605#p306605





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

Re: python help.

2017-04-10 Thread AudioGames . net Forum — Developers room : Hektor via Audiogames-reflector


  


Re: python help.

If you do not have a lot of knowledge about python, this might be the best time to switch to using python 3. Most of the basics are similar. Is there anything particular you are looking for in a python tutorial?

URL: http://forum.audiogames.net/viewtopic.php?pid=306580#p306580





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

Re: python help.

2017-04-10 Thread AudioGames . net Forum — Developers room : Kyleman123 via Audiogames-reflector


  


Re: python help.

ZedShaw the author of LPTHW isn't going to python 3. Long story short, he hates it and tries to convince everyone its awful as well. That doesn't mean you should learn python 2 from him, but it is something to think about. I'll leave searching for his posts on why python 3 is evil incarnate up to you.

URL: http://forum.audiogames.net/viewtopic.php?pid=306558#p306558





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

Re: python help.

2017-04-10 Thread AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector


  


Re: python help.

Hello guitarman, i can do all of those things that you mesioned.then i m going to continue.

URL: http://forum.audiogames.net/viewtopic.php?pid=306501#p306501





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

Re: python help.

2017-04-10 Thread AudioGames . net Forum — Developers room : Guitarman via Audiogames-reflector


  


Re: python help.

Hello.Don't worry the free online version is for python 2.7. You can buy the book that's written for python 3 but you really don't need to. You can read the free book easily it sticks to python 2.7 so you have nothing to worry about.You said you don't know much about python. Well let me ask you. Can you print text to the screen? Can you make variables and perform operations on them? Can you use statements and loops to do things?If the answer is yes to all of these then you probably are at a good starting point. You might not be ready to write a masterpiece, but you would be off to a good start with python.

URL: http://forum.audiogames.net/viewtopic.php?pid=306492#p306492





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

Re: python help.

2017-04-09 Thread AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector


  


Re: python help.

Hello.My only problem is that i don't have a lot of knollage with python.i only have a little bit of knolage with BGT.But i don't think that i have enough knolage with python that i am able to write my own example python scripts.Is there any good python learning python options.i have heard about learnpytyhonthehardway.org, but i tried it.I am afraid that they are going to move to python 3, and i am still using python 2.7.13i don't want to switch python versions now, because i could almost say that i am more used to python 2 than i am to python 3.Thanks

URL: http://forum.audiogames.net/viewtopic.php?pid=306483#p306483





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

Re: python help.

2017-04-09 Thread AudioGames . net Forum — Developers room : Guitarman via Audiogames-reflector


  


Re: python help.

Hello Ashley.Oh that's right I forgot about soundrts and rs games. I've never played rs games. Sound rts is really cool although I did not know it was open source. Last time I saw it, it was a pyc file which is just a compiled python file. If rs games does have lag than I wouldn't use it as an example.I would suggest like hektor said, that you write and test your own code to see if it works properly. This has nothing to do with making audiogames, but if you want to get a little more familiar with python, read the free online version of learn python the hard way. It's easy to understand and it's what I'm using to teach myself python.Hth.

URL: http://forum.audiogames.net/viewtopic.php?pid=306449#p306449





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

Re: python help.

2017-04-09 Thread AudioGames . net Forum — Developers room : Hektor via Audiogames-reflector


  


Re: python help.

If you cannot find example code, another option is to write your own example code. If I am trying to learn how to use a framework and the code examples do not help, I will often write small little programs to try to learn pieces of the framework.

URL: http://forum.audiogames.net/viewtopic.php?pid=306444#p306444





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

Re: python help.

2017-04-09 Thread AudioGames . net Forum — Developers room : Kyleman123 via Audiogames-reflector


  


Re: python help.

RSGames is written in python 2.7. although, this game is really slow and laggy and i doubt you really want to base you code off of them. I'm not really sure if the lag is their algorithms or what, but its not good. also, soundRTS is written in python 2.7 I believe. that is a good game and open source. Rockwaters at http://rockywaters.co.uk writes all of his stuff in python. those games contain graphics and he has done a great job with his stuff.

URL: http://forum.audiogames.net/viewtopic.php?pid=306386#p306386





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

Re: python help.

2017-04-09 Thread AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector


  


Re: python help.

Thank you guitarman That you understand.I can maby find a few soft ware source codes, but they are not always accessable for the blind with screen readers. So i actualy want to try making audiogames.Thanks

URL: http://forum.audiogames.net/viewtopic.php?pid=306364#p306364





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

Re: python help.

2017-04-08 Thread AudioGames . net Forum — Developers room : Guitarman via Audiogames-reflector


  


Re: python help.

Hi Ashley.Well I was going to answer your questions but you got some really nice posts so that's good. Anyway, I don't know of too many source code games written in python. There was a fighting game called luta, that had it's source code included, butt that's gone as far as I know. The only other one I can think of is usa black jack, but the usagames sight is down so I don't know where to get black jack. It's possible i might have a copy of usa black jack, I'll take a look. I don't have a copy of luta, I know that for sure. If your looking for just general source code stuff there are a couple of sights that have small programs which are open source these will help you to learn. I'm new to this stuff too so I can understand what your going through.Hth.

URL: http://forum.audiogames.net/viewtopic.php?pid=306351#p306351





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

Re: python help.

2017-04-08 Thread AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector


  


Re: python help.

Thanks to all of you for your help.This rely helps me.I already have accessable_output 2 installed, and also for libaudioverse.Now my question is, Are there any example audiogames writen in any one of this librarys?If there are, can any one please give me a link to them?thanks.

URL: http://forum.audiogames.net/viewtopic.php?pid=306250#p306250





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

Re: python help.

2017-04-07 Thread AudioGames . net Forum — Developers room : Blademan via Audiogames-reflector


  


Re: python help.

My choices for the requirements you've described are as follows.Audio: The excellent libaudioverse library by camlorn, with the environment node and source nodes for 3-dimensional sound positioning.Screenreader output: accessible_output2 by ctoth.Keyboard, mouse, events and screen: The pyglet library. You didn't mention this in your original post, but you'll need it if you want to do an audiogame.networking: Twisted. Again, you didn't mention this but if you want anything that isn't single player you'll most likely need to talk to a server somewhere. Python of course has the built in socket and socket server modules, but twisted abstracts things away for you and handles corner cases.

URL: http://forum.audiogames.net/viewtopic.php?pid=306200#p306200





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

Re: python help.

2017-04-07 Thread AudioGames . net Forum — Developers room : Hijacker via Audiogames-reflector


  


Re: python help.

You'll have to use multiple libraries to achieve that. For screen reader support you could use accessible_output or Tolk or some of those libraries. For audio purposes I recommend libaudioverse, which is a bit complicated, but you can ask for help on this forum. But just don't forget that you'll need some framework which does the key handling and screen display for you, just use pygame or pyglet or some comparable package for your purposes.Best Regards.Hijacker

URL: http://forum.audiogames.net/viewtopic.php?pid=306181#p306181





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

python help.

2017-04-07 Thread AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector


  


python help.

Hello to all of you on the forum.I want to know the following:I want to make audiogames with python.I want them to have screen_reader surport, and i want sound positioning aswell, and i want the sound to pan.Whitch good library will work for me??I am using python 2.7.13I have tryed to use pyaudiogame, but it is not that good at all. it just has screen reading surport.I tryed audio-game-kit for python created by mason, but every time i run an example script, i get the error, no module named agk.misk.So please help if you can.thanks

URL: http://forum.audiogames.net/viewtopic.php?pid=306158#p306158





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

Re: Python Help Needed

2017-02-21 Thread AudioGames . net Forum — Developers room : tabutcu via Audiogames-reflector


  


Re: Python Help Needed

i thing python is a cool language.

URL: http://forum.audiogames.net/viewtopic.php?pid=298725#p298725





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

Re: Python Help Needed

2017-02-20 Thread AudioGames . net Forum — Developers room : stewie via Audiogames-reflector


  


Re: Python Help Needed

Regarding the filename part, are you specifying the name as a program parameter? If so, spaces could be breaking it.I'm not sure if the forum is removing part of the code, but that code should be throwing runtime errors.    with open("{}".format(filename), "rb") as infile:
        infile.read()The infile.read() here is redundant because .read() returns the entire content of the file as a string. This isn't allocated to anything so it will just read the file and do nothing. You don't really need to format a string here either since there isn't really any other text in the string, you can just call with open(filename, "r") as infile instead. Also binary and textfiles are different, I recommend just going with the default "r" file mode. This is actually default so you don't even need to specify the second parameter of "r".for line in file: your input file is named infile. The type of the file object is file, so that code is literally trying to iterate over the type object of a file.If you do for line in infile, you may end up with some strange blank lines and characters, I don't really know why. Python actually has a readlines method on file objects so you can just call lines = infile.readlines() for example then iterate through those.You can use .replace(original, replacement) to replace characters. This also lets you replace them with the empty string. So you can just do line.replace("%", "") to remove all instances of a % character in a string.

URL: http://forum.audiogames.net/viewtopic.php?pid=298647#p298647





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

Re: Python Help Needed

2017-02-20 Thread AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector


  


Re: Python Help Needed

Hm, well if thats the case then python may be having difficulty recognizing the path to the file. You can get the full path like so:os.path.join(os.path.abspath("."), "2of12inf.txt")Just use it when loading the file.

URL: http://forum.audiogames.net/viewtopic.php?pid=298626#p298626





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

Re: Python Help Needed

2017-02-20 Thread AudioGames . net Forum — Developers room : superb via Audiogames-reflector


  


Re: Python Help Needed

That's the purplexing part. It is in the same directory as my script: my desktop. Why else could I be getting that error?

URL: http://forum.audiogames.net/viewtopic.php?pid=298616#p298616





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

Re: Python Help Needed

2017-02-20 Thread AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector


  


Re: Python Help Needed

Running your script with a file called "2of12inf.txt" seems to run ok, which would mean that the file your trying to load is either misspelled or not in the same directory as the script thats trying to load it. There's a few problems with your approach as well, strip() will only remove characters at the beginning and end of a string, not at any other point inbetween. To solve this you can iterate over each character in the string and add it to a list, and check if it matches a percent character, skipping it if it does. When you use infile.read() it reads the file and returns it as a string that you can process, but if you don't store that return in a variable it will be lost. You should then iterate over that returned string instead of infile.

URL: http://forum.audiogames.net/viewtopic.php?pid=298608#p298608





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

Python Help Needed

2017-02-20 Thread AudioGames . net Forum — Developers room : superb via Audiogames-reflector


  


Python Help Needed

Hello guys. I have an error that I can't quite fix. I am trying to create a program that will do the following things as of now.1. open a file and read it.2. put all the file's information in a list.3. strip any percent characters from any words in the list.4. print the list's length. The problem that I get an IOError: no such file or directory (filename)here is my code below.If you could, don't write code corrections, as copying coding styles could easily get me a zero on this assignment I am doing for school. Tell me if you can, what is wrong in plain English and tell me roughly what I need to do to correct it.Thanks.code:def read_file(filename):    wordlist=[]    with open("{}".format(filename), "rb") as infile:        infile.read()        for line in file:           
  line.strip()            line.strip("%")            wordlist.append(line)    wordlist=set(wordlist)    print len(wordlist)read_file("2of12inf.txt")

URL: http://forum.audiogames.net/viewtopic.php?pid=298574#p298574





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

Re: bit of python help

2015-05-07 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: bit of python help

@Kyleman123, Modulo is a mathimatical term. It is the equivalent of a modulus, which is the base with respect to which a congruence is computed. It could also be The absolute value of a complex number. Either suits it. However, since were tlaking about both math, in the programming context it is a An operator placed between two numbers, to get the remainder of the division of those numbers.

URL: http://forum.audiogames.net/viewtopic.php?pid=215257#p215257




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

Re: bit of python help

2015-05-06 Thread AudioGames . net Forum — Developers room : frastlin via Audiogames-reflector


  


Re: bit of python help

You could also look at iterators from itertoolsThey are objects you call next on and it will alternate between 1 and 2.for example:import itertoolsl = [player1, player2, player3]iter = itertools.cycle(l)for i in range(5):  print(next(iter))result:player1player2player3player1player2

URL: http://forum.audiogames.net/viewtopic.php?pid=215060#p215060




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

Re: bit of python help

2015-05-01 Thread AudioGames . net Forum — Developers room : Genroa via Audiogames-reflector


  


Re: bit of python help

Oh sorry, the french word is modulo and I thought it was the same word Hm I didnt programed in python for more than a year, but when you want to play a turn, you play it, and at the end of the loop, before updating the player index (to know that you are playing the turn of the player 1 or 2), you do : current_player = (current_player+1) % player_nbplayer_nb being the number of players, current_player being the current player (the one which is playing). If you want to keep a track of the number of turns, you can keep a variable counting it. This way, the player which is playing is turn % player_nb .The module trick is assuming that the 0 result is for player 1, the 1 result for player 2, etc. Thats why it is so cool when it is used as the index of a list 

URL: http://forum.audiogames.net/viewtopic.php?pid=214515#p214515




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

Re: bit of python help

2015-05-01 Thread AudioGames . net Forum — Developers room : Kyleman123 via Audiogames-reflector


  


Re: bit of python help

hmm, im assuming by modulo you mean module?i understand i think, but could you provide an example?

URL: http://forum.audiogames.net/viewtopic.php?pid=214511#p214511




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

Re: bit of python help

2015-05-01 Thread AudioGames . net Forum — Developers room : Genroa via Audiogames-reflector


  


Re: bit of python help

Oh sorry, the french word is modulo and I thought it was the same word Hm I didnt programed in python for more than a year, but when you want to play a turn, you play it, and at the end of the loop, before updating the player index (to know that you are playing the turn of the player 1 or 2), you do : current_player = (current_player+1) % player_nbplayer_nb being the number of players, current_player being the current player (the one which is playing). If you want to keep a track of the number of turns, you can keep a variable counting it. This way, the player which is playing is turn % player_nb .The module trick is assuming that the 0 result is for player 1, the 1 result for player 2, etc. Thats why it is so cool when it is used as the index of a list I dont remember if lists index begins at 1 or 0 in python, but if they begin with 1 the calcul is : current_player = ((current_player+1) % player_nb)+1, same thing for the calcul using the turn variable 

URL: http://forum.audiogames.net/viewtopic.php?pid=214515#p214515




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

Re: bit of python help

2015-05-01 Thread AudioGames . net Forum — Developers room : Genroa via Audiogames-reflector


  


Re: bit of python help

Just a trick, instead of using a condition, you can use modulos You can also use players in a list, and ++ the index of this list for each turn, and again with a modulo to loop around it

URL: http://forum.audiogames.net/viewtopic.php?pid=214509#p214509




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

bit of python help

2015-05-01 Thread AudioGames . net Forum — Developers room : Kyleman123 via Audiogames-reflector


  


bit of python help

i am currently learning python. so as im getting fairly decent with it i thought it was time to start on a bit of a project. i am coding a monopoly game. this isnt really something i plan on releasing but if it turns out to be something really good, ill consider it.i have to major issues at this point. ive been working on a lot of the player methods currently. so here comes the questions.my board is a tuple i am using my player object instance attribute to move my to players along the board. however, once the number gets higher than the number of things in the board, 40, i get a tuple index is out of range error. how might a be able to loop it back and start again like the normal game loops around the board?secondly, are there any general practices to for alternating between players in a game? i kind of have something working in this regard, but it breaks half the time and thought Id ask here for any advice from any
  other more experienced pythonians.

URL: http://forum.audiogames.net/viewtopic.php?pid=214476#p214476




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

Re: bit of python help

2015-05-01 Thread AudioGames . net Forum — Developers room : dhruv via Audiogames-reflector


  


Re: bit of python help

Hi,First, you might be able to catch it with a try: except clause, but there are probably better solutions out there.Second, could I please get the code?  itll really help me learn python more.

URL: http://forum.audiogames.net/viewtopic.php?pid=214483#p214483




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

Re: bit of python help

2015-05-01 Thread AudioGames . net Forum — Developers room : dhruv via Audiogames-reflector


  


Re: bit of python help

Hi,First, you might be able to catch it with a try: except clause, but there are probably better solutions out there.Second, could I please get the code?  itll really help me learn python mre.

URL: http://forum.audiogames.net/viewtopic.php?pid=214483#p214483




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

Re: bit of python help

2015-05-01 Thread AudioGames . net Forum — Developers room : Kyleman123 via Audiogames-reflector


  


Re: bit of python help

ive seen try statements around and i had to look up specifically what they were and stuff. ill see what i can do with that.ill probably will eventually post my code, but its in no state to be shown to anyone. at this point, its split into several different files according to different parts of the game so i can run tests on new code easier. ill probably want to add comments and stuff before posting as well.

URL: http://forum.audiogames.net/viewtopic.php?pid=214498#p214498




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

Re: bit of python help

2015-05-01 Thread AudioGames . net Forum — Developers room : Kyleman123 via Audiogames-reflector


  


Re: bit of python help

well update time, it seems i am now able to loop around the board. yeah go me.a simple if conditional solved it. with a bit of math to manipulate the numbers a bit.but still dont really have a reliable way to switch players.im using an if block that if its player 1s turn, it changes it to player 2s. but the hang up, or at least part of it, is that the elif block is that if its player 2s turn it changes it to player 1s. and those execute if then elif. and player two doesnt actually get to take his turn.

URL: http://forum.audiogames.net/viewtopic.php?pid=214502#p214502




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

Re: Python help!

2014-06-26 Thread AudioGames . net Forum — Development room : SoundMUD via Audiogames-reflector


Re: Python help!

And there is a tutorial in the documentation itself:https://docs.python.org/2/tutorial/index.htmlURL: http://forum.audiogames.net/viewtopic.php?pid=178345#p178345

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

Python help!

2014-06-25 Thread AudioGames . net Forum — Development room : jak13 via Audiogames-reflector


Python help!

hai guies i downloaded the python2.7 instaler and i want a guide to learn the language?, would love any help.. jak best regards.. thanksURL: http://forum.audiogames.net/viewtopic.php?pid=178257#p178257

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

Re: Python help!

2014-06-25 Thread AudioGames . net Forum — Development room : blindlord via Audiogames-reflector


Re: Python help!

try [url="" />or the bookslearning pythonprogramming with pythonand the python pocket referenceURL: http://forum.audiogames.net/viewtopic.php?pid=178275#p178275

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

Re: Python help!

2014-06-25 Thread AudioGames . net Forum — Development room : frastlin via Audiogames-reflector


Re: Python help!

SecondLearn Python the hard way!URL: http://forum.audiogames.net/viewtopic.php?pid=178294#p178294

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

Re: Python help!

2014-06-25 Thread AudioGames . net Forum — Development room : tward via Audiogames-reflector


Re: Python help!

In addition to the suggestions already given dont forget about docs.python.org which contains all the official Python documentation . It may not make sense when your a newbie, but it will become important later on when you begin to understand the basics and need to refer to the official documentation to see which modules are available for this or that.URL: http://forum.audiogames.net/viewtopic.php?pid=178315#p178315

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