Have you ever wanted to secure your python project so that you could be the only one to view it? Well with a few lines of code you could do that!
First you need to copy and paste this code change_this_variable = os.environ[‘REPL_OWNER’] and the to make it so only you can do a certain thing copy and paste this code if change_this_variable == “your replit name”: Thanks for reading!
I hate to break it to you, but that’s not even close to DRM. What stops people from copying your code directly from the cover page (under show code)? What prevents people from removing that line and/or adding their own name into their (forked) repl Secrets? Why not omit the variable definition entirely and just compare the REPL_OWNER env var with “HenryMiles3” in the first place? Why misspell os.environ as is.environ? The only method is to figure out a way to self-destruct the repl and/or make it private with cycles. Otherwise, don’t even think about DRM’ing repls without proper legal advice.
um why are you going on about DRM?? this has nothing to do with copyright laws afaik. He’s just a guy who wanted to share his code, you can let him down slowly and just tell him that it doesn’t work && give him proper advice.
Well, you can do that with bobastleys answer (storing code in secrets), using cycles to make your repl private, deleting all files before the repl boots (still WIP not sure if it’s possible), or invest time into the copyright law and make it illegal to distribute your code and potentially discourage people who just copy code as theirs.
well I don’t want to be rude but you realize that when you make a repl you are agreeing to sign it under MIT license which permits basically any use of your work, including but not limited to use without credit, editing, and distribution. I apologize, I should have read what he was asking before commenting. However, my main reason for the post was because I was confused abt the copyright law thing, the other thing was more of a sidenote that I wanted to make clear but seems you were in the right srry. No worries, everyone makes mistakes but I don’t think copyright stuff works on replit sadly