Jump to content
  • Advertisement
Sign in to follow this  
lib

.py (python)

This topic is 4813 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

okay, ive finished writing my game. I saved it as a .py file. Then i send the file to a friend to test it out. My friend said he cant open it. I know why, he does not have pythoin in his comp, so he cant open .py files How do i save it? i tried as a .exe, but an error occurs.

Share this post


Link to post
Share on other sites
Advertisement
I believe it's because python is a so-called 'scripting' language. That is, something that isn't compiled. Much like html requires a browser to use, so does python require a program to run the source... unless they have another program like 'py2exe'

Share this post


Link to post
Share on other sites
Quote:
Original post by nobodynews
I believe it's because python is a so-called 'scripting' language. That is, something that isn't compiled.
That makes it an interpreted language. It is not simply a "scripting" language.

Quote:
Original post by nobodynews
Much like html requires a browser to use, so does python require a program to run the source... unless they have another program like 'py2exe'
py2exe simply wraps python with your source so that's its transparent to the user, it doesn't do anything magic (just to clarify).

Share this post


Link to post
Share on other sites
Well, it wont really matter for him to download Python, as the main purpose of this is to present it in a science fair (they unfortunatly chose me to give a presentation) and I need the file to work in any computer. Basically, I have the code in C++ and Python, and I compare the two. However, C++ compiles the whole code, allowing me to use it in other computers (correct me if im wrong). But for Python, since its an interpreted language, I cant bring the code without Python itself. Ive tried using the py2exe, but im not really sure how to work it. I would read the instructions, but its confusing and I dont have the time to read it thoroughly. Can anyone help me? I just need the code to work in other computers, whether it has Python or not.

(note* I dont have time doesnt mean Im lazy, it means that my presentation is in 1 day...yikes!)

Share this post


Link to post
Share on other sites
py2exe is a small addon to the distutils, look there, write a working distutil script, converting it to .exe is a piece of a cake then.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!