Skip to content

file object is not writing to disk using the write #153

Closed
@DonJayamanne

Description

@DonJayamanne

From @larsoleruben on July 27, 2017 11:0

Environment data

VS Code version: 1.14.2
Python Extension version: 0.6.9 (22 July 2017)
Python Version: 3.6
OS and version: Windows 8.1

Actual behavior

This will not write to the file during debugging

myFile = open('c:/temp/test.txt', 'w')
a = myFile.write('ddsdsdsds\n')
print(a)
myFile.close

This correctly writes to the file during debugging

with open('c:/temp/test.txt', 'w') as outfile:
    a=outfile.write("sdsdsdsdsd\n")
    print(a)

Expected behavior

The above code should both write to the file. also during debugging

Steps to reproduce:

Excute above

If the script is executed from the console, both methods works
Also the code works nomally in Visual Studio, and also Visual Studio Code for Mac.
Only win 8.1 seems to have a problem.

Logs

Output from Python output panel
Nothing

Output from ```Console window``` (Help->Developer Tools menu)
Nothing

Copied from original issue: DonJayamanne/pythonVSCode#1125

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue identified by VS Code Team member as probable bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions