Image Module In python Question

2020-05-11 Thread AudioGames . net ForumDevelopers 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: Hiding terminal Windows In Python

2020-03-28 Thread AudioGames . net ForumDevelopers room : Thatguy via Audiogames-reflector


  


Re: Hiding terminal Windows In Python

Well dang, man. I never thought it would be that easy. Thanks a lot, I appreciate it.Now let me ask you this:What if I wanted to compile my script as an executable and store it somewhere so I could, maybe, use it on a machine without python or redistribute it? Wouldn't the terminal still come open when I run that if I don't have a gui? I'm using pyinstaller to compile, if that makes any difference.

URL: https://forum.audiogames.net/post/513383/#p513383




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


Hiding terminal Windows In Python

2020-03-28 Thread AudioGames . net ForumDevelopers room : Thatguy via Audiogames-reflector


  


Hiding terminal Windows In Python

Hello:Recently, I've begun to develop a lot of scripts in python. There are a couple running on my computer  at any given time. As they are just scripts, there isn't really any console output, and I don't need a window open for them at all.   My problem is that executing .py files leaves the terminal open and I have to tab through unnecessary consoles when switching to other tasks on my laptop. This is starting to get slightly annoying, so I was wondering about a way to minimize or hide these windows entirely with code so the scripts run as somewhat of a background process.   If it's not possible, that's fine, but it's just something I would appreciate. Any ideas? So far I've tried creating a window with tkinter and then withdrawing it, but that didn't really seem to work.

URL: https://forum.audiogames.net/post/513299/#p513299




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


Hiding terminal Windows In Python

2020-03-28 Thread AudioGames . net ForumDevelopers room : Thatguy via Audiogames-reflector


  


Hiding terminal Windows In Python

Hello:Recently, I've begun to develop a lot of scripts in python. There are a couple running on my computer  at any given time. As they are just scripts, there isn't really any console output, and I don't need a window open for them at all.   My problem is that executing .py files leaves the terminal open and I have to tab through unnecessary consoles when switching to other tasks on my laptop. This is starting to get slightly annoying, so I was wondering about a way to minimize or hide these windows entirely so the scripts run as somewhat of a background process.   If it's not possible, that's fine, but it's just something I would appreciate. Any ideas?

URL: https://forum.audiogames.net/post/513299/#p513299




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


Re: Keyboard detecting in Python

2020-01-06 Thread AudioGames . net ForumDevelopers room : Thatguy via Audiogames-reflector


  


Re: Keyboard detecting in Python

Thank you kindly. I found that really useful actually, not only for that but  for a few other projects I'm doing, that library is neat. If anyone else ever runs into this issue, here's my working code.import msvcrt while True: if msvcrt.kbhit():  a = msvcrt.getch()  if a == b'y':   #do stuff  elif a == b'n':   #do other stuff  else:   #complain to the userI messed this up for a while thinking 'y' or 'n' would be enough, but then I printed msvcrt.getch and found that you have to include b and then the key in quotes. To anybody in the future that might need it, I hoped that helped, and thanks again to @2

URL: https://forum.audiogames.net/post/491022/#p491022




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


Re: Keyboard detecting in Python

2020-01-06 Thread AudioGames . net ForumDevelopers room : Thatguy via Audiogames-reflector


  


Re: Keyboard detecting in Python

Thank you kindly. I found that really useful actually, not only for that but  for a few other projects I'm doing, that library is neat. If anyone else ever runs into this issue, here's my working code.import msvcrt while True: if msvcrt.kbhit():  a = msvcrt.getch()  if a == b'y':   #do stuff  elif a == b'n':   #do other stuffI messed this up for a while thinking 'y' or 'n' would be enough, but then I printed msvcrt.getch and found that you have to include b and then the key in quotes. To anybody in the future that might need it, I hoped that helped, and thanks again to @2

URL: https://forum.audiogames.net/post/491022/#p491022




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


Keyboard detecting in Python

2020-01-06 Thread AudioGames . net ForumDevelopers room : Thatguy via Audiogames-reflector


  


