← index #15118Issue #15116
Off-topic · high · value 2.150
QUERY · ISSUE

network.hostname: max length of hostname

openby massimosalaopened 2024-05-25updated 2024-06-18
enhancement

Checks

  • I agree to follow the MicroPython Code of Conduct to ensure a safe and respectful space for everyone.

  • I've searched for existing issues regarding this feature, and didn't find any.

Description

Form the docs: the max length depends on the port (and its tcp/ip stack).

So, without spelunking into each network low-level libraries or make tests on each specific board, we don't know the limit.

Proposal: calling hostname(None) returns the accepted max length of hostname.

Code Size

No response

Implementation

  • I intend to implement this feature and would submit a Pull Request if desirable.
CANDIDATE · ISSUE

implement os.sep

closedby massimosalaopened 2024-05-25updated 2024-07-20
enhancement

Checks

  • I agree to follow the MicroPython Code of Conduct to ensure a safe and respectful space for everyone.

  • I've searched for existing issues regarding this feature, and didn't find any.

Description

To facilitate the reuse of libraries written for Python and to test Micropython libraries on regular Python,
I ask to implement in the module os the attribute sep

I am not sure about all ports and filesystems... but perhaps it can be just implemented as
sep = '/'
for all.

Code Size

No response

Implementation

  • I intend to implement this feature and would submit a Pull Request if desirable.
  • I hope the MicroPython maintainers or community will implement this feature.
  • I would like to Sponsor development of this feature.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied