RPGDXThe center of Indie-RPG gaming
Not logged in. [log in] [register]
 
HOW is python different from gwbasic or qbasic?!
 
Post new topic Reply to topic Goto page 1, 2  Next 
View previous topic - View next topic  
Author Message
js71
Wandering DJ


Joined: 22 Nov 2002
Posts: 815

PostPosted: Mon Jul 07, 2003 2:06 am    Post subject: HOW is python different from gwbasic or qbasic?! [quote]

I just downloaded python... I sure didn't expect it to be a GWbasic clone, that's for sure... The thing is, HOW would I be better off learning python as opposed to say... QB? I skimmed through a tutorial and most of the commands are the same as qb's! So can someone tell me how python is different from qbasic? I just don't get it...
Back to top  
Rainer Deyke
Demon Hunter


Joined: 05 Jun 2002
Posts: 672

PostPosted: Mon Jul 07, 2003 2:45 am    Post subject: [quote]

Consistency
Dynamic typing
Sequence slicing operators
Objects/classes
Operator overloading
Separate namespaces for separate modules
Everything is an object, including functions, classes, and modules.
Lambda expressions
Nested scoping of variables (including functions, classes, etc.)
Built-in dictionary type
Exceptions
Iterators
Generators
Text formatting operator
List comprehensions
In-place dictionary/list/tuple definitions
...
Back to top  
LeoDraco
Demon Hunter


Joined: 24 Jun 2003
Posts: 584
Location: Riverside, South Cali

PostPosted: Mon Jul 07, 2003 3:06 am    Post subject: [quote]

Not to mention that Python's syntax is different from BASIC syntax.
_________________
"...LeoDraco is a pompus git..." -- Mandrake
Back to top  
js71
Wandering DJ


Joined: 22 Nov 2002
Posts: 815

PostPosted: Mon Jul 07, 2003 3:32 am    Post subject: [quote]

arg... but the interpreter is soo... gah... awkward... Like GWbaisc... and can it compile your programs to exe?
Back to top  
LeoDraco
Demon Hunter


Joined: 24 Jun 2003
Posts: 584
Location: Riverside, South Cali

PostPosted: Mon Jul 07, 2003 3:39 am    Post subject: [quote]

You don't have to use the interpretor. You can write python source in separate files (usually with a .py extension), make the files executable, and put, as the first line, a shebang followed by the local path to your python executable.
_________________
"...LeoDraco is a pompus git..." -- Mandrake
Back to top  
js71
Wandering DJ


Joined: 22 Nov 2002
Posts: 815

PostPosted: Mon Jul 07, 2003 3:58 am    Post subject: [quote]

I wanna learn C++... :(
Back to top  
LeoDraco
Demon Hunter


Joined: 24 Jun 2003
Posts: 584
Location: Riverside, South Cali

PostPosted: Mon Jul 07, 2003 4:32 am    Post subject: [quote]

Python might be easier to pick up prior to learning c++. I myself learned Python after I learned c++, but I hear from some people that Python is simpler than the alternative. Especially as you don't have to worry so much about garbage collection, pointers, and stuff like that.

That said, picking up a new language isn't terribly difficult: as long as you know how to solve problems, and know algorithmic ways to go about solving problems, learning a lanuage is simply a process of picking up syntax and idomatic usage. Most of that can be done in a few days -- I learned Python in two days.
_________________
"...LeoDraco is a pompus git..." -- Mandrake
Back to top  
js71
Wandering DJ


Joined: 22 Nov 2002
Posts: 815

PostPosted: Mon Jul 07, 2003 4:45 am    Post subject: [quote]

but python is very similar to qb, is it not? Is it possible to code an rpg in python?
Back to top  
Rainer Deyke
Demon Hunter


Joined: 05 Jun 2002
Posts: 672

PostPosted: Mon Jul 07, 2003 5:26 am    Post subject: [quote]

-=(FRoG32)=- wrote:
but python is very similar to qb, is it not?


Not really. There are some superficial similarities, but under the hood the differences are enormous. In terms of features, Python is comparable to LISP, which makes it far more powerful than any BASIC variant.

Quote:
Is it possible to code an rpg in python?


Yes.

http://eldwood.com/ghost/
Back to top  
LeoDraco
Demon Hunter


Joined: 24 Jun 2003
Posts: 584
Location: Riverside, South Cali

PostPosted: Mon Jul 07, 2003 5:33 am    Post subject: [quote]

-=(FRoG32)=- wrote:
but python is very similar to qb, is it not? Is it possible to code an rpg in python?


Although I myself have not used it yet, I understand that PyGame is a relatively stable library by which one can produce graphical content.
_________________
"...LeoDraco is a pompus git..." -- Mandrake
Back to top  
Ninkazu
Demon Hunter


Joined: 08 Aug 2002
Posts: 945
Location: Location:

PostPosted: Mon Jul 07, 2003 2:04 pm    Post subject: [quote]

-=(FRoG32)=- wrote:
I wanna learn C++... :(


EBOOK...s http://www.geocities.com/ninkazu

Ya, you probably won't read them.
Back to top  
PoV
Milk Maid


Joined: 09 Jun 2002
Posts: 42
Location: DrAGON MaX (Canada)

PostPosted: Mon Jul 07, 2003 10:25 pm    Post subject: [quote]

A good friend of mine has done quite well for himself with the whole Python thang. Since switching from the C/C++ thang to Python, he's released some add ons for it, released a shareware game that was a finalist in the 2003 Independant Games Festival (though sadly didn't get a piece of the $20,000), and just recently landed a job at G00GLE. Now you gotta respect a company that has their own chef ;). You can check it out his game here:

http://www.alitius.com/

Fun stuff.


Last edited by PoV on Wed Jul 09, 2003 1:26 am; edited 1 time in total
Back to top  
Ninkazu
Demon Hunter


Joined: 08 Aug 2002
Posts: 945
Location: Location:

PostPosted: Tue Jul 08, 2003 12:12 am    Post subject: [quote]

PoVRAZOR wrote:
and just recently landed a job at G00GLE (enterered wrong so the real thing doesn't find it).


Uh... wuh?
Back to top  
PoV
Milk Maid


Joined: 09 Jun 2002
Posts: 42
Location: DrAGON MaX (Canada)

PostPosted: Tue Jul 08, 2003 1:47 am    Post subject: [quote]

I used Zero's instead of O's.

0O0O0O0O0O0O0

Aparently I'm the only person who pays attention to fonts. ;) ;).
Back to top  
Ninkazu
Demon Hunter


Joined: 08 Aug 2002
Posts: 945
Location: Location:

PostPosted: Tue Jul 08, 2003 4:20 am    Post subject: [quote]

I understand the 0O thing, but why do that? (if you say "so it can't pick it up" TELL ME WHY!)

grrr, I don't like you people who do this:
"Hey, can I have a napkin?"
"Yes"
"....um... you gonna give it to me?"
"Eventually."
"Just gimme the fuckin napkin, cock sucker"
"Now that, I can do"

The bastards...
Back to top  
Post new topic Reply to topic Page 1 of 2 All times are GMT
Goto page 1, 2  Next 



Display posts from previous:   
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum