Files can only be modified in IDLE, but not via Powershell

Stefan Ritter Knighticarus at gmx.de
Tue Feb 9 15:49:21 EST 2021


Thanks for your advice! To be honest i'm not quite sure what did the
trick, I just played a little bit around with the paths. Anyway, now its
working as expected. Bless your crystal ball!

Needless to say: Many thanks for all the other responses i did receive!

Am 09.02.2021 um 10:50 schrieb Peter Otten:
> On 08/02/2021 22:33, Stefan Ritter wrote:
>>
>> Hi,
>>
>> It would be highly appreciated if you could offer me some advice to
>> solve a problem I'm currently facing:
>>
>> I have a Windows 10 ADM64 desktop and a Windows 10 AMD64 Laptop.
>>
>> I wrote some code to insert text in a .txt-file. It works perfectly on
>> my laptop.
>>
>> On my desktop it works only if i run it in IDLE, the text appears
>> afterwards in the file . However it does not work if run it in
>> Powershell (or anything else), there are no changes made in the file.
>>
>> I do not understand why this is the case. Python version, installation
>> paths and user are the same on desktop and laptop. I searched a bit and
>> found out that this issue might be caused by my antivirus software
>> comodo, but even after I replaced it with antivir, an reinstalled python
>> this didn't change anything.
>>
>> As mentionned, any help is highly appreciated. If you need any
>> additional information please let me know!
>
> My crystal ball says Idle and the shell use different working
> directories; you have a relative path, change one file and are looking
> at the other.
>
> If that's not the case -- show us the code.
> If there is an error message and a traceback provide that, too.
>
> Use copy-and-paste for both code and error.


More information about the Python-list mailing list