Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: line number of first and second occurance of string in a file
Post: line number of first and second occurance of strin...

Hello, Here is the logic I am trying to code. * I have a line number of a certain string in a file. I want to get the line number of second occurrence of that string in a file. Please help me to wr...
mdalireza General Coding Help 1 1,833 Nov-18-2019, 12:38 AM
    Thread: optionmenu value write a list
Post: optionmenu value write a list

Hi, I am keep getting AttributeError: 'tuple' object has no attribute 'get' when I am trying to write to a list a value from optionmenu. Please help mOption1 = ["True", "False"] ...
mdalireza GUI 0 2,302 Nov-11-2019, 01:00 PM
    Thread: line replacement help
Post: RE: line replacement help

Hi, I am trying to write to a list from value from optionmenu. But I am keep getting 'AttributeError: 'tuple' object has no attribute 'get''. Please help mOption1 = ["True", "False...
mdalireza General Coding Help 8 3,439 Nov-11-2019, 12:54 PM
    Thread: line replacement help
Post: RE: line replacement help

Thanks. One thing. I just want to write in same myfile.txt file, not the output.txt file.
mdalireza General Coding Help 8 3,439 Aug-15-2019, 09:57 PM
    Thread: line replacement help
Post: RE: line replacement help

Thanks. I see f.write('\n'.join(lines)) When I compile lines is not found. Is this is 'new_lines'? If I put the 'new_lines' then the file delete all.
mdalireza General Coding Help 8 3,439 Aug-15-2019, 06:22 PM
    Thread: line replacement help
Post: line replacement help

Hi, I have wrote and trying to implement the code. I want to replace the whole lline containing anything like mov9, inp9 etc. filename = 'myfile.txt' with open(filename, 'r') as f: text = f.read() ...
mdalireza General Coding Help 8 3,439 Aug-15-2019, 05:22 PM
    Thread: clearcase command issue
Post: clearcase command issue

Hi, I have been using the following command to find all files without a label. But it is not working. I am using python 2.6 in UNIX. I am passing a label as an argument and using the argument in code...
mdalireza General Coding Help 0 2,149 Jul-24-2019, 11:23 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020