Added new functions in ksys module

Added socket module(WIP)


git-svn-id: svn://kolibrios.org@8578 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
superturbocat2001
2021-02-05 09:05:46 +00:00
parent 0737264612
commit fb583c04b3
14 changed files with 224 additions and 306 deletions

View File

@@ -1,13 +1,13 @@
# Read/Write file example
# Copyright (C) 2019-2021 Logaev Maxim (turbocat2001), GPLv3
import ksys # KolibriOS syscalls
import file
fw=ksys.open('my.txt','w') # Open file for writing
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=ksys.open('my.txt', 'r') # Open file for reading
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