mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2025-08-04 12:16:43 -04:00

Added socket module(WIP) git-svn-id: svn://kolibrios.org@8578 a494cfbc-eb01-0410-851d-a64ba20cac60
14 lines
401 B
Python
14 lines
401 B
Python
# Read/Write file example
|
|
# Copyright (C) 2019-2021 Logaev Maxim (turbocat2001), GPLv3
|
|
|
|
import file
|
|
|
|
fw=file.open('my.txt','w') # Open file for writing
|
|
fw.write("I love KolibriOS") # Write symbols to my.txt file
|
|
fw.close() # Close file
|
|
|
|
fr=file.open('my.txt', 'r') # Open file for reading
|
|
str=fr.read() # Read symbols from file
|
|
print(str) # Print to console
|
|
fr.close() # Close file
|