Sign in to follow this  

.py (python)

This topic is 4596 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
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

This topic is 4596 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this