File: validate_var_name_code.txt

package info (click to toggle)
python-pathvalidate 3.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 692 kB
  • sloc: python: 3,987; makefile: 262; sh: 6
file content (14 lines) | stat: -rw-r--r-- 293 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
:Sample Code:
    .. code-block:: python

        import pathvalidate

        try:
            pathvalidate.validate_filename(_a*b:c<d>e%f/(g)h+i_0.txt")
        except ValueError:
            print("invalid variable name!")

:Output:
    .. code-block:: none

        invalid variable name!