PyBridge is a multi-platform bridge for Python scripts
With PyBridge it is possible to run Python scripts by bridging the code implemented in the project created with other platforms.
With PyBridge it is possible to create scripts that will run on:
1. Linux;
2. macOS;
3. Windows;
With PyBridge it is possible to run Python scripts by bridging the code implemented in the project created with other platforms. With PyBridge it is possible to create scripts that will run on:
PyBridge is a program entirely developed in Python. To run the program, open the PyBridge.py
file located at the root of this project.
Note: PyBridge was born from Python 3.9. For this reason, the same version of Python (version 3.9) or higher is recommended to run the system.
PyBridge has a standard error handling library that can run in any environment. Every method implemented within the library can be called from any part of the code. That way, it is not necessary to implement the raise RuntimeError()
exception call inside the program's runtime library. Just import the module and reference the function call according to the treatment that must be executed.
Note: Read more about the
ErrorReport
module in PyBridge Modules below.
The following modules are part of PyBridge:
ErrorReport: The module contains two files with the purpose of raising errors generated by the program, in addition to checking minimum requirements for execution.
Linux: The module contains four libraries organized to run the program in a Linux environment
Mac: The module contains four libraries organized to run the program on macOS
Windows: The module contains four libraries organized to run the program on Windows
Below is a list of examples of Python programs created using PyBridge
GetInfo: Get the filename, creation date and modification date of a file anywhere, on any platform.
GetInfo: PyBridge Sample Application
JoKenPo: Famous game known as "Rock, Paper and Scissors".
JoKenPo: PyBridge Sample Application
Below is a detailed example of running a Hello World
program created by PyBrigde on Windows
Program running:
Name: Hello World
Version: 1.0
Created By: YOU
Copyright © 2021 | YOU All rights reserved.
==================================================
[Hello World for Windows] - Running...
==================================================
Hello World!
Execution Analysis:
### Load imported libraries into Windows.py
# Load SplashScreen
Name: Hello World
Version: 1.0
Created By: YOU
Copyright © 2021 | YOU All rights reserved.
==================================================
[Hello World for Windows] - Running...
==================================================
# End of SplashScreen
# Load SystemRequirements
# End of SystemRequirements
# Load WindowsApp
Hello World!
Below is a detailed example of running a Hello World
program created by PyBrigde with the Python 3.9 requirement on Mac
Program running:
Name: Hello World
Version: 1.0
Created By: YOU
Copyright © 2021 | YOU All rights reserved.
==================================================
[Hello World for Mac] - Running...
==================================================
Traceback (most recent call last):
File "/Users/YOU/Documents/PyBridge/Projects/Hello World/__init__.py", line 31, in <module>
Main()
File "/Users/YOU/Documents/PyBridge/Projects/Hello World/__init__.py", line 24, in Main
Mac.Mac()
File "/Users/YOU/Documents/PyBridge/Projects/Hello World/Mac/Mac.py", line 16, in Mac
from ErrorReport import SystemRequirements
File "/Users/YOU/Documents/PyBridge/Projects/Hello World/ErrorReport/SystemRequirements.py", line 34, in <module>
ErrorList.Raise().Requirements().MajorVersion(CurrentVersion, TargetVersion, TargetMajor)
File "/Users/YOU/Documents/PyBridge/Projects/Hello World/ErrorReport/ErrorList.py", line 7, in MajorVersion
raise Exception(f'>> You cannot run the application because it requires Python {TargetVersion} or later. [Current Version: {CurrentVersion}]')
Exception: >> You cannot run the application because it requires Python 3.9.0 or later. [Current Version: 3.6.0]
Execution Analysis:
### Load imported libraries into Mac.py
# Load SplashScreen
Name: Hello World
Version: 1.0
Created By: YOU
Copyright © 2021 | YOU All rights reserved.
================================================== ====================
[Hello World for Mac] - Running...
================================================== ====================
# End of SplashScreen
# Load SystemRequirements
Traceback (most recent call last):
File "/Users/YOU/Documents/PyBridge/Projects/Hello World/__init__.py", line 31, in <module>
Main()
File "/Users/YOU/Documents/PyBridge/Projects/Hello World/__init__.py", line 24, in Main
Mac.Mac()
File "/Users/YOU/Documents/PyBridge/Projects/Hello World/Mac/Mac.py", line 16, in Mac
from ErrorReport import SystemRequirements
File "/Users/YOU/Documents/PyBridge/Projects/Hello World/ErrorReport/SystemRequirements.py", line 34, in <module>
ErrorList.Raise().Requirements().MajorVersion(CurrentVersion, TargetVersion, TargetMajor)
File "/Users/YOU/Documents/PyBridge/Projects/Hello World/ErrorReport/ErrorList.py", line 7, in MajorVersion
raise Exception(f'>> You cannot run the application because it requires Python {TargetVersion} or later. [Current Version: {CurrentVersion}]')
Exception: >> You cannot run the application because it requires Python 3.9.0 or later. [Current Version: 3.6.0]
The following libraries were used to implement the tool:
codecs: The module defines functions for encoding and decoding with any codec.
codecs
library at codecs — Codec registry and base classesdatetime: The datetime
module provides the classes for handling dates and times.
datetime
library at datetime — Basic date and time typesgetpass: Portable password input.
getpass
library at getpass — Portable Password Inputos: This module provides a simple way to use functionality that is OS dependent.
os
library at os — Miscellaneous operating system interfacespathlib: This module offers classes representing filesystem paths with semantics appropriate for different operating systems. Path classes are divided between pure paths, which provide purely computational operations without I/O, and concrete paths, which inherit from pure paths but also provide I/O operations.
pathlib
library at pathlib — Object-oriented filesystem pathsshutil: The shutil module provides several high-level operations on files and file collections. In particular, functions are provided that support copying and removing files. For operations on individual files, see also the os module.
shutil
library in shutil — High-level file operationssys: This module provides access to some variables used or maintained by the interpreter and functions that interact strongly with the interpreter.
sys
library at sys — System-specific parameters and functionsThe following libraries were used to implement the tool:
tweepy
library at tweepy — An easy-to-use Python library for accessing the Twitter APIThe use of the tweepy library is optional and only mandatory in cases of "Twitter Application Project" created in PyBridge.
requests
library at Requests: HTTP for Humans™The use of the requests library is mandatory in cases of "Download Sample Projects" on PyBridge.
Hello_World
project created by PyBridge..
├── __init__.py
├── ErrorReport
│ ├── ErrorList.py
│ └── SystemRequirements.py
├── Linux
│ ├── Linux.py
│ ├── LinuxApp.py
│ ├── FileSystem.py
│ └── SplashScreen.py
├── Mac
│ ├── Mac.py
│ ├── MacApp.py
│ ├── FileSystem.py
│ └── SplashScreen.py
├── Windows
│ ├── Windows.py
│ ├── WindowsApp.py
│ ├── FileSystem.py
│ └── SplashScreen.py
└── README.md
MyTweets
project created by Pybridge:.
├── __init__.py
├── ErrorReport
│ ├── ErrorList.py
│ └── SystemRequirements.py
├── Linux
│ ├── Linux.py
│ ├── LinuxApp.py
│ ├── FileSystem.py
│ └── SplashScreen.py
├── Mac
│ ├── Mac.py
│ ├── MacApp.py
│ ├── FileSystem.py
│ └── SplashScreen.py
├── Windows
│ ├── Windows.py
│ ├── WindowsApp.py
│ ├── FileSystem.py
│ └── SplashScreen.py
├── Tokens.py
└── README.md
For information about update logs, access RELEASES page on PyBridge repository.
Copyright © 2022 Heitor Bisneto. All rights reserved.