 |  |

 |
 |  |  |
 | Welcome to CS1315. Click on the python to add comments.
|  |
 |  |  |
|
This page removed for FERPA compliance
|
        |
Fall 2004 Homework 6 Questions
Got troubles hunting down headlines and putting 'em in movies?
Ask about it here!
Read this first
Tips to help you get the fastest and best response:
- If there is an error tell us when it occurs: Upon loading or upon running the program.
- Copy/Paste any error messages.
- Post a line of two of the code where the error is occurring
- Include your name, email or screename in case we need to ask you further questions (Note: This is completely voluntary)
|
What website are we grabbing headlines from?
http://news.news.com http://news.com.com ???
| The one that exists! Try going to both of them and you will see that http://news.com.com is the one that is a technology based news website! Student117 |
tempstart = weather.rfind(">",0,temploc)
What does the 0 mean in this line?
| rfind will find the last occurrence of ">" in the string named weather in the range of characters starting at 0 and ending at temploc. | Bill Leahy |
How do you program it to find the second instance that something occurs?
| Find the first instance using find. Then, call find again but this time setting the starting position one higher than where you found the first one. | Bill Leahy |
Ok let me get this stright. So we go to http://news.com.com and then find the "News Around the Web" link and then from there we go to the source and get the top three headlines from that page?
| Not exactly. You write a program that opens up http://news.com.com and reads in the html file. Your program then finds the top three headlines and builds frames that when made into a movie will give the ticker tape effect using the headlines. | Bill Leahy |
Ok that last question was worded poorly. I have a program that opens up http://news.com.com and reads in the html file but I don't know where to find the headlines you want us to get under "News Around the Web."
| Open up http://news.com.com in a browser and view source. Try to determine some unique charcter strings that you could search for to find the headline text you are searching for. | Bill Leahy |
From what i can see...There are no headlines under "News Around the Web" heading on the http://news.com.com main page. There are headlines under "More news from around the Web". Is that what you want us to use?
| Yes, that would be okay. | Bill Leahy |
So was Homework 6 also extending to this Monday, or is it still due on Friday?
| Yes, HW6 is due Monday.It is marked on the schedule at: http://coweb.cc.gatech.edu/cs1315/1811 | Bill Leahy |
It's a little confusing as to which headlines are the headlines you want. Possibly the website changed since the assignment was made? Because the headers are: Today's Top Headlines (there's only 2), (no header, but what seems to be the main headlines/stories), Most Popular Headlines, and More News From Around the Web
| It will be okay if you use: More news from around the Web | Bill Leahy |
k, makin sure; do we grab the headlines and make a ticker tape with those three headlines, or do we make a tickertape from the entire stories?
I have a question! Is this like the Excel lab, where we have an output file (.txt), or do we just grab the headlines and put them directly into our program?
| Preferably just put them directly into the tickertape. If you did it with a txt file, it certainly would not be wrong. See if you can do it without the txt file though. Student549 |
what does the assignment mean that we MUST use at least one subfunction?
| The assignment requires you to write a function. That function must call at least one other function that your write. | Bill Leahy |
Can we grab all the headlines? Or should I we just do the first 3?
| You can grab all you want but your movie should just have 3 | Bill Leahy |
def makeNewsTickerTape(directory):
grabWebpage("http://news.com.com")
start = webpageInfo.find("More news around the Web",0)
This error keeps coming up for this part of my code. A local or global name could not be found. You need to define the function or variable before you try to use it in any way. Name error: webpageInfo
I don't understand why i'm getting the error, i entered the subfunction grabwebpage(webpagelocation) and i returned webpageInfo. What else could be wrong?
| You need to put the return value of grabWebpage into a variable: webREMOVEDInfo = grabWebpage(...) | Bill Leahy |
is it ok if the headlines are displayed in this manner on our frames: FIRST HEADLINE:The lean, green service machine ?? like what i mean is, is it ok if it has the <b>
and </b>
??
ok i wrote the above question but seems that the code that i used got interpreted as html, so what i had wanted to ask was that my headlines have the html symbols of bold before and after the titles in the frames, is that fine?? can i leave it like that??
| No, it shouldn't have html tags. | Bill Leahy |
An attempt was made to call a function with a parameter of an invalid type. This means that you did something such as trying to pass a string to a method that is expecting an integer.
The above error was given for:
for frame in range(1,101):
canvas = getMediaPath(makePicture("640x480.jpg"))
Any suggestions?
| canvas = makePicture(getMediaPath("640x480.jpg")) | Bill Leahy |
nevermind, i figured it out
For some reason my first headline ends up printing out the date, the second headline ends up the first headline, and the third headline ends up the second. Any suggestions for the best way to move all of the headlines up by one and eliminate the date?
| This means that there is an error in your program. Your logic to find the strings may have an error and be finding the date in the page. Check carefully how you are searching for things (i.e. make sure you have the right case–upper or lower–in your search string. | Bill Leahy |
To get the text from the website, do we copy it into a text file or do we take the headlines directly from the website and then store them
| Your program when run (at any time) should go out to the webpage and get the current headlines and make the 100 frames. | Bill Leahy |
Do we assume that therew ill always be the heading repeated twice in the source file
| Well, in all honesty this sort of program might be very unreliable. For the program to work properly it depends on the kinREMOVEDss of strangers. In other words, it assumes that certain things will be present in the web page that you can use to find what you are looking for. So you should pick things that look like they might be there for a while. But in reality the nice folks at news.com.com might decide tomorrow to completely revamp their webpage and no of these programs would work. But that's okay. | Bill Leahy |
For the canvas, do we use getMediaPath for it and assume TAs will set the appropriate setMediaPath??
| Yes or if you want you can use makeEmptyPicture to make a 640 x 480 canvas. | Bill Leahy |
My program is grabbing too much of the webpage. I don't really understand from the example on page 256 how to tell the program where to start and stop grabbing information. Do we have to tell it for each headline? Or is there a way to get all three headlines at once?
| You need to use logic and the find method to locate the three headines using things that are "constant" in the web page. You will need to view the source of the web page to try and figure out what things will let you locate each of the three headlines. | Bill Leahy |
In the first frame, does the whole heading have to be shown, or can it be cut off??
| It can (and should be) cut off. | Bill Leahy |
When I try to run my function i get an error that says:
Note: There is no file at C:\JES\640x480.jpg
makePicture(filename): There is no file at C:\JES\640x480.jpg
An error occurred attempting to pass an argument to a function.
in file C:\Documents and Settings\Owner\My Documents\officehours.py, on line 4, in function makeNewsTickerTape
in file C:\JES\Sources\media.py, on line 749, in function makePicture
ValueError:
^ You need to set the media path, I think.
Well, I have in my code: canvas = makePicture(getMediaPath("640x480.jpg")). Is there something else that i'm missing?
| before you run the program, you need to setMediaPath() so that JES knows where to look for the file. Your TAs will do this too. So, just before you run your function (any time before will do) type in the black part setMediaPath() and find your media sources folder and that should work. Student1919 |
My ticker tapes only start to show at frame 85. Is it ok?? Because the instructions say that "(In100 frames, you won't make it all the way across the screen – that's fine.)"
| No. Part of the headlines should show almost immediately. Then as the movie progresses more and more of the text is revealed. The note is saying that if you move the text 5 pixels of less in 100 frames it won't make it all the way across 640 pixels which is okay. | Bill Leahy |
I have a bunch of questions...
Here is my code to pull the headline off of news.com.com
def findHeadlineLive():
import urllib
connection=urllib.urlopen("http://news.com.com")
headline = connection.read()
connection.close()
curloc = headline.find("More News from Around the Web")
if curloc <> -1:
hl1loc = headline.find("",curloc)
hl1start = headline.rfind(">",0,hl1loc)
hl2loc = headline.find("",curloc)
hl2start = headline.rfind(">",1,hl2loc)
return headline[hl1start+1:hl1loc], headline[hl2start+1:hl2loc]
#print headline[hl1start+1:hl1loc]
if curloc == -1:
return "They must have changed the page format -- can't find the headlines"
How in the world do you find the second headline or instance that a headline shows up? The responce up above was "call find again but this time setting the starting position one higher than where you found the first one" but that made no sense. I tried adding one to everything in the hl2start line, and I tried changing numbers around... nothing worked. Is there anything in the book about this or are we supposed to just know this stuff? I read chapter 10 and 11 and didn't find anything about finding a second instance on a website.
| I wouldn't try and write three different functions to find the three headlines. I would write a single function find all three headlines and return a list containing the three strings. Example follows. | Bill Leahy |
def find3headlines(string)
returnvalue = []
# Code here to find first headline assume it's in a var: head1
returnvalue.append(head1)
# Code here to find second headline assume it's in a var: head2
returnvalue.append(head2)
# Code here to find third headline assume it's in a var: head3
returnvalue.append(head3)
Then I would call the function:
headlines = find3headlines(webpage)
and then you can access each string like this headlines[0] or headlines[1] or headlines[2]
|
My second question is how do I put this headline into the movie. I looked off the example makeHomeREMOVED() and findTemperatureLive() functions. The way they imported the string of information from ajc to the created webpage was with the command """+findTemperatureLive()+""".
Of course if I use the same command as used in this example it doesn't work.
Again... is there place in the book that explains how to import the string I found in my above code (findHeadlineLive()) into my makeNewsTicker function?
Here is a list of some of the commands I tried, none of which worked.
addText(canvas, 640-(frame*5), 100, """+str(findHeadlineLive())+""")
addText(canvas, 640-(frame*5), 100, """+findHeadlineLive()+""")
addText(canvas, 640-(frame*5), 100, +findHeadlineLive()+)
addText(canvas, 640-(frame*5), 100, "+findHeadlineLive()+")
addText(canvas, 640-(frame*5), 100, ' """+findHeadlineLive()+""" ')
| Try: addText(canvas, 640-(frame5), 100, findHeadlineLive() ) | Bill Leahy |
didn't work
when I did this:
addText(canvas, 640-(frame5), 100, findHeadlineLive())
I got this error:
An attempt was made to call a function with a parameter of an invalid type. This means that you did something such as trying to pass a string to a method that is expecting an integer.
| I would try to save the returned results as variables in your function, then put them into addText. For a few reasons. One, from your function findHeadlineLive() you are returning 3 results (or if you use bill's example above, you are returning a list of 3 results). You don't want to pass that into your function. Second of all, you can use print statements to see what you are getting for findHeadlineLive. Make sure that you are returning strings with your function findHeadlineLive() too :) Student1919 |
I wasn't exactly sure how to recall the variable in the addText line but I tried what you said.
nothing that I tried worked.
line1=findHeadlineLive()
canvas = makePicture(getMediaPath("640x480.jpg"))
printNow("Frame number: "+str(frame))
addText(canvas, 640-(frame*5), 100, "+str(line1)+" )
or
addText(canvas, 640-(frame*5), 100, "+line1+" )
or
addText(canvas, 640-(frame*5), 100, line1 )
Could my computer be messed up because all these suggestions I am getting don't work.... this is getting real frustrating.
| Well instead of trying to convert line1 to a string by saying str(line1) you need to make sure you are returning a string from fineHeadlineLive(). But, if you are deadset on not returning a string, you can try str(line1) without quotes, because that should change line1 to a string for you. the quotes are only to make text a string that is inside of there. Does that make sense? Hope so. Student1919 |
I can find the first headline on that webpage. What do I change in the code to find the second headline?
def findHeadlineLive():
import urllib
connection=urllib.urlopen("http://news.com.com")
headline = connection.read()
connection.close()
curloc = headline.find("More News from Around the Web")
if curloc <> -1:
hl1loc = headline.find("",curloc)
hl1start = headline.rfind(">",0,hl1loc)
return headline[hl1start+1:hl1loc]
#print headline[hl1start+1:hl1loc]
if curloc == -1:
return "They must have changed the page format -- can't find the headlines"
| Just repeat all of the above code and then add more code to find the next headline | Bill Leahy |
Why does our main function have to call a subfunction? My function works perfectly alone. Besides, I have already demonstrated (in previous assignments) that I can write a function that calls a subfunction. Why is our creativity being curtailed?
| It's not a matter of your creativity being curtailed. It's a matter of making life easier for you. You already have a tickerTape function you can easily modify. So why change the code when you can use that one? You already have most of the code to get the text from a webpage. Just some minor changes. Why should you (again) write a new code? Then your main function can do one and only one thing. That is an important concept is making codes simple and universal so they do one and only one thing. Student1919 |
i can't view the sources of any webpages on my computer. is there a setting i need to change?
| What happens when you click on view source? | Bill Leahy |
I can't even get my fineHeadline funtion to work. Is there something I need to pun in the command areas?
| It depends on what your code is calling for. I don't know what to tell you without the code. Student1919 |
so is the webpage going to be saved on the TA's disk? I'm basing my code off of the lecture slides, and it doesn't work
| No, the webpage is on the internet. Look for the example where the temperature is taken from a website. | Bill Leahy |
when i click on view source, absolutely nothing happens
| Okay, try this. When you are looking at the page click on file and then click on Save As and at the bottom select "Web REMOVED, HTML only". This will save the webpage on your disk. Then use notepad or JES or whatever is your favorite editor to open the file. Note: You can't open it by double clicking. You will need to start whatever editor you want and do a File-open and select the file. | Bill Leahy |
When the program writes our headlines on the canvas, it seems that it writes the same headline over itself continuously. It makes a blur across the page rather than a readable headline. Why is that?
| Check where your y-coordinate is in the addText() function. They need to be different for each of the 3 headlines. Student1919 |
You are trying to access a part of the object that doesn't exist.
in file C:\JES\Sources\JESDebugger.py, on line 142, in function run
in file C:\JES-SA1a\jython\Lib\bdb.py, on line 351, in function run
in file input, on line 1, in function ?
in file C:\Documents and Settings\REMOVED Narewski\My Documents\makeNewsTickerTape.py, on line 40, in function makeNewsTickerTape
in file C:\Documents and Settings\REMOVED Narewski\My Documents\makeNewsTickerTape.py, on line 47, in function tickertape
in file C:\JES-SA1a\jython\Lib\bdb.py, on line 44, in function trace_dispatch
in file C:\JES-SA1a\jython\Lib\bdb.py, on line 56, in function dispatch_line
in file C:\JES\Sources\JESDebugger.py, on line 59, in function user_line
in file C:\JES\Sources\JESDebugger.py, on line 115, in function interaction
in file C:\JES\Sources\JESDBVariableWatcher.py, on line 390, in function snapShot
in file C:\JES\Sources\JESDBVariableWatcher.py, on line 294, in function snapShot
in file C:\JES\Sources\JESDBVariableWatcher.py, on line 251, in function addLine
in file C:\JES\Sources\JESEditorDocument.py, on line 313, in function highlightLine
AttributeError: 'None' object has no attribute 'getStartOffset'
Please check line 47 of C:\Documents and Settings\REMOVED Narewski\My Documents\makeNewsTickerTape.py
My code keeps saying this after finishing writing all 100 frame
line 47 reads for framenumber in range (1, 102):
the range is 1-102 because we called framenumber=framenumber +1 before writing the frames to file and I started above the for statement with framenumber=0
| What do the few lines before and after this line say? Sometimes JES gives you an error and points to the wrong line. The error seems to imply that you are calling getStartOffset somewhere and JES doesn't understand it. Student1594 |
I am getting the following error for the code copied below (after the addtext(canvas,...), but string1 is defined in the code prior to where this occurs [gtg887a]:
A local or global name could not be found. You need to define the function or variable before you try to use it in any way.def
tickertape(directory, string1, string2, string3):
for frame in range (0, 101):
canvas = makePicture(getMediaPath("640x480.jpg"))
addtext(canvas,600-(frame5), 100, string1)
| Simple answer is that you cannot get strings out of a function like |
that. You could have a function that found the three strings and then called another function that woukd make the movie. That second function would get passed in the three strings.|Bill Leahy|
we don't call get start Offset at all. the program does all that it is supposed to do but afterward it does calls that error
| I'm sorry I don't understand what you are asking? | Bill Leahy |
thank you! the save as way worked!
What string goes in between the quotes–>
hl1loc = headline.find("",curloc)
Is it a html code or regular text?
Well, it depends on what you are trying to find but it will certainly be something that is in the web page so it could be either. You could be searching for the word "More" or an html tag:<b> | Bill Leahy |
i submitted my hw as hw6, the zip file created from the turnin is on my computer now, but when i check imran hirani's hw6 turnin verification it doesn't show anybody as having turned it in. (i've waited about an hour now)
e-mail: gtg668h
| Could you try it again? Thanks. | Bill Leahy |
In order to find where the headline are located I visited the website and clicked view source to see the html. However, all the source shows is this
| Okay, try this. When you are looking at the page click on file and then click on Save As and at the bottom select "Web REMOVED, HTML only". This will save the webpage on your disk. Then use notepad or JES or whatever is your favorite editor to open the file. Note: You can't open it by double clicking. You will need to start whatever editor you want and do a File-open and select the file. | Bill Leahy |
When I click on view source for the web site it only gives me one line of html, which doesn't include anything about the headlines.
| Okay, try this. When you are looking at the page click on file and then click on Save As and at the bottom select "Web REMOVED, HTML only". This will save the webpage on your disk. Then use notepad or JES or whatever is your favorite editor to open the file. Note: You can't open it by double clicking. You will need to start whatever editor you want and do a File-open and select the file. | Bill Leahy |
| Also, press the down arrow lots of times. Ther emay be a lot of blank lines in the file | Bill Leahy |
Do the headlines have to run one after the other - or can they run at the same time, but in different places. For instance, the 1st one goes at y=100, 2nd at y=200, & 3rd y=300. Is that okay?
| Yes, that is what they are supposed to do. Run across the screen at the same time at different y's | Bill Leahy |
writePictureTo(framepict, directory+"//frame0"+framenum+".jpg")
gives me this error
Please check line 43 of C:\Documents and Settings\Nathan\Desktop\hw6.py
>>> makeNewsTickerTape('r C:\Documents and Settings\Nathan\Desktop\CS 1315')
-1
writePictureTo(pict,filename): Path is not valid
An error occurred attempting to pass an argument to a function.
Please check line 45 of C:\Documents and Settings\Nathan\Desktop\hw6.py
| Check to see that directory is correct. Is framenum a string and not a number? | Bill Leahy |
when i search for "more news around the web" i get -1 as result for position??
| Searching is case sensitive. | Bill Leahy |
My program creates 100 frames from 640x480.jpg, with the first three headlines at the correct y locations, incrementing them across the screen 3 pixels at a time. But when I try to make the movie, after entering the frame rate and file name and quality level, squeak says "Error: image format not recognized" and tells me I should just hit abandon. Why?
squeak error guy's email - gtg833k
| Have you tried Moviemaker? | Bill Leahy |
4:38 AM, still working on this hw
def find3headlines(directory):
import urllib
connection=urllib.urlopen("http://news.com.com")
headline = connection.read()
connection.close()
curloc = headline.find(">More News from Around the Web")
returnvalue = []
# Code here to find first headline assume it's in a var: head1
if curloc <> -1:
hl1loc = headline.find("/b",curloc)
hl1start = headline.rfind("",0,hl1loc)
return head1[hl1start+1:hl1loc]
returnvalue.append(head1) #(line 26)
I tried to do this based on the example given earlyer by Bill Leahy
here is the error:
">>> makeNewsTickerTape("/Users/viacheslavbatyrev/desktop/hw6/")
A local or global name could not be found. You need to define the function or variable before you try to use it in any way.
Please check line 26 of /Users/viacheslavbatyrev/Desktop/hw6/hw6.py"
:-S any idea why this doesn't work ..
My aim sn is Slavacus
oh yea... i searchd for < b > btw ... meh
nevermind figured it out
there.. lets close that thing -SB
To clarify some things... If, in our overall solution, we have several functions that are written, but in the makeNewsTickerTape function, we only call on one function... does this fulfill the subfunction requirement?
So, that really is this:
def makeNewsTickerTape(directory):
headlines3(directory)
Then there will be lots of other lines of code and several other programs in the complete solution.
| As long as there is more than one function and they all get called you are okay. | Bill Leahy |
Also, in order to get the canvas for the tickertape, the TAs will be doing a Get/Set media path, yes?
Do we turn in the file with the frames in it also? Or just the code?
| Just turn in your code. Optionally you can turn in the image you use for your canvas also. | Bill Leahy |
When I try to run my function I get an error message that says:
writePictureTo(pict,filename): Path is not valid
An error occurred attempting to pass an argument to a function.
in file C:\Documents and Settings\Shellian Holm\My Documents\makeNewsTickerTape.py, on line 10, in function makeNewsTickerTape
in file C:\unzipped\JES.4\JES\Sources\media.py, on line 909, in function writePictureTo
ValueError:
Please check line 10 of C:\Documents and Settings\Shellian Holm\My Documents\makeNewsTickerTape.py
What am I doing wrong?
| Right before you write the picture, add a line that says print filename. Make sure that whatever it prints is a valid path on your computer. Student1594 |
"Then search for the beginning of the anchor a, then you can find the anchor text, which is the headline." - Does my program have to search for the a exactly, or if I have it searching for something else and that works, is that ok?
| Yes, any technique that finds the three headlines is fine. | Bill Leahy |
if frame < 10:
writePictureTo(canvas,dir+"//frame00"+framenum+".jpg")
if frame >= 10:
writePictureTo(canvas,dir+"//frame0"+framenum+".jpg")
the code above is giving me this error:
An attempt was made to call a function with a parameter of an invalid type. This means that you did something such as trying to pass a string to a method that is expecting an integer.
in file C:\Documents and Settings\Quetia\My Documents\makeNewsTickerTape.py, on line 2, in function makeNewsTickerTape
in file C:\Documents and Settings\Quetia\My Documents\makeNewsTickerTape.py, on line 39, in function makeTape
TypeError: __add__ nor __radd__ defined for these operands
Please check line 39 of C:\Documents and Settings\Quetia\My Documents\makeNewsTickerTape.py
i don't know what this error means. someone help! my aim sn is Quetia07
| Did you convert frame into framenum? i.e. framenum = str(frame) | Bill Leahy |
line 39 is the first writePictureTo line
i did convert frame into framenum. lequetia
I'm having the same problem as last week with writeFrame function. Never found out what was wrong and asked many people. Seems like others are having the same problem.
def writeFrame(num,directory,framepict):
# Have to deal with single vs. double digit frame numbers differently
framenum=str(num)
if num < 10:
writePictureTo(framepict,directory+"//frame0"+framenum+".jpg")
if num >= 10:
writePictureTo(framepict,directory+"//frame"+framenum+".jpg")
>>> makeNewsTickerTape(setMediaPath())
New media folder: C:\JES\MediaSources\
An attempt was made to call a function with a parameter of an invalid type. This means that you did something such as trying to pass a string to a method that is expecting an integer.
What am I doing wrong (for the second straight week)?
| He means more so, did you make an integer a string using srt()? That error means that you are trying to use a string where it is expecting integers (manipulatable numbers) Student117 |
I cant turn in HW6.
I attached it to my TA's page but it shows as makeNewsTickerTape.py
There is no zip file to attach.
I moved fron the LEC to the LWC and I am still having the same problem. gtg075e
JES says:
An error has occurred in the turnin process. It is likely that the program turnin has failed. Please check JES's settings and resubmit the assignment.
Error: File not found - gtg075e-HW_6zip(Access is denied)
| Use the backup turnin process that you learned in Lab1? | Bill Leahy |
I attached it to my TA's page but it shows as makeNewsTickerTape.py
How is the TA going to know that I turned it in & not someone else. gtg075e.
You need to zip up the file and then upload it.
Ok, this is my code so far...
def makeNewsTickerTape(directory):
makeTickerTape("story1","story2","story3",directory)
def makeTickerTape(story1,story2,story3,directory):
import urllib
connection=urllib.urlopen("http://news.com.com/")
news=connection.read()
connection.close()
pop1=news.find("More news from around the Web")
pop2=news.find("More news from around the Web",pop1+1)
bold1=news.find("b",pop2+1)
text1start=bold1+3
bold2=news.find("/b",bold1)
text1stop=bold2-1
story1=news[text1start:bold2]
pop1=news.find("More news from around the Web")
pop2=news.find("More news from around the Web",pop1+1)
boldd1=news.find("b",pop2+1)
text2start=boldd1+3
boldd2=news.find("/b",boldd1)
text2stop=boldd2-1
story2=news[text2start:boldd2]
pop1=news.find("More news from around the Web")
pop2=news.find("More news from around the Web",pop1+1)
bolddd1=news.find("b",boldd2+1)
text3start=bolddd1+3
bolddd2=news.find("/b",bolddd1)
text3stop=bolddd2-1
story3=news[text3start:bolddd2]
for frame in range (1,101):
canvas=makePicture(getMediaPath("640x480.jpg"))
addText(canvas,400-((frame-99)*3),100,story1)
addText(canvas,400-((frame-99)*3),200,story2)
addText(canvas,400-((frame-99)*3),300,story3)
framenum=str(frame)
if frame < 10:
writePictureTo(canvas,dir+"//frame0"+framenum+".jpg")
if frame >= 10:
writePictureTo(canvas,dir+"//frame"+framenum+".jpg")
Now, whenever I set the media path in and then call the function:
>>> makeNewsTickerTape("C:\Documents and Settings\Emily Lauren Tate\My Documents\My Videos\")
I get this in response:
Your code contains at least one syntax error, meaning it is not legal jython.
| This would have been better: makeNewsTickerTape("C:\\Documents and Settings\\Emily Lauren Tate\\My Documents\\My Videos") | Bill Leahy |
Link to this Page
- Homeworks-Fall 2004 last edited on 25 January 2005 at 8:25 am by lawn-199-77-209-131.lawn.gatech.edu