Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

how do i link a python file with a html file?

+4 votes
asked Jan 8, 2021 by Pallabesh Maharana (460 points)
In a website how to link a python file???

 Give its syntax.

1 Answer

+1 vote
answered Jan 13, 2021 by KKN (1,110 points)

Ok, this might not answer your question.

In your website code, you can embed a code snippet from onlinegdb.com using the <script> tag

Steps: (source: the official OnlineGdb blog)

We are excited to introduce runnable c/c++ code snippets. Now you can embed code snippets which can be executed from your website/blog. Here is live example of embded runnable code snippet.

Below are steps to embed runnable code snippets to your own website.

  1. Goto onlinegdb.com
  2. Write and test your code
  3. Click “Share” button
  4. Copy “Embed Code” link, which would look like code below.
    <script src="//onlinegdb.com/embed/js/B1X6-oL-W"></script>
  5. Paste it in your article/page of your website where you want to display runnable code.That's it. Now your readers can run your code snippets from your website.

Example:

I just made a quick python code to show you, you can't edit the code, but it would be a cool feature.

EMBED: 

<script src="//onlinegdb.com/embed/js/SJ9vii3CD?theme=dark"></script>

Paste the embed in your website code and the embed will show up!

Hope this helped sorry to disappoint btw.

~ KKN :)

P.S 

if this didn't work, maybe ask the question on stackoverflow.com.

Their are a lot of experienced people there

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...