Ignore:
Timestamp:
02/19/21 03:14:41 (3 years ago)
Author:
Maciej Komosinski
Message:

Cosmetic

File:
1 edited

Legend:

Unmodified
Added
Removed
  • framspy/FramsticksLib.py

    r1084 r1087  
    88
    99class FramsticksLib:
    10         """Communicates directly with Framsticks DLL/SO.
     10        """Communicates directly with Framsticks library (.dll or .so).
    1111        You can perform basic operations like mutation, crossover, and evaluation of genotypes.
    1212        This way you can perform evolution controlled by python as well as access and manipulate genotypes.
     
    1414        or access and control the simulation and simulated creatures step by step.
    1515
    16         You need to provide one or two parameters when you run this class: the path to Framsticks CLI where .dll/.so resides
    17         and the name of the Framsticks dll/so (if it is non-standard). See::
     16        You need to provide one or two parameters when you run this class: the path to Framsticks where .dll/.so resides
     17        and, optionally, the name of the Framsticks dll/so (if it is non-standard). See::
    1818                FramsticksLib.py -h"""
    1919
     
    2626
    2727        def __init__(self, frams_path, frams_lib_name):
    28                 frams.init(frams_path, frams_lib_name, "-Ddata")  # "-D"+os.path.join(frams_path,"data")) # not possible (maybe python windows issue) because of the need for os.chdir(). So we assume "data" is where the dll/so is
     28                if frams_lib_name is None:
     29                        frams.init(frams_path)  # could add support for setting alternative directories using -D and -d
     30                else:
     31                        frams.init(frams_path, "-L" + frams_lib_name)  # could add support for setting alternative directories using -D and -d
    2932
    3033                print('Available objects:', dir(frams))
Note: See TracChangeset for help on using the changeset viewer.