Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# Python-Labs
IOT - python labs

Third Lab

Print all lines from the file that contain errors (starting with the phrase WFLYCTL and containing the words ERROR)
Empty file removed classes/__init__.py
Empty file.
108 changes: 0 additions & 108 deletions classes/publications.py

This file was deleted.

64 changes: 0 additions & 64 deletions classes/publications_abstract.py

This file was deleted.

14 changes: 5 additions & 9 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
from classes.publications import PrintedBook, AudioBook, Magazine
import re


def main():
printed_book = PrintedBook("PrintedBookCaption", False, "Fantasy", 200, "Coated Paper")
print(printed_book)

audio_book = AudioBook("AudioBookCaption", False, "Fantasy", 3, 2.5)
print(audio_book)

magazine = Magazine("MagazineCaption", "Documental", "Ukraine History")
print(magazine)
with open("server.log.2018-04-04", "r") as file:
for line in file:
if re.compile(r"WFLYCTL\d{4}").search(line) is not None:
print(line)


if __name__ == '__main__':
Expand Down
Loading