basicprogramming.org


Welcome, Guest. Please login or register.
Did you miss your activation email?
Forum time; Jul 31. 2010, 04:45
Home Help Search Calendar Login Register
News: Have you got suggestions for BasicProgramming.org? Let's hear them!
Interested in creating your own programming language? Check out the QDepartment group!

+  BASIC programming forum
|-+  Basic Coding
| |-+  Other programming languages.
| | |-+  (python) hamster
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Reply Print
Author Topic: (python) hamster  (Read 81 times)
menn
Hero Member
*****
Offline Offline

Posts: 571


« on: Sep 23. 2009, 10:09 » Reply with quote

Code:
# hamster
# 2006 mennonite
# ported to python 2009
# public domain

import time, curses

def hamster(hmstr):
    curses.curs_set(0)
    while True:
        hmstr.addstr(16,0,"                             _--_    ")
        hmstr.addstr(17,0,"                           .`\   `.  ")
        hmstr.addstr(18,0,"                           /  \   \  ")
        hmstr.addstr(19,0,"                           \   \:)/  ")
        hmstr.addstr(20,0,"                           ',/\~\,'  ")
        hmstr.addstr(21,0,"                           / '--' \  ")
        hmstr.addstr(22,0,"                          /________\ ") ; hmstr.refresh()
        time.sleep(0.05)
        hmstr.addstr(16,0,"                             _--_    ")
        hmstr.addstr(17,0,"                           .`  | `.  ")
        hmstr.addstr(18,0,"                           /   |  \  ")
        hmstr.addstr(19,0,"                           \  | :)/  ")
        hmstr.addstr(20,0,"                           ',/~/\,'  ")
        hmstr.addstr(21,0,"                           / '--' \  ")
        hmstr.addstr(22,0,"                          /________\ ") ; hmstr.refresh()
        time.sleep(0.05)
        hmstr.addstr(16,0,"                             _--_    ")
        hmstr.addstr(17,0,"                           .`   /`.  ")
        hmstr.addstr(18,0,"                           /   /  \  ")
        hmstr.addstr(19,0,"                           \  / :)/  ")
        hmstr.addstr(20,0,"                           ',/\~/,'  ")
        hmstr.addstr(21,0,"                           / '--' \  ")
        hmstr.addstr(22,0,"                          /________\ ") ; hmstr.refresh()
        time.sleep(0.05)
        hmstr.addstr(16,0,"                             _--_    ")
        hmstr.addstr(17,0,"                           .`    `.  ")
        hmstr.addstr(18,0,"                           /______\  ")
        hmstr.addstr(19,0,"                           \    :)/  ")
        hmstr.addstr(20,0,"                           ',\~/\,'  ")
        hmstr.addstr(21,0,"                           / '--' \  ")
        hmstr.addstr(22,0,"                          /________\ ") ; hmstr.refresh()
        time.sleep(0.05)

curses.wrapper(hamster)
Report to moderator   Logged

an "all purpose" language calls for- as much as can possibly be reasonable- an "all purpose" forum. the worst thing happening to modern basic? too many pointless rules and painting everything into corners. most modern basic forums are like that too.
Pages: [1] Go Up Reply Print 
« previous next »
Jump to:  
Atom RDF RSS 0.91 RSS 2.0


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!