Page 1 of 1

Hidden code python program online?

Posted: Tue Mar 23, 2021 2:31 pm
by sanguinearocks101
Hello, I am wondering if there are any free websites that let people use a python program but do not show any of the code, I have a giveaway idea I think would be cool and this would help a lot. I know I can host a web server from my raspberry pi, but am unsure if you all could see the code inside the program and would prefer not to have my raspberry pi plugged in 24/7 so it could host the server while the giveaway was going on. I know a lot of you are much deeper in the programming world than I am so maybe you all have some ideas. Thanks in advance.

Re: Hidden code python program online?

Posted: Tue Mar 23, 2021 3:14 pm
by hungrycarnivores
So you can run a site using PHP or JS/CSS and then put the python code embedded, then on window-open jump in and start the program, and then after the window closes, you exit-on-close. That's all I've done.

Hidden code program online?

Posted: Wed Mar 24, 2021 1:23 am
by sanguinearocks101
I know minimal JS so that probably wouldn’t work, all I really need is some way to check if a value a user enters is correct without them being able to go in to the program and check it to find the values.

Re: Hidden code python program online?

Posted: Wed Mar 24, 2021 3:32 am
by hungrycarnivores
Do you know JAVA? You could launch some GUI and thread it off your Pi, and just declare the private int n as a random()*ArrayList.size() and do the ArrayList.get(n) to get the winner and display it? That way, the number is calculated at runtime and it is obfuscated that way. I don't really know the List structure in python too well... always end up using tuple.

Re: Hidden code python program online?

Posted: Wed Mar 24, 2021 5:35 am
by elaineo
Google app engine lets you host a python webserver. It's free for the first 90 days or so, possibly longer if it's a small app.
https://cloud.google.com/appengine

Re: Hidden code python program online?

Posted: Wed Mar 24, 2021 7:31 pm
by sanguinearocks101
hungrycarnivores wrote: Wed Mar 24, 2021 3:32 am Do you know JAVA? You could launch some GUI and thread it off your Pi, and just declare the private int n as a random()*ArrayList.size() and do the ArrayList.get(n) to get the winner and display it? That way, the number is calculated at runtime and it is obfuscated that way. I don't really know the List structure in python too well... always end up using tuple.
All I know is a bit of Python and a tiny bit of js and html though the majority of what I know in js is creating shapes.

Re: Hidden code python program online?

Posted: Wed Mar 24, 2021 7:32 pm
by sanguinearocks101
elaineo wrote: Wed Mar 24, 2021 5:35 am Google app engine lets you host a python webserver. It's free for the first 90 days or so, possibly longer if it's a small app.
https://cloud.google.com/appengine
Thank you, this will probably work very well for what I need it for.