shapepipe.modules.python_example_package.python_example

shapepipe.modules.python_example_package.python_example

PYTHON EXAMPLE.

This module contains an example Python class.

Author

Samuel Farrens

Warning

This is a example module. It should only be used for running tests or as a reference for developing new modules.

class PythonExample(sleep_time=None)[source]

Bases: object

Python Example.

An example Python class.

Parameters

sleep_time (int) – Sleep time in seconds

_wait()[source]

Wait.

Wait for \(n\) seconds.

_read_file(file_name)[source]

Read File.

Read input file content.

Parameters

file_name (str) – Name of file to read

Returns

Content of file

Return type

str

read_files(file_name1, file_name2)[source]

Read Files.

Read two input files.

Parameters
  • file_name1 (str) – Name of first file

  • file_name2 (str) – Name of second file

write_file(file_name, message)[source]

Write File.

Write content to file.

Parameters
  • file_name (str) – Name of output file

  • Message (str) – Content to write to file