Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: change string in MS word
Post: RE: change string in MS word

Quote:It has nothing to with changing a normal string as Python do that fine alone. It's only for working with and manipulating Microsoft Word(.docx) files. i didn't get something, then. because whe...
Mr_Blue General Coding Help 8 3,421 Sep-19-2021, 01:30 PM
    Thread: change string in MS word
Post: RE: change string in MS word

(Sep-18-2021, 11:15 PM)snippsat Wrote: (Sep-18-2021, 09:13 PM)bowlofred Wrote: It's not that it's not installed, it's that it's imported as Document, so the name docx can't be used here.It's not i...
Mr_Blue General Coding Help 8 3,421 Sep-19-2021, 08:53 AM
    Thread: change string in MS word
Post: change string in MS word

hello, i would like to change a word in a word document. from docx import Document document = Document('/path/word_template.docx') doc = docx.Document() VAR1 = input('FIRST_NAME: ') VAR2 = input('LA...
Mr_Blue General Coding Help 8 3,421 Sep-18-2021, 06:51 PM
    Thread: append a string to a modified line
Post: RE: append a string to a modified line

@snippsat with this you blew my mind: no more need of another file to erase unwanted line. this one does both jobs. i've got to take a little time to understand why. thanks a lot. never expected so mu...
Mr_Blue General Coding Help 10 3,936 Sep-16-2021, 07:24 PM
    Thread: append a string to a modified line
Post: RE: append a string to a modified line

hello, thanks to both of you would you care to explain the code? if line.startswith("#EXTINF"): #this makes the loop target a certain line out_text += line #i see this increments a varia...
Mr_Blue General Coding Help 10 3,936 Sep-15-2021, 05:06 PM
    Thread: append a string to a modified line
Post: RE: append a string to a modified line

it won't do, this won't write a file, just in python. but an interesting use of line.splita shame file.write ({name}.mp3) doesn't work. thank you all the same.
Mr_Blue General Coding Help 10 3,936 Sep-14-2021, 06:10 PM
    Thread: append a string to a modified line
Post: RE: append a string to a modified line

(Sep-13-2021, 07:51 PM)Axel_Erfurt Wrote: Can you post some real lines of your corrupted m3u?Output:#EXTINF:137,Choir - When Johnny Comes Marching Home #EXTINF:191,Glenn Miller - When Johnny Comes M...
Mr_Blue General Coding Help 10 3,936 Sep-14-2021, 05:15 PM
    Thread: append a string to a modified line
Post: append a string to a modified line

i'll try to do this in steps: 1- problem: i must rewrite an corrupted m3u file its lines go: Output:#EXTINF123#, Title - Song # let's say for clarity sake that the n line d:\music\title - song.mp3 ...
Mr_Blue General Coding Help 10 3,936 Sep-13-2021, 04:38 PM

User Panel Messages

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