# How similar is Python to KSP?



## Thonex (Jun 11, 2006)

Hi guys.... and Nils  

Nils posted a very cool little application that was written in Python and he said the beauty of Python is that there are so many modules to choose from. I didn't realize it at the time, but I guess Python is also a scripting language.

I enjoy KSP because of the instant gratification... how similar/different is Python to KSP. If I were to learn a language for fun.... you know... just to fool around and maybe write some little utilities.... would Python be a good language? Or are there easier object oriented languages to start off with?

Where could I find a good resource for starting out?


Thanks for any insight.

Cheers,

T


----------



## sbkp (Jun 11, 2006)

I don't really know either of them that well, but I'd say Java and Python are two good avenues to explore. All the languages I know are less, um, "current."  Someday I'll catch up.


----------



## Thonex (Jun 11, 2006)

sbkp @ Sun Jun 11 said:


> I don't really know either of them that well, but I'd say Java and Python are two good avenues to explore. All the languages I know are less, um, "current."  Someday I'll catch up.



Thanks sbkp,

I had a talk about Java with a friend of mine... he said it was pretty good but he also said (something like) "it's write once, test many".... meaning that Java can be unpredictable on different platforms or something.

Anyway... I did a little poking around and it seems that Python is used by NASA, NYSE, Industrial Light and Magic, AstraZeneca, Honeywell, and many others... so it's probably pretty deep.

T


----------



## Doug Wellington (Jun 11, 2006)

Python is an absolutely fantastic language! I first started using it when I embedded it in my MIDI sequencer in the early 90's. I had started with TCL, but Python provided more power while not being as hard to program as Perl.

We use Python extensively where I work, both as a scripting language, and as a container for (believe it or not!) Fortran functions. I also use Zope and Plone a lot for web sites - they're both written in Python... (See http://www.zope.org and http://plone.org for more info.)

You can learn a lot at python.org - click on "Documentation". In particular, check out: http://wiki.python.org/moin/BeginnersGuide


----------



## Thonex (Jun 11, 2006)

Thanks Doug!!

And thanks for the links.

I didn't know we had such programmers among us :smile: ... why don't you try your hand at a KSP script?  

THanks again for the recommendation.

Cheers,

T


----------



## Doug Wellington (Jun 11, 2006)

Yeah, it's only a matter of time before I try writing a Kontakt script. I've been pretty side-tracked with a couple things. I recently bought Kore (worst purchase of the year I might add), but just when I was starting to play with that, I found out that we had a major packrat infestation in the garage! Ugh... I emptied the place out, repaired the seal around the garage door, put down some traps, and now I'm scrubbing the rat pee stains off the floor. :evil: The upside is that I haven't played in my woodshop for a while, so I'm now inspired to get back to work. There was a time when I considered quitting the computer geek job to try cabinet making full time. Maybe I should consider that again... 

When Craig was here, we did a little troubleshooting on my Mac. I tried to fix the problems we found with the system disk, but finally threw in the towel and ordered a replacement. I needed a bigger one anyway, so I ordered a couple 250 GB, 7200 RPM drives, one for the system, and a second for samples. After I reload everything, I'll try a script...


----------



## Thonex (Jun 11, 2006)

Doug Wellington @ Sun Jun 11 said:


> I recently bought Kore (worst purchase of the year I might add).....<snip>...
> 
> 
> After I reload everything, I'll try a script...



Sorry about Kore. I have a thread  going on at the Kore forum and the moderator is being a little defensive (see second page) regarding their omission of synch to midi clock. It's even in their adverts and pics... but they took it out.... obviously because it wasn't working :???: THe only reason I would buy Kore is for the synchronization capabilities.. with K2's beat machine algos and fx and whatnot.... but until it has "synch to midi clock and tempo changes", I'm not buying it.

Look forward to seeing some of your scripts once you get your computer set up :smile: 

Cheers,

T


----------



## kotori (Jun 11, 2006)

Hi Andrew,
I think Python is an ideal language to start with. It has a very clear and easy syntax. The language designer has tried to keep as much as possible out of the core language and instead put such things into modules (containing function and class definitions) which you can import as you need them. This makes it easy to get started and you can quickly reach the point where you get what the language is all about so to say. In Python you can mix traditional procedural style with object-oriented programming which make the learning curve less steep than that for Java. Python also has a very wide range of third party libraries. So whether you want to generate a PDF, capture a webcamera, write a game, do scientific analysis, or build a dynamic website with minimal coding it can help you.
I think this Python tutorial is quite good (even though you may wish to skip some sections).
http://www.ibiblio.org/obp/thinkCSpy/ (How to think like a computer scientist) is also a quite good text, although it may be advancing at a too slow pace for you.

Doug, great to see that there are more Python enthusiasts here. :smile: 

Cheers,
Nils


----------



## Thonex (Jun 11, 2006)

Thanks Nils,

And thanks for the links too :smile: 

I don't think I'll be skipping anything in the tutorials... I need all the background I can get. I'm not going to change careers or anything (I'm happy as a composer) but it's fun to tinker with this kind of stuff after the kids go to sleep and I'm feeling creative... but burned out on music.

Thanks for all your suggestions. Python looks like it integrates into pretty much every area of coding.... web, system searches and files, games, intense math etc.... With how fast computers are these days... I'm not worried about writing inefficient code  I just want it to be easy to program... and work of course :lol: 

Thanks for your help.

Cheers,


T


----------

