Python Combine two bots into one

0 votes
Hi everyone,

Basically i made a bot in league of legends using python. The problem with it is that its made of 2 py files

The first that starts league of legends, finds a match, accepts it, picks champ

and the second the bot basically plays the game.

Right now i just use exec(open("bot2.py").read()) to start the second part of the bot and when the game ends i just use the same command to start the first part... i don't like this way tho.. i want to combine both in one file. I tried with while loops.. tried to find a goto function (wasted my time) i tried other stuff too but nothing works since after the second part of the bot ends it should return to the first. (and this should go forever)

Anyone have any ideas how to do it ?
Jun 30, 2020 in Python by PrKit
• 120 points
736 views

Hi, @Prkit,

Could you please post your code which you are executing regarding your game? Please include your first and second parts. It will be helpful for us to investigate.

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Python

0 votes
1 answer

How can I combine two dataframes in Python Pandas?

Hi, You can use the following methods to ...READ MORE

answered Jun 25, 2019 in Python by Shabnam
• 930 points
1,268 views
+4 votes
7 answers

Splitting a List into chunks in Python

Here's a generator that yields the chunks ...READ MORE

answered Apr 13, 2018 in Python by Nietzsche's daemon
• 4,260 points
35,407 views
0 votes
1 answer

How can I compare the content of two files in Python?

Assuming that your file unique.txt just contains ...READ MORE

answered Apr 16, 2018 in Python by charlie_brown
• 7,720 points
2,658 views
0 votes
1 answer

How can I convert a list of dictionaries from a CSV into a JSON object in Python?

You could try using the AST module. ...READ MORE

answered Apr 17, 2018 in Python by anonymous
3,462 views
0 votes
1 answer

Difference between two lists in python

difference = list(set(list1) - set(list2)) READ MORE

answered May 24, 2018 in Python by Nietzsche's daemon
• 4,260 points
2,816 views
0 votes
1 answer

How do you get the logical xor of two variables in Python?

If you're already normalizing the inputs to ...READ MORE

answered May 29, 2018 in Python by aryya
• 7,460 points
10,675 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,437 views
0 votes
1 answer
+5 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,790 points
4,073 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP