Skip to content
← Back to Community
Change language of repl
Profile icon
ruiwenge2

If I had a Python repl, how can I change the language to HTML without deleting it?

Voters
Profile icon
ErrorbotTHE2nd
Profile icon
PashaTitov2
Profile icon
laserg11
Profile icon
PixiGem
Profile icon
maxina
Profile icon
codingjlu
Profile icon
ruiwenge2
Comments
hotnewtop
Profile icon
PixiGem

nobody -
me -
wondering why an ask post has these many comments

Profile icon
ErrorbotTHE2nd

:(

Profile icon
TheDNAHero

Just add a file and put .html at the end, viola! Html is not a file. You could delete the python after that if you want to

Profile icon
JBloves27

You could make a .replit file, add the following code: run = "html {filename}.html". Just replace the {filename} with the html file name and you should be good to go.

Hope this helps!

Profile icon
ruiwenge2

@JBloves27 it just says the command isn’t found

Profile icon
Bluelight4251

@ruiwenge2 I'm not sure if you can do that but view this replit here. It's called 'Python but it's JavaScript' Here's the link: https://replit.com/@RayhanADev/Python-but-its-Javascript?c=79349

Hope this helps.

Profile icon
JakeHu2020

I don't think replit has an option to do that

Profile icon
InvisibleOne

You can jank you way around it like the other people said, but it's much better in the long run just for you to copy and paste the code into an actual HTML repl

Profile icon
MadMath123

Make a new repl (HTML in this case), and copy/paste your code into the new repl.

Profile icon
ruiwenge2

@MadMath123 no look at the question, i meant how to change the language of the same repl

Profile icon
ch1ck3n

add a file called .replit and add language="html" to it

Profile icon
ruiwenge2

@ch1ck3n then what should I put for run?

Profile icon
[deleted]

@ruiwenge2 replit says: run = "echo hello world"

Profile icon
[deleted]

@ch1ck3n if a chicken is a chicken then what is a ch1ck3n

Profile icon
ch1ck3n

@Aphmeta the chicken god

Profile icon
[deleted]

@ch1ck3n EPIC comeback right there

Profile icon
[deleted]

@ch1ck3n are u a potato or a chicken god?

Profile icon
ch1ck3n
Profile icon
[deleted]

@ch1ck3n so ur the poch1ck3n god?

Profile icon
ch1ck3n
Profile icon
[deleted]

@ch1ck3n oh wow I never thought I might be able to meet you! Ur so amazing! My goodness I'm talking with a GOD!!!!! oh wait @Coder100 is the coder god. :(

Profile icon
ruiwenge2
Profile icon
ch1ck3n

@Aphmeta You better savor the moment

Profile icon
[deleted]

@ch1ck3n gulp nervous --> silently worrying

Profile icon
[deleted]

@ch1ck3n @ruiwenge2 well say say I'm talking to 2 of the greatest legends on replit. wow

Profile icon
ruiwenge2

@Aphmeta wow i'm a legend???

Profile icon
ch1ck3n

@Aphmeta actually you were talking to my doge

this is me now

so you were talking to 3 gods

Profile icon
ch1ck3n
Profile icon
[deleted]

@ruiwenge2 well sort of also how did u get so many cycles dude(or girl, lady, man, boi, boy, person, human, alien, elder, for that matter)

Profile icon
ruiwenge2
Profile icon
[deleted]

@ch1ck3n GOSH this man is insane. he should be the most popular person on Reddit

Profile icon
[deleted]

@ch1ck3n dude im like legit chatting so hard to grind for cycles exhausted

Profile icon
[deleted]

@ruiwenge2 @ch1ck3n dang this chat is so long

Profile icon
ch1ck3n

@Aphmeta isnt that a sin

Profile icon
ch1ck3n

@Aphmeta ive seen longer

Profile icon
[deleted]

@ruiwenge2 legend in the python community with @ch1ck3n

Profile icon
[deleted]

@ch1ck3n SHEESH!

Profile icon
[deleted]

@ch1ck3n

According to Linus Torvalds:

"Long chats = great programmers." (he never said that tho)(im only making it up to comfort my sad soul)

Profile icon
ch1ck3n

@Aphmeta accordin to me:

""

Profile icon
[deleted]

@ch1ck3n um bye gtg

Profile icon
ch1ck3n
Profile icon
ruiwenge2
Profile icon
codingjlu

@Aphmeta blasphemy lol

Profile icon
[deleted]

@codingjlu what a cacophony of annoyingness

Profile icon
codingjlu

@Aphmeta did you use that word just to use it?

Profile icon
[deleted]

@codingjlu "use to use it" 🤔 is that even common sense?

Profile icon
codingjlu
Profile icon
[deleted]

@codingjlu facepalm

Profile icon
[deleted]

Super long answer: NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO!!! OK, why? Well, there is always going to be a file that the console looks for, like index.html for HTML and main.py for Python, and if it doesn't find it, it won't run.

The only way to change the file is to delete the existing ones, then add a new one in the language that you wanted, but then it will say repl died unexpectedly because it can't find the main file.

Profile icon
codingjlu

Short answer: no. Long answer: noooooooooooooooo. You can't. Just copy and paste the code, or put your code on Github, clone it, and select your language from there.

Profile icon
[deleted]

@codingjlu I feel like I'm the only person on replit who doesn't use github sad

Profile icon
codingjlu

@Aphmeta lol there are plenty I bet

Profile icon
QuantumCodes

@Aphmeta @codingjlu i dont have lol becauee i dont get the point of having github when i have replit

Profile icon
codingjlu

@QuantumCodes because it's gud

Profile icon
QuantumCodes

@codingjlu uhmm.. its the same as replit right? Just with better collaboration features? Anyways i dont have enough knowledge to contribute anywhere

Profile icon
codingjlu

@QuantumCodes on github you can't run code. It's famous for free storage, open source projects, and its git features.

Profile icon
QuantumCodes

@codingjlu i cant run then no use of storage,.

Profile icon
codingjlu
Profile icon
QuantumCodes

@codingjlu replit has git, code saving, collabing... then i dont see any use on github

Profile icon
codingjlu

@QuantumCodes Replit doesn't have Git, nor does it have unlimited storage.

Profile icon
QuantumCodes

@codingjlu version control = git? I have in python repl.. https://replit.com/talk/learn/Replit-Git-Tutorial/23331

Profile icon
codingjlu

@QuantumCodes version control !== GIT.

Profile icon
codingjlu

@QuantumCodes also, that's replit connecting to github, so in the end it's still github

Profile icon
QuantumCodes

@codingjlu lol, but i am able to use without connecting my account..

Profile icon
codingjlu

@QuantumCodes what lol git what do you mean? I think you're not talking about git.

Profile icon
QuantumCodes

@codingjlu ok nevermind... leave this arguement. I was talking about: i am able to use version control without connecting to github

Profile icon
codingjlu
Profile icon
[deleted]

@QuantumCodes ya me too :D

Profile icon
QuantumCodes
Profile icon
Bluelight4251

@Aphmeta I don't use Github.

Profile icon
[deleted]

@Bluelight4251 lets go! we got another anti github person

Profile icon
codingjlu

@Aphmeta anti-github?? Github is the best! You probably don't really know what Github is...

Profile icon
[deleted]

@codingjlu its a hosting website thingy where people share code but cant run it

Profile icon
ruiwenge2
Profile icon
codingjlu

@Aphmeta not just that. You forgot about Git.

Profile icon
codingjlu
Profile icon
ruiwenge2
Profile icon
codingjlu

@ruiwenge2 we should improve our project xD

Profile icon
[deleted]
Profile icon
[deleted]

@codingjlu what is git im dumb dumb

Profile icon
codingjlu

@Aphmeta google it

Profile icon
codingjlu
Profile icon
[deleted]

@codingjlu I freakin dont have google im in china for the summer

Profile icon
[deleted]
Profile icon
codingjlu

@Aphmeta :( baidu it then?

Profile icon
ruiwenge2
Profile icon
Bluelight4251

@Aphmeta I don't have a GitHub account.

Profile icon
dmacmakes

@codingjlu I cloned my repo from github to repl and it didn't ask for a language. It tried to autodetect it and failed, leaving it as a bash repo. How were you able to select your language in the clone process?

Profile icon
l2vy7

@codingjlu u ok there bud

Profile icon
codingjlu

@l2vy7 I'm alive. May I inquire the purpose of your inquiry?

Profile icon
l2vy7

@codingjlu git is a version control system

Profile icon
codingjlu

@l2vy7 so?