Results 1 to 8 of 8

Thread: PYTHON - What???

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2005
    Posts
    69

    PYTHON - What???

    I've downloaded Python 2.4 and am interested in the study of it, since some 3D programs I know use it. But, looking into the tutorials and such, I have no information on what Python is used for? When you compile a Python script it isn't a .exe it's a "Compiled Python Script". I'm really confused, please help.


  2. #2
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: PYTHON - What???

    Python is a scripting language. It is not ment to be compiled. You run the "text" file. You can compile it to exe files, or even to Java Byte code, but it was first of all ment as a scripting language. So said in an other way (without lying too much) the intepreter you have downloading is reading the text file on the fly and then does what it says.


    - ØØ -

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Sep 2005
    Posts
    69

    Re: PYTHON - What???

    Ok... so... I noticed that Blender3D allows your game to run Python scripts. Is this what Python is for? A scripting language for your program?

    If yes, how does this be implemented into say a Visual Basic application?

  4. #4
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: PYTHON - What???

    When you are using scripting in application it has a few different purposes.

    • If you are in a game programming team (at least if it is big), you are bound to have people in the team that can't do programming, or isn't very good, like the 3D modellers and artists. To make these test what they make in the engine or what ever, it is usual to have a scripting interface. Scripting is much easier and faster to grasp for a non programmer, and can allow a modeller or what ever to test his models in the engine with a few easy simple lines.
    • When you have a big project like any AAA game today, compiling time is really high. It is not unusal that it takes many minutes to compile the whole thing. If you just want to test out something or tweak values, then it will be very frustrating to have to use 5min++ to comile it every time you have just changed a value or two. Then it is much easier to have a scripting interface, so you can just change the script file (a text file) and then start the game over again without the need for compilation.
    • If you are debugging something, like if you do certain things with mouse or keyboard, then it is not easy to make the same thing happen over and over again. You probably understand how hard it will be to press the same buttons at the exact same point many times after each other. Then it can be nice to have a script interface where you can code the key events so they will be performed at the right time, so you can see step for step what is actually happening.
    • Big game engines might often ONLY have a script interface to code the whole game. I am not very pro for these things, because it hides away too much for you. But it makes the development time go down drasticaly. You simply set up loading scripts and behaviour scirpts and so on, and you code the whole game, or parts of it like that.



    Now that was a few things you can use scripting in games for. There is probably many other ways to use it too. I have never used scripting in any of my VB games, but if you want to know more about how it works, here is a good link for you:
    http://www.codesampler.com/miscsrc.htm (both lua and costum scripting languages)
    http://www.codesampler.com/python.htm (python mainly)



    - ØØ -

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Sep 2005
    Posts
    69

    Re: PYTHON - What???

    Thanks a lot, that helped

  6. #6
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: PYTHON - What???

    No problem...just happy to help out.


    - ØØ -

  7. #7
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: PYTHON - What???

    DoomSharp is too complex even for Python to handle

  8. #8
    Frenzied Member agmorgan's Avatar
    Join Date
    Dec 2000
    Location
    Lurking
    Posts
    1,383

    Re: PYTHON - What???

    Like NoteMe said, it is possible to compile to exe.
    However, you need an extra program to do it.
    for example py2exe
    http://www.py2exe.org/

    Jython (http://www.jython.org/) is an implementation of Python written in 100% Pure Java

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width