Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Aug 29th, 2005, 7:26 PM   #1
bobfritzelpuff
Newbie
 
Join Date: Aug 2005
Posts: 5
Rep Power: 0 bobfritzelpuff is on a distinguished road
Basic->Python

I did a lot of programing in basic on a graphing calculator, got pretty good, and have now moved on to the computer languages where I am virtually incompetant. For now, I have three questions:

1. How do I get pictures on a screen? Like, lets say I want to move a stick figure from one point to another point. How do I display the stick figure?

2. How do I get input from a person? Not input like input(), but input like seeing if you have clicked your mouse and where you have clicked it.

3. How do people get well versed in python? Do you have a manual, or do you pick it up after a while of programming?
bobfritzelpuff is offline   Reply With Quote
Old Aug 29th, 2005, 7:49 PM   #2
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 1,888
Rep Power: 5 Sane will become famous soon enough
Send a message via MSN to Sane
1. Pygame : www.pygame.org

surface = pygame.image.load('filename.png') #load surface
othersurface.blit(surface, (x, y)) #copy surface to the screen
pygame.display.flip() #flip the surfaces to display the image

Pygame is a module for Python.

Documentation: http://www.pygame.org/docs/ and http://pygame.org/ftp/pygame-docs-1.6.exe

2. Using Pygame as well:

for event in pygame.event.get():
    if event.type == KEYDOWN:
        print event.unicode
    elif event.type == MOUSEBUTTONDOWN:
        print event.button, event.pos

The documentation is a sufficient learning resource as long as you test everything you read, it really helps and you'll catch on quickly.

3. I became well versed in Python after just using it multiple hours a day for a month. I didn't use a tutorial. I just learned the syntax from here: http://www.ibiblio.org/obp/thinkCSpy/

But Python is very different from Basic.
Sane is offline   Reply With Quote
Old Aug 29th, 2005, 11:21 PM   #3
uman
Expert Programmer
 
Join Date: Dec 2004
Posts: 794
Rep Power: 4 uman is on a distinguished road
and the "Basic" on a calculator is rather different than real Basic. Please call it TI-83 Basic (or whatever) to distinguish.
__________________
Few people deserve to be compared to (Rush) Limbaugh, most of them were convicted at the Nuremburg trials.
--WilliamSChips on Slashdot
uman is offline   Reply With Quote
Old Aug 30th, 2005, 7:14 PM   #4
Cerulean
Professional Programmer
 
Cerulean's Avatar
 
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4 Cerulean is on a distinguished road
Quote:
3. How do people get well versed in python? Do you have a manual, or do you pick it up after a while of programming?
You pick up a certain amount just programming, but you've got to constantly be searching for methods of doing certain things (or efficient methods), and constantly reading the built-in docs.
Sure, you can get by fine by just playing around knowing only the basic syntax, but if you do that you'll hit alot of pitfalls as you're not exploiting the language and taking advantage of its finer points, as Sane has discovered himself . You'll be writing unnecessary code, etc.
So on that point, i'd recommend read as much about the language as you can, check out the Daily Python URLs (http://www.pythonware.com/daily), and maybe read a couple of e-books.
Cerulean is offline   Reply With Quote
Old Sep 7th, 2005, 1:03 PM   #5
Dietrich
Professional Programmer
 
Dietrich's Avatar
 
Join Date: Feb 2005
Posts: 434
Rep Power: 4 Dietrich is on a distinguished road
Smile

When you install Python on your computer you will find a large doc file, on Windows computers it's called Python24.chm, containing a tutorial and an indexed reference manual.
__________________
I looked it up on the Intergnats!
Dietrich is offline   Reply With Quote
Old Sep 7th, 2005, 2:34 PM   #6
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
It's on the website too if you prefer HTML files. Pretty damn good as well.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:08 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC