ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
If you Google "php print or echo", you will find a whole host of articles and discussions on the differences (there aren't many).
It will take you 10-15 minutes to look at a few articles and make a list of the differences. Would you like to post a summary of your findings here to help others?
import urllib2
f = urllib.request.urlopen('http://www.python.org/')
print(f.read(100).decode('utf-8'))
reply: the hosting company I having, I put simply hello world Python script, but no luck
I not know any hosting company can host Python script
I tryED anyway~
How did you get on with looking at the differences between php's print and echo? Can you list the differences here? You don't need to be an expert programmer to search the internet, and there are many sites listing the differences.
I hope you don't mind me saying so, but your question about Python is a different topic and so you should really have started a new thread for it.
What exactly is your question? Are you programming in Python 2 or Python 3? The reason I ask is that if you're using Python 3, you should be using urllib.request (and urllib.parse and urllib.error if required), not urrlib or urllib2. You might also want to look at the excellent Requests library (http://requests.readthedocs.io/en/master/).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.