Jump to content
UBot Underground

Running Python 3 code in Ubot with/without a Ubot plugin for FREE


Recommended Posts

 

My new site replaces ubotdocta.com where I shared many tutorials on ubot and python so any tutorials here on the forum witll be located at codedocta.com now. I will update forum links when I post old tutorials that I have already done to https://codedocta.com.


Running Python 3 code in ubot with/with out a Ubot plugin:

1. You can not run Python 3 code in ubot's python nodes, not str8 out like that anyways.

2. Ubot uses IronPython which is a windows simple version of Python 2. It's old and outdated and uses Python 2 syntax. So, you can not use Python 3 modules/packages/code.

However, There are a few ways You can achieve running Python 3 code in ubot.
 

Ubot Developer/Pro Edition I believe
1. One solution is to use TJ's execute python plugin. Which doesn’t solve use cases where you need to use and event loop. Such as runing most GUI’s or Async operations likewith aiohttp, asyncio etc.

 

Ubot Developer/Pro Edition – However, if you can run this plugin this would be a free option for lower versions of ubot. Like Standard Edition

2. Another solution is to use the advanced shell plugin. Which is not supported any more and the ubotdev.com site has been down for years. People still use this plugin and if you ask around you can get it as it was free to begin with.

 

Ubot Developer Edition
3. Use subprocess in ubot’s python(IronPython) to execute Python 3 code which is provided as a download on this page below.



More ubot/python tutorials at codedocta.com

 

For example, I have the following posts and more topics including HTTP, Selenium and much more:

 

1. Introduction to Python

- What is Python?

- Why choose Python?

- Setting up the environment (installing Python, choosing an IDE).

- Your first Python script (printing "Hello, World!").

 

2. Basics of Python Syntax

- Indentation and its importance.

- Variables and Data Types.

- Basic operators (+, -, *, /).

- Taking user input with `input()`.

 

3. Conditional Statements

- The `if`, `elif`, and `else` statements.

- Boolean operators (`and`, `or`, `not`).

- Comparison operators (==, !=, >, <, >=, <=).

 

4. Python Loops

- Introduction to loops.

- The `while` loop with examples.

- The `for` loop with examples.

- Loop control statements (`break`, `continue`).

 

5. Python Lists

- Introduction to lists.

- Basic list operations (add, remove, slice).

- Iterating through lists.

- List comprehensions.

 

6. Python Tuples, Sets, and Dictionaries

- Understanding tuples and their immutability.

- Introduction to sets and basic set operations.

- Introduction to dictionaries and working with key-value pairs.

 

7. Functions in Python

- Defining a function.

- Function arguments and return values.

- Lambda functions.

- Modules and the `import` statement.

 

8. File Handling

- Reading from a file.

- Writing to a file.

- Working with different file modes.

- Handling file exceptions.

 

9. Error and Exception Handling

- Understanding the difference between errors and exceptions.

 

Also:

I have created many Python packages to share on my github.com page:

Code Docta github page https://github.com/codedocta/

And:

Their respective documentation here...
Code Docta(CD)’s Package Documentation https://codedocta.com/category/my-pyhton-packages/

Be sure to bookmark this one in your browser!!

 

My packages include doc strings that can serve as documentation. Doc strings are descriptions about what the code does and how to use the parameters. These you can see in your IDE of your choice. My IDE of choice is PyCharm community edition, it’s free to use.

I do have a Resource page at codedocta.com too for more information.

Code Docta Resources https://codedocta.com/resources/

 

I do have a Python selenium tutorial serries I just finished posting on my blog as well.

 

All this will provide you with working solutions backed by many Python Developers as an alternative to a limited amount of developers in the Ubot ecosystem. A backup so you can keep your projects in Ubot running and making money.


updated to version 0.2 2023-12-02

py3inUbot.ubot

py3inUbot-0.2.ubot

  • Like 1
Link to post
Share on other sites
  • 2 weeks later...
On 11/14/2023 at 8:35 AM, PRO said:

Does your plugin work in Ubot v6.x?
 

Link to post
Share on other sites

All our Plugins that have a version prefix of 6.x do, the ones with a version prefix of 5.x don't.

I just checked. UBot Extension 2 latest is v5.x currently, it should not be compatible with UBot latest.

Link to post
Share on other sites
  • Code Docta (Nick C.) changed the title to Running Python 3 code in Ubot with/without a Ubot plugin for FREE

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...