Skip to content

Commit

Permalink
readme, examples: all: Remove sys path and ask to install module in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasangarola committed Jul 24, 2024
1 parent 1dbd13f commit 22bbe58
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 43 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ pip install .

### Running Examples

**Notes:** The examples has been tested with ```ProSim B738``` version ```3.29``` this means the datarefs used in the examples may not be available in your ProSim. If this is teh case please use a valid dataref for your sim for the sake of testing.
**Notes:** The examples has been tested with ```ProSim B738``` version ```3.29``` this means the datarefs used in the examples may not be available in your ProSim. If this is the case please use a valid dataref for your sim for the sake of testing.

In the route directory of this repository run:
*Before running any example, please install this module as indicated in the previous section.*

In the root directory of this repository run:

```Bash
python examples/<name of the example here>.py
Expand Down
11 changes: 1 addition & 10 deletions examples/get_all_datarefs.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
from pathlib import Path
from pyprosim import PyProsim

# This file path
this_path = Path(__file__).resolve().parent

# NOTE: This is only required to allow the system to find the pyprosim module without
# the need of installing it.
# You can avoid this if your main application is located at the same level that the pyprosim module.
import sys

sys.path.append(f"{this_path}/../pyprosim")

# Import the module
from pyprosim import PyProsim

# SDK DLL file path. NOTE: Exclude the extension name.
dll_path = this_path.joinpath("../", "prosimsdk", "ProSimSDK")

Expand Down
11 changes: 1 addition & 10 deletions examples/read_dataref.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
from pathlib import Path
import time
from enum import Enum
from pyprosim import PyProsim

# This file path
this_path = Path(__file__).resolve().parent

# NOTE: This is only required to allow the system to find the pyprosim module without
# the need of installing it.
# You can avoid this if your main application is located at the same level that the pyprosim module.
import sys

sys.path.append(f"{this_path}/../pyprosim")

# Import the module
from pyprosim import PyProsim

# SDK DLL file path. NOTE: Exclude the extension name.
dll_path = this_path.joinpath("../", "prosimsdk", "ProSimSDK")

Expand Down
13 changes: 2 additions & 11 deletions examples/read_dataref_callback.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
from pathlib import Path
import time
from enum import Enum
from pathlib import Path
from pyprosim import PyProsim

# This file path
this_path = Path(__file__).resolve().parent

# NOTE: This is only required to allow the system to find the pyprosim module without
# the need of installing it.
# You can avoid this if your main application is located at the same level that the pyprosim module.
import sys

sys.path.append(f"{this_path}/../pyprosim")

# Import the module
from pyprosim import PyProsim

# SDK DLL file path. NOTE: Exclude the extension name.
dll_path = this_path.joinpath("../", "prosimsdk", "ProSimSDK")

Expand Down
11 changes: 1 addition & 10 deletions examples/write_dataref.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
from pathlib import Path
import time
from enum import Enum
from pyprosim import PyProsim

# This file path
this_path = Path(__file__).resolve().parent

# NOTE: This is only required to allow the system to find the pyprosim module without
# the need of installing it.
# You can avoid this if your main application is located at the same level that the pyprosim module.
import sys

sys.path.append(f"{this_path}/../pyprosim")

# Import the module
from pyprosim import PyProsim

# SDK DLL file path. NOTE: Exclude the extension name.
dll_path = this_path.joinpath("../", "prosimsdk", "ProSimSDK")

Expand Down

0 comments on commit 22bbe58

Please sign in to comment.