[Tutor] Making a character jump with pygame

2005-10-04 Thread Joseph Quigley
Hi, I've edited the aliens.py example to make my character just move back and forth. However I can't make him jump! Here's my code (attached). I'm trying to make a platformer Mario style game. Thanks, Joe # Side Scroller v 0.1 a very simple

[Tutor] Beautiful soup

2005-10-04 Thread David Holland
I tried to use this script which I found on the web :- import urllib2, pprint from BeautifulSoup import BeautifulSoup def cellToWord(cell): """Given a table cell, return the word in that cell.""" # Some words are in bold. if cell('b'): return cell.first('b').string.strip()

Re: [Tutor] Beautiful soup

2005-10-04 Thread paul brian
How did you change it to look at the file on your PC? You appear to have told urllib2 to use "FRE_word_list.htm", it cannot find that online so tried to look for it on your local disk at '\\C:\\Python24\\FRE_word_list.htm I would suggest that you either put your local html on a web server and send

Re: [Tutor] Beautiful soup

2005-10-04 Thread Andrew P
With error messages like that, the interesting bits are usually at the end: OSError: [Errno 2] No such file or directory: '\\C:\\Python24\\FRE_word_list.htm That should read "C:\\Python24\\FRE_word_list.htm".  I use UNIX-style paths, which work fine for me under Windows, so it would just be "/Py

Re: [Tutor] Beautiful soup

2005-10-04 Thread Andrew P
Oops, Paul is probably right.  I thought urllib2 opened local files in the absence of an identifier like "http://".  Bad assumption on my part.  I remembered that behavior from somewhere else, maybe urllib. That path beginning with "\\C:\\" could still bite you, however.  Good luck, Andrew _

Re: [Tutor] Consistant Overhead Byte Stuffing (COBS) algorithm help

2005-10-04 Thread Michael Cotherman
A little more info is below: With miniterm modified to output hex to the screen, here is the data coming in unformatted. (note zero bytes delimit end of packet): c:\Python23>python miniterm1.1a.py --- Miniterm --- type ESC to quit 0002860104DB203F0102860504CB1A740102860504CB1B7401028

[Tutor] Trying to prevent ftplib from locking my script

2005-10-04 Thread Tim Rupp
Hi list, I'm trying to write a python script that uses ftplib to send items to a local server I have. I want to be able to give ftplib a file to send, and then just have it sort of go into the background and do its thing while the script does other "stuff" My attempts at it so far have caused the

Re: [Tutor] Consistant Overhead Byte Stuffing (COBS) algorithm help

2005-10-04 Thread Kent Johnson
I'm not sure what the question is here. It looks like you need to write a COBS encoder / decoder in Python, maybe using your .NET code as a model. Then you can integrate that with comms code taken from miniterm. What help do you need? Kent Michael Cotherman wrote: > Hello, I am really new to py

Re: [Tutor] Trying to prevent ftplib from locking my script

2005-10-04 Thread Kent Johnson
Tim Rupp wrote: > Hi list, > > I'm trying to write a python script that uses ftplib to send items to a > local server I have. I want to be able to give ftplib a file to send, > and then just have it sort of go into the background and do its thing > while the script does other "stuff" > > My attem

Re: [Tutor] Beautiful soup

2005-10-04 Thread Oliver Maunder
On 10/4/05, Andrew P <[EMAIL PROTECTED]> wrote: Oops, Paul is probably right.  I thought urllib2 opened local files in the absence of an identifier like "http://".  Bad assumption on my part.  I remembered that behavior from somewhere else, maybe urllib. The following function could be useful here

Re: [Tutor] Trying to prevent ftplib from locking my script

2005-10-04 Thread Andrew P
Normally I wouldn't pipe up here because threads really can be very tricky.  But check out: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/435883 I use this recipe, originally from "Python in a Nutshell", all the time, to solve exactly your problem.  Slow network stuff that I don't have

Re: [Tutor] Python equiv to PHP "include" ?

2005-10-04 Thread Larry Holish
On Thu, Sep 29, 2005 at 05:16:57PM -0400, Jay Loden wrote: > Does anyone know of any soup-to-nuts CGI programming examples online for > Python that might make this clearer so I can bug the list less and just read > some example code? You might also want to take a look at cgi_app, a simple pytho

[Tutor] Mod_python greedy url matching

2005-10-04 Thread Jay Loden
I'm having trouble with Apache and Mod_python - mod_python is set to use /var/www/html and pass all *.htm files on to the handler I wrote. Unfortunately, mod_python does a greedy match, so /var/www/html/subdirectory/file.htm still gets passed to the handler! Is there some way to limit the hand