#!/usr/bin/python
import string
import re
import random
import sys
import time
import fileinput
tn = time.time()
t = str(tn)
ss = "5571"
lv = open("/usr/local/https/data/session1.txt"," r")
lvr = lv.readlines()
l_lvr = len(lvr)
#print lvr
l_list = []
for i in range(l_lvr):
test = re.split('\|',...
User Profile
Collapse
-
file line is not replacing with new value
-
#!/usr/bin/python
import string
import re
import random
import sys
import time
import fileinput
tn = time.time()
t = str(tn)
ss = "5571"
lv = open("/usr/local/https/data/session1.txt"," r")
lvr = lv.readlines()
l_lvr = len(lvr)
#print lvr
l_list = []
for i in range(l_lvr):
test = re.split('\|',... -
-
delete a list in text file
puru|8346|(2007 , 3, 26, 0, 36, 59, 0, 85, 0)|
admin|5194|(200 7, 3, 28, 3, 2, 21, 1, 86, 0)|
~
~
this is my text fileLeave a comment:
-
delete a list in text file
well i m having a text file which contain time,user name & id, now if i want to modify the time without affecting the id & user name is it possible?
or how i delete that list & enter a new list in that text file -
getting the ip address of browser
please let me know the command or code used to collect the ip address of browser so that i can confirm that the request coming from same or different ip.
thanks in advance -
which command i should use to get write permission for file
cs = open(r"session1 .txt", "a+")
cs.write(i)
cs undefined, builtin open = <type 'file'>
IOError: [Errno 13] Permission denied: 'session1.txt'
args = (13, 'Permission denied')
errno = 13
filename = 'session1.txt'
strerror = 'Permission denied'
No activity results to display
Show More
Leave a comment: