To Python Lovers Everywhere

Discussion in 'Indie Related Chat' started by soniCron, Feb 10, 2007.

  1. george

    Original Member

    Joined:
    Aug 8, 2004
    Messages:
    343
    Likes Received:
    0
    1) deploying python apps as java would probably be easier because:

    a) solutions such as py2exe bundle an interperter and the script together. this leaves your code/IP vulnerable. you can compile to python bytecode, but i've heard it's not very secure. compiling straight to java bytecode seems a better solution, and most people have java installed, and (i believe) you can use a good java obfuscator to further secure your code

    2) you can take advantage of the power of the java VM without having to deal with the java language... java is great but it can get really complex, python makes things much easier

    3) you can use swing from python for your gui and not deal with all the toolkits such as wxPython. plus i've heard it's actually easier to deal with swing from python than in java!

    4) basically my point was you can program java without actually using the more complex language of java, but instead taking advantage of the benefits of a language such as python.

    but i'm not sure how practical this is -- that's why i was asking... it seems to me that jython could be the magic answer for a lot of developers... does anyone use it?
     
  2. oNyx

    Original Member

    Joined:
    Jul 26, 2004
    Messages:
    1,212
    Likes Received:
    0
    The last time I fiddled around with Jython it wasn't possible to compile it to bytecode directly. Additionally Jython would index all classes on the first run which can take a few minutes (!) on the first run on slower machines.

    So, basically... you got that massive first run downer, you have to ship the Jython jar and you get less than 1/10th of the usual execution speed.

    That's far from being feasible imo. (Maybe it's better by now. There was a new release some days ago). And well, that's the reason why I picked full class scripting via Janino (ultra fast on-the-fly compiler).

    What's annoying (outrageously silly) about Python is that it doesn't use UTF-8 internally (always + for everything). A temp dir with some Kanjis in the path? Ooops... shit happens. Who wants ASCII strings nowadays anyways?

    The sloppy documentation is another problem.
     
  3. David De Candia

    Original Member

    Joined:
    Nov 21, 2005
    Messages:
    89
    Likes Received:
    0
    I experimented with Python when selecting a language for my latest project. I loved so much about the language - its spartan simplicity - its power - its ease of use and the speed at which I could get complex tasks done (in so few lines!).

    But even with all the above going for it, at the end of the day I ditched Python in favour of Blitzmax. My Blitzmax prototype ran about 3x faster than the Python version. I'm sure there would have been optimisation and workarounds to narrow this gap, but my feeling was that I'd always be playing catchup.
     
  4. shang

    Original Member

    Joined:
    Aug 2, 2005
    Messages:
    10
    Likes Received:
    0
    George, I think you have some incorrect information about how Python works. Python uses a VM just like Java and scripts are compiled into bytecode, which is about equally easy to decompile as Java bytecode. So if you, for example, use py2exe, your original scripts won't be included in the package, just the binary bytecode. Jython is only really beneficial if you have to interface with existing Java code (e.g. you need to use a specific library that's only available to Java, or you want to add Python scripting to an existing Java application).

    As for the original question, I use Python as my primary language for all my home projects from games to web services to utility scripts. For games, I nowadays use C++ for the core renderer, particles, physics etc. but game logic is all Python. I use Python because it is by far the most productive language for me and it is very easy to write readable, maintainable and 100% portable code. There are tons of libraries for every imaginable task and extending your Python code with C or C++ is moderately easy once you climb the learning curve for the first time.
     

Share This Page

  • About Indie Gamer

    When the original Dexterity Forums closed in 2004, Indie Gamer was born and a diverse community has grown out of a passion for creating great games. Here you will find over 10 years of in-depth discussion on game design, the business of game development, and marketing/sales. Indie Gamer also provides a friendly place to meet up with other Developers, Artists, Composers and Writers.
  • Buy us a beer!

    Indie Gamer is delicately held together by a single poor bastard who thankfully gets help from various community volunteers. If you frequent this site or have found value in something you've learned here, help keep the site running by donating a few dollars (for beer of course)!

    Sure, I'll Buy You a Beer