#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2011
    Posts
    13
    Rep Power
    0

    Packaging a python game


    OK - a question from my son really - at 11 he's really got into python programming. He's just written his first game in python 2.5 using SPE. this compiles and runs OK providing python is loaded to the machine.

    Now he wants to share copies of his game on a disk with his friends... how can he package this ?? - is it possible to create /export as an exe that can run independant of python ?? - or do his friends need to import the whole python application suite just to run the game..

    I'm afraid I'm just a know nothing Dad when it comes to this, so I'm hoping someone out there will know what he can do
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2004
    Location
    San Francisco Bay
    Posts
    1,939
    Rep Power
    1313
    Sure, it's possible. Python's official documentation actually addresses this: http://docs.python.org/faq/programmi...-python-script

    It covers several different options, but from a cursory inspection, it appears that py2exe may be the easiest.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2011
    Posts
    13
    Rep Power
    0
    Originally Posted by Lux Perpetua
    Sure, it's possible. Python's official documentation actually addresses this: http://docs.python.org/faq/programmi...-python-script

    It covers several different options, but from a cursory inspection, it appears that py2exe may be the easiest.
    Thanks Lux - when we downloaded python for my son we downloaded ver 2.5 which now seems a bit out of date, but was the package suggested by the book he was using to teach himself with. I've found a version which seems to be 2.5 compatible, but struggling to get it to load.

    Is there an upgrade path to 2.6 ?? -
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2004
    Location
    San Francisco Bay
    Posts
    1,939
    Rep Power
    1313
    I've never written code on Python 2.x and had it break on a more recent Python 2.y. The versions of Python 2 are generally backwards-compatible with one another. Features do get deprecated and removed, but not without warnings. If your son's code doesn't generate any deprecation warnings, then you could try installing 2.7 and seeing if his code still works. If it doesn't work, then I recommend trying to fix the code, since Python 2.5 is outdated and is no longer supported.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2011
    Posts
    13
    Rep Power
    0
    Cheers Lux,

    I think we'll give that a go - appreciate the advice

IMN logo majestic logo threadwatch logo seochat tools logo