mirror of
https://github.com/sascha-hemi/pycom-documentation.git
synced 2026-03-21 12:05:39 +01:00
fix on alert info
This commit is contained in:
@@ -9,5 +9,5 @@ The standard Python libraries have been "micro-ified" to fit in with the philoso
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Some modules are available by an u-name, and also by their non-u-name. The non-u-name can be overridden by a file of that name in your package path. For example, `import json` will first search for a file `json.py` or directory `json` and load that package if it's found. If nothing is found, it will fallback to loading the built-in `ujson` module.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
|
||||
@@ -9,5 +9,5 @@ The standard Python libraries have been "micro-ified" to fit in with the philoso
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Some modules are available by an u-name, and also by their non-u-name. The non-u-name can be overridden by a file of that name in your package path. For example, `import json` will first search for a file `json.py` or directory `json` and load that package if it's found. If nothing is found, it will fallback to loading the built-in `ujson` module.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ Print exception with a traceback to a file-like object file (or `sys.stdout` by
|
||||
**Difference to CPython**
|
||||
|
||||
This is simplified version of a function which appears in the traceback module in CPython. Unlike `traceback.print_exception()`, this function takes just exception value instead of exception type, exception value, and traceback object; file argument should be positional; further arguments are not supported. CPython-compatible traceback module can be found in `micropython-lib`.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Constants
|
||||
|
||||
@@ -36,7 +36,7 @@ This is simplified version of a function which appears in the traceback module i
|
||||
**Difference to CPython**
|
||||
|
||||
CPython mandates more attributes for this object, but the actual useful bare minimum is implemented in MicroPython.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
* `sys.maxsize`: Maximum value which a native integer type can hold on the current platform, or maximum value representable by MicroPython integer type, if it's smaller than platform max value (that is the case for MicroPython ports without long int support).
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ Convert binary data to hexadecimal representation. Returns bytes string.
|
||||
**Difference to CPython**
|
||||
|
||||
If additional argument, `sep` is supplied, it is used as a separator between hexadecimal values.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
#### ubinascii.unhexlify(data)
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ The parameter `bits` is rounded upwards to the nearest multiple of 32 bits.
|
||||
|
||||
{{% hint style="danger" %}}
|
||||
Cryptography is not a trivial business. Doing things the wrong way could quickly result in decreased or no security. Please document yourself in the subject if you are depending on encryption to secure important information.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
#### crypto.generate\_rsa\_signature(message, private_key, \*, pers="esp32-tls")
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ This module implements "foreign data interface" for MicroPython. The idea behind
|
||||
|
||||
{{% hint style="info" %}}
|
||||
Module ustruct Standard Python way to access binary data structures (doesn't scale well to large and complex structures).
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Defining Structure Layout
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ Bind the `socket` to `address`. The socket must not already be bound. The `addre
|
||||
|
||||
{{% hint style="info" %}}
|
||||
In the case of LoRa sockets, the address parameter is simply an integer with the port number, for instance: `s.bind(1)`
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
#### socket.listen(\[backlog\])
|
||||
|
||||
@@ -126,7 +126,7 @@ The socket must be in blocking mode; it can have a timeout, but the file object'
|
||||
**Difference to CPython**
|
||||
|
||||
Closing the file object returned by `makefile()` **WILL** close the original socket as well.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
#### socket.read(size)
|
||||
|
||||
|
||||
@@ -90,5 +90,5 @@ Set or get the timezone offset, in seconds. If `secs` is not provided, it return
|
||||
|
||||
{{% hint style="info" %}}
|
||||
In MicroPython, `time.timezone` works the opposite way to Python. In [Python](https://docs.python.org/3/library/time.html#time.timezone), to get the local time, you write `local_time = utc - timezone`, while in MicroPython it is `local_time = utc + timezone`.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
|
||||
@@ -23,4 +23,4 @@ Create a `stream` wrapper which allows transparent decompression of compressed d
|
||||
**Difference to CPython**
|
||||
|
||||
This class is MicroPython extension. It's included on provisional basis and may be changed considerably or removed in later versions.
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
Reference in New Issue
Block a user