Keyboard detecting in Python

Hi.So, I am writing a program in python that relies on a lot of user input to function. It runs in the terminal. I am trying to find a way to make program execution faster by reducing the amount of times the end user has to press enter. What I've been doing is setting python's input function equal to a variable then handling the resulting input with an if statement. But I have a lot of prompts, so I would like, for example, something of this sort:print("Would you like to do this again? y/n")  if keypress = "y":  run main againelif keypress == "n":  exit()I don't think that by default python has a key listener or anything of that sort, so I did some research and came up with a commonly used keyboard library which allows you to hook and register keyboard events. I tried this exact thing with its keyboard.is_pressed() function, and it seems to work for the most part, but the problem is that the keyboard will still input y or n to the terminal, because the library only detects if the key was pressed and doesn't actually stop it from writing. This wouldn't be a huge issue, except for the fact that I have multiple of these user input things one right after another, and if y is typed in the first prompt, but in the next, the user wants to chose n, then that won't happen because y is being typed.Any suggestions as to how I` might go about solving this problem or doing something else entirely?

URL: https://forum.audiogames.net/post/490987/#p490987




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


Re: Introducing Quorum Programming Language!

2019-12-16 Thread AudioGames . net ForumDevelopers room : Thatguy via Audiogames-reflector


  


Re: Introducing Quorum Programming Language!

You know, I never could get into Quorum either, and the nearby school for the blind is really shoving it at everyone. It's annoying because the language boasts that it is designed with accessibility in mind yet I never could actually manage to do anything with it. I tried it at a summer camp and it was just not practical in any way. Spent a whole week writing a program only to run it in the IDE and have everything happen in some weird dialog at the bottom of the screen, which I could not use NVDA to access. I had a bit better luck on the website, but still. I'd learn python any day over this, because of the reasons stated in post 8, and the fact that I'm having to put up with some non-developing-related issues that are keeping me from learning it. It's great for teaching, because there really isn't a ton of sintax you have to remember. But I don't know... for someone who has the basics down, I just don't think it could be used for anything really. How likely will it be that I'll use quorum on the job? Use the skills I learned, sure. But not the language itself.

URL: https://forum.audiogames.net/post/486056/#p486056




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


PHP Cookies

2019-12-09 Thread AudioGames . net ForumDevelopers room : Thatguy via Audiogames-reflector


  


PHP Cookies

Hello everybody:So here is my situation. I am attempting to add an alert to my site which will display the last update date to the user. Now, I do realize this could become pretty annoying for frequent visitors, so I added a checkbox that says: "Do not show this message again." I can check it, and I can click the OK button, but the PHP script which sets a cookie to remember that I checked the box doesn't seem to want to work. Here is the script which the OK button submits to.$hide = $_POST['donotshow'];if(isset($hide)) {$cookie_name = "user";$cookie_value = "hide update message";setcookie($cookie_name, $cookie_value, time() + (86400 * 365), "/"); header('Location: /home.php');}else {header('Location: /home.php');}?>Here is the code of my alert pageif (isset($_COOKIE[$cookie_name])) {header('Location: /home.php');}else {}?>Alert!This site was last updated on November 12th, 2019Can anybody see what I'm doing wrong here? Thanks for any and all help.

URL: https://forum.audiogames.net/post/484318/#p484318




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


PHP Cookies

2019-12-09 Thread AudioGames . net ForumDevelopers room : Thatguy via Audiogames-reflector


  


PHP Cookies

Hello everybody:So here is my situation. I am attempting to add an alert to my site which will display the last update date to the user. Now, I do realize this could become pretty annoying for frequent visitors, so I added a checkbox that says: "Do not show this message again." I can check it, and I can click the OK button, but the PHP script which sets a cookie to remember that I checked the box doesn't seem to want to work. Here is the script which the OK button submits to.$hide = $_POST['donotshow'];if(isset($hide)) {$cookie_name = "user";$cookie_value = "hide update message";setcookie($cookie_name, $cookie_value, time() + (86400 * 365), "/"); header('Location: https://www.that-domain.com/home.php');}else {header('Location: https://www.that-domain.com/home.php');}?>Here is the code of my alert pageif (isset($_COOKIE[$cookie_name])) {header('Location: https://www.that-domain.com/home.php');}else {}?>Alert!This site was last updated on November 12th, 2019Can anybody see what I'm doing wrong here? Thanks for any and all help.

URL: https://forum.audiogames.net/post/484318/#p484318




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


Re: Programmers: Here's a question:

2019-10-05 Thread AudioGames . net ForumDevelopers room : Thatguy via Audiogames-reflector


  


Re: Programmers: Here's a question:

It's not really a program... It's hardly something worth noting, but on my website, I'd kept on getting spam submitted through my contact form. It was really annoying, so I coded an extremely flawed captcha which one would have to go through to send me email from then on. It was flawed because all it did was match the input of a text field to a variable and if the input was true redirected to the form... anyone could view page source in firefox and just see the answer, but it was my first program that actually served a purpose. 4 out of 5 stars because it worked but worked terribly haha. It was sort of like a jerryrigged captcha solution lol

URL: https://forum.audiogames.net/post/466344/#p466344




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


Re: PHP help with sending emails

2019-10-02 Thread AudioGames . net ForumDevelopers room : Thatguy via Audiogames-reflector


  


Re: PHP help with sending emails

I went through this same thing a while ago. I wrote a php thing to send an email which would happen when I pressed the submit button in an HTML form. The form had no data, it was just a post action to the page which contained my mail script. So I executed it to see if it would email me. When it did, I figured out my problem. Well actually I figured out a couple of my problems. 1. Gmail is gay. It marks stuff as spam that isn't spam but is interpreted by google as such because I didn't use an email address that had permission from its domain to be sent from by me. So if you haven't, check your spam folder.2. I designed a small form with about three fields and a submit button, and wrote some PHP to send its contents to my inbox. I wrote all the php code awesomely and just like you I saw a success message but no email went anywhere because I'd forgot the most important part of my script, which was the actual function that sends the email. I defined all the variables and set them to correspond to my input fields and never did anything with them. Your code looks like it does that, with $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");That isn't how I'd write it, but it looks like it would get the job done. If you'd like my test script to make sure you can send mail from your hosts server, let me know.

URL: https://forum.audiogames.net/post/465786/#p465786




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


Re: PHP help with sending emails

2019-10-02 Thread AudioGames . net ForumDevelopers room : Thatguy via Audiogames-reflector


  


Re: PHP help with sending emails

I went through this same thing a while ago. I wrote a php thing to send an email which whould happen when I pressed the submit button in an HTML form. The form had no data, it was just a post action to the page which contained my mail script. So I executed it to see if it would email me. When it did, I figured out my problem. Well actually I figured out a couple of my problems. 1. Gmail is gay. It marks stuff as spam that isn't spam but is interpreted by google as such because I didn't use an email address that had permission from its domain to be sent from by me. So if you haven't, check your spam folder.2. I designed a small form with about three fields and a submit button, and wrote some PHP to send its contents to my inbox. I wrote all the php code awesomely and just like you I saw a success message but no email went anywhere because I'd forgot the most important part of my script, which was the actual function that sends the email. I defined all the variables and set them to correspond to my input fields and never did anything with them. Your code looks like it does that, with $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");That isn't how I'd write it, but it looks like it would get the job done. If you'd like my test script to make sure you can send mail from your hosts server, let me know.

URL: https://forum.audiogames.net/post/465786/#p465786




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


Re: Php doesn't like me

2019-07-09 Thread AudioGames . net ForumDevelopers room : Thatguy via Audiogames-reflector


  


Re: Php doesn't like me

Odly enough, I seem to have the same problem writing to a file. The file in question doesn't exist yet, but fopen should create it anyway. Here's the code that isn't working.$myfile = fopen("date.txt", "w")$txt = " . date("l-m-d-Y") . \n";fwrite($myfile, $txt);fclose($myfile);?>Any idea what I'm not doing right here?

URL: https://forum.audiogames.net/post/447900/#p447900




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


Re: Bgt Brace Issue

2019-02-15 Thread AudioGames . net ForumDevelopers room : Thatguy via Audiogames-reflector


  


Re: Bgt Brace Issue

I've gotta agree with you on that one. The compiler sometimes can be pretty annoying when it comes to telling you where you messed up. But @10, I'll certainly give that all a try pretty soon here, and thank all of you a lot for all the help you've given me. I sure do appreciate it.

URL: https://forum.audiogames.net/post/412005/#p412005




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


Re: Bgt Brace Issue

2019-02-14 Thread AudioGames . net ForumDevelopers room : Thatguy via Audiogames-reflector


  


Re: Bgt Brace Issue

Well, I don't know why, but when I wrote out the whole file again, I didn't get any errors. Until I tried to do that question answer type thing.void question(){int answer;answer = question("Would you like to view the game instructions and rules?");if(answer == 1){bool open("readme.txt", "rb");}else if(answer == 2){game();}else{alert("Please try again");}}

URL: https://forum.audiogames.net/post/411667/#p411667




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


Re: Bgt Brace Issue

2019-02-14 Thread AudioGames . net ForumDevelopers room : Thatguy via Audiogames-reflector


  


Re: Bgt Brace Issue

Well, I don't know why, but the bgt program must really not like the file I was using to write that code in, because when I wrote it all out again, I got a total of 0 errors. That is, until I tried to do that question answer type thing. Here's the code which I am recieving the error on.void question(){int answer;answer = question(

URL: https://forum.audiogames.net/post/411666/#p411666




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


Re: Bgt Brace Issue

2019-02-13 Thread AudioGames . net ForumDevelopers room : Thatguy via Audiogames-reflector


  


Re: Bgt Brace Issue

Ahh. I may have forgotten to include the #include code in my original post, but that string is  for a third-party menu I'm using, because I don't like dynamic menu. When I use the old matcher script to check if i have any unclosed or overclosed braces, it comes up fine.

URL: https://forum.audiogames.net/post/411573/#p411573




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


Re: Bgt Brace Issue

2019-02-13 Thread AudioGames . net ForumDevelopers room : Thatguy via Audiogames-reflector


  


Re: Bgt Brace Issue

Thanks, I appreciate the help. But, when I entered the code as you wrote it, I now get an unexpected token error on line 5

URL: https://forum.audiogames.net/post/411541/#p411541




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


Re: Bgt Brace Issue

2019-02-10 Thread AudioGames . net ForumDevelopers room : Thatguy via Audiogames-reflector


  


Re: Bgt Brace Issue

Sorry, I'm still getting the error. I removed the ; as you specified and furthermore removed the extra {, but I'm still getting the same error on the same line.

URL: https://forum.audiogames.net/post/410962/#p410962




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


Bgt Brace Issue

2019-02-09 Thread AudioGames . net ForumDevelopers room : Thatguy via Audiogames-reflector


  


Bgt Brace Issue

Hello:So recently, after deciding to reread the Bgt manual to familiarize myself with its basic concepts again, I have decided to start on a program. However, I'm running into a small but extremely annoying error. I keep getting an unexpected token error on the 25th line of this program, which is after I declair Void play_game();#include "menue.bgt";#include "speak.bgt"#include "rotation.bgt"void main(){show_game_window("Game_alpha");speak("Hello");string text="Welcome To this game. Please choose an option from the below menu";string[] items={"Play game","Explore the grid","exit"};r=new_menu(text, items, 0);if(r==1) {play_game();}else if(r==2) {explore_grid();}else if(r==3) {exit();}}void play_game();{{int answer = question("Question", "would you like to read the game  info and rules??");if(answer==0){alert("Let's try that again.");}if(answer==1){alert("Loading...");}if(answer==2){alert("All right then. Continuing to game...");}}Would someone mind telling me what I'm messing up here, please?

URL: https://forum.audiogames.net/post/410710/#p410710




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