I found Python much easier to use since everything is built right into
the language. I am also moving my applications to Python and Dabo and I
was amazed at how quickly I was able to replace all of the web stuff
with Python. I read XML files from URL and parse them into csv files
which I load into VFP tables. I also send email notifications using
SMTP which is also very easy to do in Python.
So rather than use a mix of VFP and wwIPStuff my web/xml/email module is
written in Python and is separate from my VFP app. The text processing
in Python is significantly faster than the VFP code it replaces, too.
A really cool thing is that when I call it using the run command I use a
wxPython (ie Dabo) window with a status bar (thermometer) while it is
running and you can't tell that it is not part of the VFP application.
Try it, you'll like it.
Jeff
Jeff Johnson
[EMAIL PROTECTED]
SanDC, Inc.
623-582-0323
Fax 623-869-0675
Steve Ellenoff wrote:
> Thanks for sharing that Jeff. I'm curious why you decided to switch?
> I've been using wwipstuff for years and have been happy with it. Is
> it more reliable, more robust, or you just wanted a change?
>
> At 06:45 PM 1/10/2008, you wrote:
>> Grigore: Just in case you might be interested in looking at Python, I
>> used to use wwIPStuff but have recently replaced all of my http and xml
>> stuff with Python. Here is an example that will read www.leafe.com
>>
>> # indentation and case is important
>> import httplib
>>
>> def saveResponse(txt):
>> filePath = 'http.txt'
>> file = open(filePath, 'w')
>> file.writelines(txt)
>>
>> httpServ = httplib.HTTPConnection('www.leafe.com', 80)
>> httpServ.connect()
>>
>> # You can replace the '/' with a uid and password string if required in
>> # fact that is required on my usage.
>> httpServ.request('GET', '/')
>>
>> response = httpServ.getresponse()
>> if response.status == httplib.OK:
>> saveResponse(response.read())
>>
>>
>> I save it as a text file get_http.py and call it from the FoxPro run
>> command:
>>
>> ! /N c:\python25\pythonw.exe get_http.py
>>
>> HTH
>>
>> Jeff
>>
>> Jeff Johnson
>> [EMAIL PROTECTED]
>> SanDC, Inc.
>> 623-582-0323
>> Fax 623-869-0675
>>
>> Grigore Dolghin wrote:
>>> Hi. I am stuck trying to read the content of a webpage. I
>> navigate to that page, and try to extract the HTML in a local
>> variable (I need to do some parsing on the page's text).
>>> However, it seems that oIe.Document.Body.InnerHTML returns
>> something else than I see if I right click the page and choose
>> "View page source".
>>> Any ideas how to read the html in a local var?
>>>
>>> Thank you.
>>
>>
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.