Page 1 of 1 [ 5 posts ] 

WillThePerson
Snowy Owl
Snowy Owl

User avatar

Joined: 7 Apr 2008
Age: 28
Gender: Male
Posts: 154

21 Dec 2008, 6:47 pm

I've got a few questions about Python (the programming language).

1. Is it suitable for writing software? If so, how easy? Any tuts?
2. If it is suitable, how large (filesize wise) are most apps you can make with it? Can they fit on, say, a 1.44MB floppy?

Thankees! :)



pakled
Veteran
Veteran

User avatar

Joined: 12 Nov 2007
Age: 67
Gender: Male
Posts: 7,015

21 Dec 2008, 10:07 pm

Python is an actual scripting language, has a lot of applications as functions for various programs (the only two I know off hand are the 3d Modeler Blender, and a character renderer Poser).

Past that, I don't know about size of the files. not much fits on a 1.44 floppy anymore (heck, it's getting hard to even find the drives...;)



lvc
Emu Egg
Emu Egg

User avatar

Joined: 18 Dec 2008
Age: 38
Gender: Male
Posts: 6
Location: NSW, Australia

22 Dec 2008, 3:32 am

WillThePerson wrote:
1. Is it suitable for writing software?

Absolutely it is. Unless you're doing something performance-critical, python tends to be a very good choice. In practice, most apps and most parts of the remaining apps are not performance critical. And python, like most higher-level languages, provides a bridge back to C which you can - and should - use for parts of apps where you can demonstrate that it gives a human-noticeable performance gain. And alot of the time, there are already libraries that do this for you - for example, numpy is highly acclaimed for doing complex math work.

Quote:
If so, how easy?

Very. It looks much like pseudocode, and in general, python reads your code the same way you do - eg, instead of braces (ala C, Java and family), or begin/end keywords (ala basic), it reads your indentation.

Quote:
Any tuts?

Ok, since the forum won't let me post URLs yet for some reason, replace [dot] and [slash] with the appropriate characters in the following, and then go there:
docs[dot]python[dot]org[slash]3.0[slash]tutorial[slash]index.html

Quote:
2. If it is suitable, how large (filesize wise) are most apps you can make with it? Can they fit on, say, a 1.44MB floppy?

I have a text editor which (before,eg, the libraries it depends on) is 375k.

Python programs tend to be significantly smaller than C or Java programs, for example, because it provides nice high-level constructs, and lacks a lot of the other language's boiler plate ("hello world" is one line).


_________________
"He who receives an idea from me receives without lessening, as he who lights his candle at mine receives light without darkening" -- Thomas Jefferson


Ancalagon
Veteran
Veteran

User avatar

Joined: 25 Dec 2007
Age: 45
Gender: Male
Posts: 2,302

22 Dec 2008, 12:41 pm

WillThePerson wrote:
1. Is it suitable for writing software? If so, how easy? Any tuts?

Python is pretty easy and clear. There are some things it might not be suitable for (operating system kernels, etc.), but if you were doing something like that you would probably already know that.

Quote:
2. If it is suitable, how large (filesize wise) are most apps you can make with it? Can they fit on, say, a 1.44MB floppy?

I saw a 2 GB flash memory stick for $9 the other day. Floppies have been obsolete for quite some time, but have hung around because they are dirt cheap. I doubt they will be dirt cheap enough for much longer.

If you are just writing small scripts, then they will all fit on a floppy, but the python interpreter probably wouldn't. So if you are transferring files around and want them to run somewhere else, either make sure that the computer you're going to has python installed, or else get something decent sized (like a memory stick).


_________________
"A dead thing can go with the stream, but only a living thing can go against it." --G. K. Chesterton


wolphin
Velociraptor
Velociraptor

User avatar

Joined: 15 Aug 2007
Age: 37
Gender: Male
Posts: 465

25 Dec 2008, 6:46 am

python is very easy and intuitive, it works wonderful as a first language for anyone.

you can fit an awful lot of python files on a 1.44 mb floppy, since python programs are just text. If you need the interpreter also, it might not fit.

(in theory you might be able to fit the interpreter on a floppy, if you strip out some of the bigger libraries, but that's getting complicated)

Floppies are ridiculously outdated anyways. In this era of dirt cheap USB flash drives and the internet, I am happy I have not needed to use a floppy in years.

If you're still using floppies, do yourself a favor and get a USB flash drive. They can't be more than $6 or $7 US.

EDIT: and tutorials. my favorite is Dive into Python, but be warned it assumes you already know how to program and want to learn python. It is very good and so I'd recommend it to anyone, but not to get discouraged if it assumes you know a lot of stuff you don't know yet.