Re: [Tutor] Help with photo wall
thank you Luke, It's a bit more complicated than that, all the images are in one massive jpg file similar to those in http://cdn.nhl.com/ducks/images/upload/2008/06/FanPhotos3.jpg also the joystick is a usb module so I didn't think that would work. with regards to the wasd keys there is a glitch that you have to keep tapping them. I also might be able to get the usb adapter in tome so would like to use the arrow keys as a backup. btw do you have any info on the pygame.movie module as i would like to show a YouTube vid first then go immediately into the main program, but the system must wait until I am ready to start which I would signal with the space bar. sorry for being a pain. but thanks a bunch cyberjacob ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] reading and processing xml files with python
hello all, I am currently making a birthday prezzie for someone (deadline is Thursday night). the basic idea is a wall of photos that you can move about to view different ones using a joystick and press the joystick button to hear a roughly five second commentary that is individual for each photo. I currently have a wall of photos that you can navigate using the wasd keys. all help in creating the final product in time would be appreciated and you would be mentioned in the credits by a nickname (IE. cyberjacob). I am currently using the pygame library. any more detail can be supplied including full source code, thanks everyone, i need all the help I can get to finish this in time please reply ASAP thanks once again cyberjacob ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] parallel port commands
does anyone know how to replace the C comands inp() and outb() these are used for parallel port communication ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] gui further explained
does anyone know how to make a parallel or serial interface with respective software, i would prefer parallel because it is easy to utilise ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] saveing and loading text data
hi everyone, I'm a bit new here but i was wondering if someone could check some of my code, it's not doing quite what it's meant to. the problem is when you start the application again and enter the databox.txt to load from thanks Databox_2_0.py: import sys, os pygame.init() def load(filename): if filename != '': e = 1 dec = "placeholder" fic = open(filename, "r") while dec != '': num = str(e) print "found " + num + " enteries" dec = fic.readline(e) databox[e] = dec dec = fic.readline((e+1)) databox2[e] = dec e = e+1 fic.close() else: return 0 def search(): print "\n" x = 1 items = len(databox) ins = items+1 while ins > x : dac = databox[x] dac2 = databox2[x] x = x + 1 print dac + " " + dac2 print "\n\n" def add(): dat = raw_input("First name.\n") dat2 = raw_input("\nSecond name.\n") items = len(databox) ins = items+1 databox[ins] = dat databox2[ins] = dat2 print "Done.\n\n" def exitprog(): fic = open('databox.txt','w') print "saveing\n" x = 1 items = len(databox) ins = items+1 while ins > x : dac = databox[x] dac2 = databox2[x] x = x + 1 fic.write(dac) fic.write(dac2) fic.close() print "goodbye" pygame.time.delay(900) exit() databox = dict() databox2 = dict() go = raw_input("filename, blank for none.\n") load(go) while True: print "Welcome to databox V2.0." print " 1. Searth the database." print " 2. Add a record." print " 3. Exit." inme = raw_input("Please make a selection.\n") if inme == "1": search() elif inme == "2": add() elif inme == "3": exitprog() else: print "input not recignised." ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] Code Dosent work.
hi everyone, I'm a bit new here but i was wondering if someone could check some of my code, it's not doing quite what it's meant to. thanks Databox_2_0.py: import pygame, sys, os pygame.init() def load(filename): if filename != '': e = 1 dec = "placeholder" fic = open(filename, "r") while dec != '': num = str(e) print "found " + num + " enteries" dec = fic.readline(e) databox[e] = dec dec = fic.readline((e+1)) databox2[e] = dec e = e+1 fic.close() else: return 0 def search(): print "\n" x = 1 items = len(databox) ins = items+1 while ins > x : dac = databox[x] dac2 = databox2[x] x = x + 1 print dac + " " + dac2 print "\n\n" def add(): dat = raw_input("First name.\n") dat2 = raw_input("\nSecond name.\n") items = len(databox) ins = items+1 databox[ins] = dat databox2[ins] = dat2 print "Done.\n\n" def exitprog(): fic = open('databox.txt','w') print "saveing\n" x = 1 items = len(databox) ins = items+1 while ins > x : dac = databox[x] dac2 = databox2[x] x = x + 1 fic.write(dac) fic.write(dac2) fic.close() print "goodbye" pygame.time.delay(900) exit() databox = dict() databox2 = dict() go = raw_input("filename, blank for none.\n") load(go) while True: print "Welcome to databox V2.0." print " 1. Searth the database." print " 2. Add a record." print " 3. Exit." inme = raw_input("Please make a selection.\n") if inme == "1": search() elif inme == "2": add() elif inme == "3": exitprog() else: print "input not recignised." ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor