![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Aug 2005
Posts: 5
Rep Power: 0
![]() |
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? |
|
|
|
|
|
#2 |
|
Programming Guru
![]() |
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 imagePygame 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.posThe 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. |
|
|
|
|
|
#3 |
|
Expert Programmer
Join Date: Dec 2004
Posts: 794
Rep Power: 4
![]() |
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 |
|
|
|
|
|
#4 | |
|
Professional Programmer
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4
![]() |
Quote:
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. |
|
|
|
|
|
|
#5 |
|
Professional Programmer
Join Date: Feb 2005
Posts: 434
Rep Power: 4
![]() |
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! |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|