Jump to content
  • Advertisement
Sign in to follow this  
Buzz1170

Display a link in Python

This topic is 4489 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I would like to know how to display a link in Python that someone could click on while running a Python program.

Share this post


Link to post
Share on other sites
Advertisement
Well you're not being very specific.

Have you looked through the docmentation for a that might work module?

The Vaults of Parnassus has a a lot of internet modules you might want to look at.

I can't help you beyond that as I'm only just learning, but I you might want to be as specific in your questions as possible or no one will be able to help you.

Share this post


Link to post
Share on other sites
Okay. I meant to say in my text-based RPG game that I made in python, I would like to put a link to a website in one of the sections of the game. I tried just typing the address, (http://www.freewebs.com/idaliengames) but that does not work. Is there a way to do this or do they have to copy and paste?

Share this post


Link to post
Share on other sites
They must copy and paste unless you create your own text-box control which is enabled for such a thing. There may be some already available. Try looking at pygame.org.

Share this post


Link to post
Share on other sites
In regard to the Original Poster:

That is terminal dependent. In Linux and other terminals, the link is clickable by default. However, in DOS/Windows, I think not. However, you can in fact use one of the modules which sadly I forgot which, and call one of it's functions and it'll open a browser window (The default browser) and open the page specified. So you can do something like 'Would you like to open the page? Y/n' and if one presses Y, it opens, etc. Unless you want to just open it without letting them know first, or probably you can warn them that in a certain time frame it'll open. Again, unfortunately I don't remember the module, browser? I don't know.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!