Re: [Tutor] Retrieve data

2011-04-12 Thread Steven D'Aprano
l.leicht...@gmail.com wrote: Hello everyone, I would to retrieve data, and especially the temperature and the weather from http://www.nytimes.com/weather. And I don't know how to do so. Consider whether the NY Times terms and conditions permit such automated scraping of their web site. Be

Re: [Tutor] Print images links

2011-04-12 Thread Steven D'Aprano
l.leicht...@gmail.com wrote: Hello, I would like to print the adresses of every image that are on the main page of www.columbia.edu. Do you know how to do this? Pretty much the same answer applies as for your previous question. -- Steven ___ Tu

Re: [Tutor] Retrieve data

2011-04-12 Thread James Reynolds
NYtimes has an API http://developer.nytimes.com/ No clue on how well it works or even if the weather is in the API. Looks like a lot of fluff, like comments and such. At any rate, maybe you can request they add weather to their API. On Tue, Apr 12, 2011 at 12:36 PM

Re: [Tutor] Retrieve data

2011-04-12 Thread Rafael Durán Castañeda
You cand use urllib to connect that web page and then use a custom html parser to get exactly what you want, even I think you could use regex; just look source code from the webpage, check for the data you are interested in and get it. 2011/4/12 > Hello everyone, > > I would to retrieve data, a

Re: [Tutor] Print images links

2011-04-12 Thread Prasad, Ramit
I would use urllib2 with Python (for 2.x) plus some regular expressions. Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 5423 -Original Message- From: tutor-bounces+ramit.prasad=jpmchase@pytho

Re: [Tutor] Print images links

2011-04-12 Thread Noah Hall
On Tue, Apr 12, 2011 at 5:40 PM, wrote: > Hello, > > I would like to print the adresses of every image that are on the main page > of www.columbia.edu. Do you know how to do this? Yes, I do. ;) As this sounds like homework - Firstly, you want to grab the source code of the webpage. Secondly,

[Tutor] Retrieve data

2011-04-12 Thread l . leichtnam
Hello everyone, I would to retrieve data, and especially the temperature and the weather from http://www.nytimes.com/weather. And I don't know how to do so. Thank you, Louis Sent from my BlackBerry® on the MetroPCS Network ___ Tutor maillist - Tutor

[Tutor] Print images links

2011-04-12 Thread l . leichtnam
Hello, I would like to print the adresses of every image that are on the main page of www.columbia.edu. Do you know how to do this? Thanks Sent from my BlackBerry® on the MetroPCS Network ___ Tutor maillist - Tutor@python.org To unsubscribe or change

Re: [Tutor] Import multiple lines of text into a variable

2011-04-12 Thread Steven D'Aprano
Sean Carolan wrote: if line.startswith('notes'): break notes = open('myfile','r').read().split(notes:\n')[1] The first two lines are redundant you only need the last one. I should have clarified, the "if line.startswith" part was used to break out of the previous for loop, which was used to

Re: [Tutor] Converting files

2011-04-12 Thread Steven D'Aprano
sunil tech wrote: Hi all... is there any way to convert any file (eg: document files & image files) to .pdf? If the file is printable, print it to a PDF gateway that generates a PS or PDF file. If it is a Microsoft Office document, or similar, then install OpenOffice or LibreOffice and use

Re: [Tutor] Converting files

2011-04-12 Thread Andrés Chandía
this is the list for cherrypy "cherrypy-users" El Mar, 12 de Abril de 2011, 10:02, sunil tech escribió: thank you for all your valuable suggestions... but i want it to be converted using python code .. On Tue, Apr 12, 2011 at 2:38 AM, Evans Anyokwu onyx...@gmail.com> wrote: I use Open

Re: [Tutor] Converting files

2011-04-12 Thread Andrés Chandía
I don't know how to do it, but I'm 99% sure I have seen a something related in cherrypy pages, try googling "cherrypy pdf generation" or something similiar Good luck! El Mar, 12 de Abril de 2011, 10:02, sunil tech escribió: thank you for all your valuable suggestions... but i want it to be c

Re: [Tutor] Converting files

2011-04-12 Thread sunil tech
thank you for all your valuable suggestions... but i want it to be converted using python code .. On Tue, Apr 12, 2011 at 2:38 AM, Evans Anyokwu wrote: > I use Openoffice and it has an option to export your files to .pdf and lots > of other file formats. > It's a free download - and has all the

Re: [Tutor] Import multiple lines of text into a variable

2011-04-12 Thread Alan Gauld
"Sean Carolan" wrote > The first two lines are redundant you only need the last one. I should have clarified, the "if line.startswith" part was used to break out of the previous for loop, which was used to import the other, shorter strings. Thats fair enough if you are doing something with