diff --git a/src/Fable.Python.fsproj b/src/Fable.Python.fsproj index 213a444..a1e41a5 100644 --- a/src/Fable.Python.fsproj +++ b/src/Fable.Python.fsproj @@ -12,10 +12,12 @@ + - - + + + diff --git a/src/stdlib/Os.fs b/src/stdlib/Os.fs index 70133d5..1e14d6c 100644 --- a/src/stdlib/Os.fs +++ b/src/stdlib/Os.fs @@ -1,14 +1,22 @@ module Fable.Python.Os +open System.Collections.Generic open Fable.Core // fsharplint:disable MemberNames type IExports = + abstract chdir : string -> unit + abstract chroot : string -> unit + abstract close : fd: int -> unit + abstract environ : Dictionary + abstract getcwd : unit -> string abstract getenv : key: string -> string option abstract getenv : key: string * ``default``: string -> string + abstract kill : pid: int * ``sig``: int -> unit abstract putenv : key: string * value: string -> unit +/// Miscellaneous operating system interfaces [] let os: IExports = nativeOnly diff --git a/src/stdlib/Sys.fs b/src/stdlib/Sys.fs new file mode 100644 index 0000000..36c16cb --- /dev/null +++ b/src/stdlib/Sys.fs @@ -0,0 +1,33 @@ +module Fable.Python.Sys + +open Fable.Core + +// fsharplint:disable MemberNames + +[] +type ByteOrder = + | Little + | Big + +type VersionInfo = + abstract major : int + abstract minor: int + abstract micro: int + abstract releaselevel: string + abstract serial: int + +type IExports = + abstract argv : string array + abstract byteorder: ByteOrder + abstract hexversion: int + abstract maxsize: int + abstract maxunicode: int + abstract path : string array + abstract platform : string + abstract prefix: string + abstract version: string + abstract version_info: VersionInfo + +/// System-specific parameters and functions +[] +let sys: IExports = nativeOnly diff --git a/src/stdlib/Time.fs b/src/stdlib/Time.fs new file mode 100644 index 0000000..e682a1b --- /dev/null +++ b/src/stdlib/Time.fs @@ -0,0 +1,22 @@ +module Fable.Python.Time + +open Fable.Core + +// fsharplint:disable MemberNames + +type IExports = + abstract altzone : int + abstract ctime : unit -> string + abstract ctime : float -> string + abstract daylight : int + abstract monotonic : unit -> float + abstract perf_counter : unit -> float + abstract process_time : unit -> float + abstract sleep : secs: float -> unit + abstract time : unit -> float + abstract timezone : int + abstract tzname : string * string + +/// Time access and conversions +[] +let time: IExports = nativeOnly