What's new

Are these statements important/necessary?

albie0803

Alibre Super User
import glob
import os
import re
from decimal import Decimal

I have seen these lines used in some scripts but not in others and also used blocks of a script that had them in another script that didn't without any problem.

Are they optional or built in to AlibreScript or something?

As Lew would say, curious minds need to know. o_O
 

idslk

Alibre Super User
Hello albie,

they import library functions for python.
Of course they are only needed if their functions are used in the code...(mostly they are not necessary)
All informations below are documented in:
https://docs.python.org/2.7/tutorial/index.html
import glob:
The glob module finds all the pathnames matching a specified pattern according to the rules used by the Unix shell
import re:
This module provides regular expression matching operations similar to those found in Perl.
import os:
This module provides a portable way of using operating system dependent functionality.
import decimal:
The decimal module provides support for decimal floating point arithmetic.​

Regards
Stefan
 
Top