Documentation
¶
Overview ¶
Package stdlib provides standard library modules for the RAGE Python runtime.
Index ¶
- Constants
- func InitAllModules()
- func InitAsyncioModule()
- func InitCSVModule()
- func InitCollectionsModule()
- func InitDatetimeModule()
- func InitFunctoolsModule()
- func InitIOModule()
- func InitItertoolsModule()
- func InitJSONModule()
- func InitMathModule()
- func InitOSModule()
- func InitRandomModule()
- func InitReModule()
- func InitStringModule()
- func InitSysModule()
- func InitTimeModule()
- func InitTypingModule()
- func SetArgv(args []string)
- type CacheInfo
- type PyCSVDictReader
- type PyCSVDictWriter
- type PyCSVReader
- type PyCSVWriter
- type PyCmpKey
- type PyCountIter
- type PyCounter
- type PyCycleIter
- type PyDate
- type PyDatetime
- type PyDefaultDict
- type PyDeque
- type PyFile
- type PyGenericAlias
- type PyGenericType
- type PyLruCache
- type PyMatch
- type PyParamSpec
- type PyPartial
- type PyPattern
- type PyRepeatIter
- type PySpecialForm
- type PyStructTime
- type PyTime
- type PyTimedelta
- type PyTypeVar
- type PyTypeVarTuple
Constants ¶
const ( IGNORECASE = 2 MULTILINE = 8 DOTALL = 16 VERBOSE = 64 ASCII = 256 )
Regex flags
Variables ¶
This section is empty.
Functions ¶
func InitAllModules ¶
func InitAllModules()
InitAllModules initializes all standard library modules. Call this before running any Python code that might import standard modules.
func InitCollectionsModule ¶
func InitCollectionsModule()
InitCollectionsModule registers the collections module
func InitDatetimeModule ¶
func InitDatetimeModule()
InitDatetimeModule registers the datetime module
func InitFunctoolsModule ¶
func InitFunctoolsModule()
InitFunctoolsModule registers the functools module
func InitItertoolsModule ¶
func InitItertoolsModule()
InitItertoolsModule registers the itertools module
Types ¶
type PyCSVDictReader ¶
type PyCSVDictReader struct {
Lines []string
Index int
Delimiter rune
Quotechar rune
Fieldnames []string
RestKey string
RestVal string
}
PyCSVDictReader represents a CSV DictReader object
func (*PyCSVDictReader) String ¶
func (r *PyCSVDictReader) String() string
func (*PyCSVDictReader) Type ¶
func (r *PyCSVDictReader) Type() string
type PyCSVDictWriter ¶
type PyCSVDictWriter struct {
Buffer *bytes.Buffer
Fieldnames []string
Delimiter rune
Quotechar rune
Quoting int
Lineterminator string
RestVal string
ExtrasAction string
}
PyCSVDictWriter represents a CSV DictWriter object
func (*PyCSVDictWriter) String ¶
func (w *PyCSVDictWriter) String() string
func (*PyCSVDictWriter) Type ¶
func (w *PyCSVDictWriter) Type() string
type PyCSVReader ¶
PyCSVReader represents a CSV reader object
func (*PyCSVReader) String ¶
func (r *PyCSVReader) String() string
func (*PyCSVReader) Type ¶
func (r *PyCSVReader) Type() string
type PyCSVWriter ¶
type PyCSVWriter struct {
Buffer *bytes.Buffer
Delimiter rune
Quotechar rune
Quoting int
Lineterminator string
}
PyCSVWriter represents a CSV writer object
func (*PyCSVWriter) String ¶
func (w *PyCSVWriter) String() string
func (*PyCSVWriter) Type ¶
func (w *PyCSVWriter) Type() string
type PyCountIter ¶
PyCountIter represents a count iterator
func (*PyCountIter) String ¶
func (c *PyCountIter) String() string
func (*PyCountIter) Type ¶
func (c *PyCountIter) Type() string
type PyCycleIter ¶
PyCycleIter represents a cycle iterator
func (*PyCycleIter) String ¶
func (c *PyCycleIter) String() string
func (*PyCycleIter) Type ¶
func (c *PyCycleIter) Type() string
type PyDatetime ¶
type PyDatetime struct {
Year int
Month int
Day int
Hour int
Minute int
Second int
Microsecond int
}
func (*PyDatetime) String ¶
func (d *PyDatetime) String() string
func (*PyDatetime) Type ¶
func (d *PyDatetime) Type() string
type PyDefaultDict ¶
PyDefaultDict is a dict with a default factory
func (*PyDefaultDict) String ¶
func (d *PyDefaultDict) String() string
func (*PyDefaultDict) Type ¶
func (d *PyDefaultDict) Type() string
type PyFile ¶
type PyFile struct {
// contains filtered or unexported fields
}
PyFile wraps an os.File with buffered I/O and Python-compatible state
type PyGenericAlias ¶
PyGenericAlias represents a parameterized generic type like List[int]
func (*PyGenericAlias) String ¶
func (g *PyGenericAlias) String() string
func (*PyGenericAlias) Type ¶
func (g *PyGenericAlias) Type() string
type PyGenericType ¶
type PyGenericType struct {
Name string
OriginType string // The underlying type (e.g., "list" for List)
}
PyGenericType represents a subscriptable generic type like List, Dict
func (*PyGenericType) String ¶
func (g *PyGenericType) String() string
func (*PyGenericType) Type ¶
func (g *PyGenericType) Type() string
type PyLruCache ¶
type PyLruCache struct {
Func runtime.Value
MaxSize int // -1 means unlimited
Cache map[string]runtime.Value
Order *list.List // For LRU ordering
Keys map[string]*list.Element
Hits int64
Misses int64
// contains filtered or unexported fields
}
PyLruCache represents an LRU cache wrapper
func (*PyLruCache) String ¶
func (l *PyLruCache) String() string
func (*PyLruCache) Type ¶
func (l *PyLruCache) Type() string
type PyParamSpec ¶
type PyParamSpec struct {
Name string
}
PyParamSpec represents a parameter specification variable
func (*PyParamSpec) String ¶
func (p *PyParamSpec) String() string
func (*PyParamSpec) Type ¶
func (p *PyParamSpec) Type() string
type PyRepeatIter ¶
PyRepeatIter represents a repeat iterator
func (*PyRepeatIter) String ¶
func (r *PyRepeatIter) String() string
func (*PyRepeatIter) Type ¶
func (r *PyRepeatIter) Type() string
type PySpecialForm ¶
type PySpecialForm struct {
Name string
}
PySpecialForm represents a special typing form like Union, Optional
func (*PySpecialForm) String ¶
func (s *PySpecialForm) String() string
func (*PySpecialForm) Type ¶
func (s *PySpecialForm) Type() string
type PyStructTime ¶
type PyStructTime struct {
TmYear int // year
TmMon int // month (1-12)
TmMday int // day of month (1-31)
TmHour int // hour (0-23)
TmMin int // minute (0-59)
TmSec int // second (0-61)
TmWday int // weekday (0-6, Monday=0)
TmYday int // day of year (1-366)
TmIsdst int // DST flag (-1, 0, 1)
}
PyStructTime represents a time struct (like Python's time.struct_time)
type PyTimedelta ¶
func (*PyTimedelta) String ¶
func (td *PyTimedelta) String() string
func (*PyTimedelta) TotalSeconds ¶
func (td *PyTimedelta) TotalSeconds() float64
func (*PyTimedelta) Type ¶
func (td *PyTimedelta) Type() string
type PyTypeVar ¶
type PyTypeVar struct {
Name string
Bound runtime.Value
Covariant bool
Contravariant bool
Constraints []runtime.Value
}
PyTypeVar represents a type variable
type PyTypeVarTuple ¶
type PyTypeVarTuple struct {
Name string
}
PyTypeVarTuple represents a type variable tuple
func (*PyTypeVarTuple) String ¶
func (t *PyTypeVarTuple) String() string
func (*PyTypeVarTuple) Type ¶
func (t *PyTypeVarTuple) Type() string