pyads
pyads copied to clipboard
Feature: Expose AmsAddress.RegularExpressionPattern
I would like to validate my AMS addresses against https://infosys.beckhoff.com/english.php?content=../content/1033/tc3_adsnetref/7313118347.html&id= and use pyads for it rather than copy it in and modify to work in python. Perhaps it could live in constants?
The netid
object currently throws a ValueError
when the net ID is not valid, when creating a Connection
for instance. This is not based on a regex exactly, but a check for 5 periods and whether each group is numeric.
So you could try ... catch
in your application.
I don't think we need to expose a regex like this.
my use case was offline validating, rather than creating a connection, and I was thinking as pyads is effectively a DLL wrapper/abstraction it might be handy to have it included in constants