Oh! Sorry I didn't get that earlier. 😛
On Sat, 18 Apr, 2020, 9:10 pm MRAB, wrote:
> On 2020-04-18 08:59, Souvik Dutta wrote:
> > Okay so I was not able to say properly. You are indeed doing the same
> thing
> > that you were doing i.e. writting the modified data just, that now you
> > don't need
On 2020-04-18 08:59, Souvik Dutta wrote:
Okay so I was not able to say properly. You are indeed doing the same thing
that you were doing i.e. writting the modified data just, that now you
don't need to close you if file before doing any writting stuff. That is
there is a one line deduction from t
Okay so I was not able to say properly. You are indeed doing the same thing
that you were doing i.e. writting the modified data just, that now you
don't need to close you if file before doing any writting stuff. That is
there is a one line deduction from the whole code.
Souvik flutter dev
On Sat,
Souvik Dutta wrote:
> You can actually read and write in a file simultaneously. Just replace "r"
> with "w+" if the file has not been previously made or use "r+" is the file
> has already been made.
Good advice for those who like to butcher their data ;)
Seriously, writing modified data into a n
You can actually read and write in a file simultaneously. Just replace "r"
with "w+" if the file has not been previously made or use "r+" is the file
has already been made.
Souvik flutter dev
On Sat, Apr 18, 2020, 4:45 AM wrote:
> Hi;
>
> I am reading a Python file and find an specific line, re
On 18/04/20 11:10 AM, hnasr9...@gmail.com wrote:
I am reading a Python file and find an specific line, replace a text and then
write back to the file.
When I check back the file, I am getting indent error.
How to fix this issue.
Please make it easier for us (volunteers giving-up our free ti
On 18/04/20 11:10 am, hnasr9...@gmail.com wrote:
Hi;
I am reading a Python file and find an specific line, replace a text and then
write back to the file.
When I check back the file, I am getting indent error.
It looks like your script is stripping out all the indentation when
it writes the
Hi;
I am reading a Python file and find an specific line, replace a text and then
write back to the file.
When I check back the file, I am getting indent error.
How to fix this issue.
reading_file = open("myfile.py", "r")
new_file_content = ""
for line in reading_file:
[EMAIL PROTECTED] wrote:
hi every body,
I'm a new python user and I'm making a program to run useing Abaqus
and there is something I can't do,
if i have a text file that has a line like this " 10 20 30 40
50" and I wana do the coding to put every number of these like 10 or
20 in a separa
[EMAIL PROTECTED] wrote:
> hi every body,
>
> I'm a new python user and I'm making a program to run useing Abaqus
> and there is something I can't do,
>
> if i have a text file that has a line like this " 10 20 30 40
> 50" and I wana do the coding to put every number of these like 10 or
>
hi every body,
I'm a new python user and I'm making a program to run useing Abaqus
and there is something I can't do,
if i have a text file that has a line like this " 10 20 30 40
50" and I wana do the coding to put every number of these like 10 or
20 in a separate variable .. any suggesti
doritrieur wrote:
> can anyone
> refer me to an online source that supplies the relevant data for syntax
http://rgruet.free.fr/PQR2.3.html
http://www.google.com
--
http://mail.python.org/mailman/listinfo/python-list
thanks all for your replies! it did helped me!
by the way, i am really new to phyton and to programming, can anyone
refer me to an online source that supplies the relevant data for syntax
ect?
thanks, Dorit.
--
http://mail.python.org/mailman/listinfo/python-list
"doritrieur" <[EMAIL PROTECTED]> wrote:
> How do i read line from an input file, without the /n ?
> the readline function returns also the /n character at the end. i need
> to read a line without the training /n
so strip if off!
line = line[:-1] # remove l
f.readline().rstrip('\n') should do it. If you are sure that lines
always end in '\n', then you could even use f.readline()[:-1]
--
http://mail.python.org/mailman/listinfo/python-list
How do i read line from an input file, without the /n ?
the readline function returns also the /n character at the end. i need
to read a line without the training /n
is this possible?
thanks, Dorit
--
http://mail.python.org/mailman/listinfo/python-list
16 matches
Mail list logo