0

I want to run something from another file that I created but it is repeating the first part of the code. Please comment/respond respectfully :)

from replit import clear
from time import sleep
import pickle
playername= input("Enter your username: ")
sleep(1.0)
pickle.dump(playername, open(playername, "wb"))

clear()
import gamemenu.py
gamemenu.py = open(gamemenu.py, open(gamemenu.py))

my output is

Enter your username:

enters username

Enter your username:
Boi Kane
  • 1
  • 1
  • Please edit your question and show the contents of *gamemenu.py*. You should also explain what you are trying to run from that file. – ekhumoro Dec 05 '19 at 14:53

1 Answers1

0

I'm not sure about the rest of your code, but this looks wrong:

gamemenu.py = open(gamemenu.py, open(gamemenu.py))

Chris Cooper
  • 4,982
  • 1
  • 17
  • 27