What Is Pythin Good For Doing?


Recommended Posts

What kind of programs is python good for making? I was kinda interested in GUI's but it didn't look like there was that much on it, then again I didn't look to hard.

Also, how fast is python?

Link to post
Share on other sites

Hi,

Python is good for many, many things.

For graphics I belive there are GTK modules available for it.

One minor little game that uses it as a scripting language is Civ IV.

crrj

What kind of programs is python good for making? I was kinda interested in GUI's but it didn't look like there was that much on it, then again I didn't look to hard.

Also, how fast is python?

Link to post
Share on other sites
I've seen a lot of games use pythin for scrupting, why is that,

It works.

and how do they use it like that?

Embed the Python interpreter in the game and expose a scripting interface through it.

Link to post
Share on other sites

Python is fast enough, but its slower then C#. C++ ect

Python was made as a learning language without being a toy language, you can do pretty much anything you can with other languages, It supports, OOP aswell,

They have modules such as CherryPy for web development, Iron python, which ties in to the .net framwork (Currently in pre alph)

pygame for easier game development, so yeah, python can do anything =P,

Edited by Naming is hard
Link to post
Share on other sites

It compiles the source into bitcode, it seems like python does it on the fly, wich would make it slower than other languages.

But i have no idea what im talking about, im just trying to think to know something

Edited by fubz
Link to post
Share on other sites
It compiles the source into bitcode, it seems like python does it on the fly, wich would make it slower than other languages.

The standard Python distribution uses a bytecode interpreter. Programs can be provided in either source or bytecode format. (The bytecode files are generated automatically by the interpreter or manually with the py_compile module.) Performance can (frequently) be improved if necessary by using native-code modules.

The Psyco module has a native-code JIT compiler. The PyPy implementation includes (incomplete) code translators targeting C and LLVM. IronPython and Jython use the CLR and Java JIT compilers respectively. The Parrot implementation will use Parrot's JIT compiler.

Remember that the vast majority of code isn't performance-critical. The two or three orders of magnitude difference in performance between Python and (supposedly) equivalent C is usually insignificant. The one or two order of magnitude difference between JIT compiled Python (and Java, C#, etc) and C would hardly be noticable in most applications. A pure native Python compiler that didn't sacrifice any language features would be difficult to implement and likely wouldn't perform significantly better in the real world. Indeed, in some situations performance could be significantly worse.

Edited by jcl
Link to post
Share on other sites

Ah thank you JCL,

As i play around with python more, I'm really liking it, now i need to think of something to make with it.

And I found out about JPython and since im decent with Java that might lead to some fun ^_^

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...