r/pythonhelp • • Sep 26 '22

Can you burn a pygame code on a disk?

Thus is an absolutely reduculess question, but can you create a pygame and burn the information on a disk/flash drive? Then run the disk/flash drive on another PC without installing python?

No one needs to burn disks anymore, but this is just a reduculess question to see if this is even possible.

3 Upvotes

3 comments sorted by

2

u/Zeroflops Sep 26 '22

Yes, you can run pyGame off a disk or flash drive.

But python will need to be included on the disk/flash drive. If it’s not installed on the computer. This would be similar to how they make executables for python. They package python and your script in an exe file.

If you are attempting to run it off a disk, which you would not be able to write back to, you would have to save game states or whatever you want to be persistent between runs stored on the users hard drive.

1

u/roztopasnik Sep 28 '22

Yes, but it doesn't work with every python project ..

https://pyinstaller.org/en/stable/