pen a browser instance, and PAMIE
is quite slow, and I expect Selenium to be quite slow as well.
How are you navigating around these Javascript based pages? Is there a
library or plugin that I am missing?
Thanks in advance.
--
Roy Hinkelman
**Few people are capable of expressing with equan
27;images/weather/' )
#write to txt file TEST
_temp = 'D:\\Inetpub\\AtoZ\\hometown\\include\\weatherFeed_TEMP.txt'
temp = open( _temp, 'w' )
temp.write( _thumb )
temp.close()
return _thumb
city = 'Establish
I got it working.
As several people mentioned, it was a permissions issue. When I tried the
command line, I had admin access, but from the web page, I had only 'Users'.
I had to manually change permissions for both the Python module 'mechanize'
as well as the txt file the script was writing to.
N
#write to txt file TEST
_temp = 'D:\\Inetpub\\AtoZ\\hometown\\include\\weatherFeed_TEMP.txt'
temp = open( _temp, 'w' )
temp.write( _thumb )
temp.close()
return _thumb
city = 'Establish'
state = '
#x27;w' )
temp.write( _thumb )
temp.close()
#print _thumb
[/code]
And my PHP:
[code]
Python Weather Feed for ' . $city . ', ' . $state .
'';
ob_start();
$command = "include/weatherFeed.py -c " . $city . "-s " . $state;
exec($com
My script doesn't want to recognize the variables from the exec() command in
PHP. Plus, it won't capture the results of the script.
This Python script works in IDLE, and I've got some testing code in there.
One Known Unsolved Issue:
I put Python in C:\Program Files\Python26\python.exe and have tr
Interesting.
I am using urllib2 to open some government pages, and they have some js
checking for Flash on my computer.
Is there a way to show them that I have flash? Or possibly another solution?
My code:
user_agent = 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)'
headers = {'User-Agent' : us
I got it.
Switched to shutil and made to paths complete paths. The added benefit is
that it didn't trash the original file.
shutil.copy2(_files_to_mod + "\\" + fname, _files_to_mod + "\\" + new_name)
Thanks.
-- Forwarded message --
From: Roy Hinkelman
Why don't you simply print out fname? This should point you to the error.
Denis
I did here:
> if fname == old_name:
> print fname # test
and it looks correct.
On an WinXP, should I use shutil instead?
Roy
___
Tutor maillist - T
I can't find anything on this error I am getting when renaming some files.
I'm pulling info from a csv file and parsing it to build new file names.
Any pointers appreciated
Roy
My code:
# RENAME FILES using META file - new name = [place]_[state]_[sku].tif
import re, os, csv
# DEFINE
_meta_file
t depend on the file format?
I will eventually be working with Excel and possibly mssql tables.
Thanks again for your help.
Roy
On Thu, Dec 3, 2009 at 3:46 AM, Christian Witts wrote:
> Roy Hinkelman wrote:
>
>>
>> Your list is great. I've been lurking for the past t
Your list is great. I've been lurking for the past two weeks while I learned
the basics. Thanks.
I am trying to loop thru 2 files and scrape some data, and the loops are not
working.
The script is not getting past the first URL from state_list, as the test
print shows.
If someone could point me
12 matches
Mail list logo