I am using Python 2.5 r25:51908 MSC v.1318 32 bit (Intel) on wind32
I am totally new to Python and started yesterday going over a couple
of examples I found in the documentation which address a problem I am
trying to solve.
I have successfully opened a file and read the results adapting this
code
Here is what var data collected:
302 Found
Found
The document has moved http://www.thenational.us/pages/
htmlos/001863.1.059070780420726458">here.
Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8b mod_mono/
2.2 FrontPage/5.0.2.2635 mod_bwlimited/1.4 mod_auth_passthrough/2.1
Server at thenation
I got it! You can see the code at the bottom of this post. Sorry for
three posts on this question.
I have to run the program one time just to get the dynamically
generated redirect URL for the POST (it looks like this)
The document has moved http://www.thenational.us/pages/htmlos/
001863.1.05907
Thanks for your suggestion, but I am not able to get it to work for
me.
My original script was:
f = open('C:\Users\Owner\Desktop\mydata.txt', 'r')
read_data = f.read()
f.close()
import httplib, urllib
params = urllib.urlencode({'textarea1': read_data})
headers = {"Content-type": "application/x-
On Mar 2, 10:13 pm, JohnV wrote:
> Thanks for your suggestion, but I am not able to get it to work for
> me.
>
> My original script was:
>
> f = open('C:\Users\Owner\Desktop\mydata.txt', 'r')
> read_data = f.read()
>
> f.close()
>
> import ht
> Sorry, I think you didn't get my later post -- than in fact was from a
> month ago...
> Seehttp://article.gmane.org/gmane.comp.python.general/613312/
> urllib2 should handle a 302 redirect automatically.
>
> --
> Gabriel Genellina
I went to the link you provided and sure enough there was your
I have a txt file that gets appended with data over a time event. The
data comes from an RFID reader and is dumped to the file by the RFID
software. I want to poll that file several times over the time period
of the event to capture the current data in the RFID reader.
When I read the data I wan
Maybe something like this will work though I am not sure of my quotes
and what to import
import shutil
f = open(r'C:\Users\Owner\Desktop\mydata.txt', 'r')
read_data1 = f.read()
f.close()
shutil.copy('C:\Users\Owner\Desktop\newdata.txt', 'C:\Users\Owner
\Desktop\out.txt')
file = open(r'C:\Users\O
The below code does the trick with one small problem left to be solved
import shutil
import string
currentdata_file = r"C:\Users\Owner\Desktop\newdata.txt" # the current
download from the clock
lastdata_file = r"C:\Users\Owner\Desktop\mydata.txt" # the prior
download from the clock
output_file =
Here is the latest version of the code:
currentdata_file = r"C:\Users\Owner\Desktop\newdata.txt" # the latest
download from the clock
lastdata_file = r"C:\Users\Owner\Desktop\mydata.txt" # the prior
download from the clock
output_file = r"C:\Users\Owner\Desktop\out.txt" # will hold delta
clock dat
10 matches
Mail list logo