[issue35348] Problems with handling the file command output in platform.architecture()

STINNER Victor report at bugs.python.org
Fri Dec 14 09:27:31 EST 2018


STINNER Victor <vstinner at redhat.com> added the comment:

> We can also check that the output starts with executable+': ' and strip this prefix.

Technically, on UNIX, ':' is valid in a filename. Filename examples which contain ':' on my Fedora 29:

/usr/share/man/man3/List::Util.3pm.gz
/usr/share/usb_modeswitch/0408:f000
/proc/irq/127/ahci[0000:00:17.0]
/proc/irq/131/snd_hda_intel:card0
/dev/block/259:3
/sys/kernel/slab/:0002632
/sys/module/psmouse/drivers/serio:psmouse

Note: I cannot find a program name which contains ':'.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35348>
_______________________________________


More information about the Python-bugs-list mailing list