Answer the question
In order to leave comments, you need to log in
How to use a library without import?
I need to use a library, but I don't have access to imports. How should I be what should I do?
Answer the question
In order to leave comments, you need to log in
I offer this answer. In my test, it gets all the lines it needs.
Regular expression:
Code:
where text
are your data lines.
All correct results are in Full match
, i.e. retrieved with .group(0)
Result:
https://regex101.com/r/6b4hCw/1
Tested on Python 3.5
Import only solves name visibility issues. Use classes from the library by full namenew com.superman.mylibrary.Uberclass("Piu")
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question