i am just start to learnin python and i want to know some thing about it
1.is is used for web development
2.how can i run python program on my ubuntu os i have python installed on my system but not able to run i don't know how to run python file for checking output?
3.if it is used for web development also then how i can use it i also search about it but not getting proper answer so i came here hope some one give me right direction about it
thank you

Dani AI

Generated

Short answer: Python is a solid choice for web development — and for scripting, automation, and data work. asked about web use and running scripts on Ubuntu; pointed out running code from the terminal and covered the wider ecosystem. The immediate goals on Ubuntu are: confirm the correct interpreter, use an isolated environment for packages, and build a tiny app to learn routing, templates, and persistence.

Common causes for “can’t run” on Ubuntu are a missing or different interpreter, incorrect file permissions, Windows CRLF line endings, or an inactive virtual environment. Quick checks and a minimal workflow:

python3 --version
which python3

Create a script with a shebang and run it directly:

#!/usr/bin/env python3
print("hello")

Make it executable and run from the shell:

chmod +x hello.py
./hello.py

Use a virtual environment for project dependencies:

python3 -m venv env
source env/bin/activate
pip install <package>

For web development, start very small: serve one URL, return a simple template, then add form handling and a database layer (use a lightweight DB for development, migrate to a production-grade DB later). Keep secrets out of source, store dependencies in a requirements file (pip freeze > requirements.txt), and add tests before deployment. Plan deployment around a production app server, HTTPS, and a persistent database rather than the built-in development server.

Troubleshooting tips: if python3 is not found, install the interpreter with Ubuntu’s package manager; if syntax errors appear, confirm UTF-8 line endings and that the code targets the correct Python major version. Following ’s terminal checks is a fast first step; use ’s ecosystem overview to choose the right stack once the basics work.

Recommended Answers

All 3 Replies

  1. Yes. Check out . Python is used for both application development and server-side development.
  2. python <file name>, as in python hello_world.py
  3. As I said, check out Google App Engine. You can also Google Search python servers to find a suitable python-based web server for you. They will provide you with useful information to get started with their servers.

ok thanx Iim

1.is is used for web development

Python is great for all web stuff you can think of.
Is normal to use Web Framework when making websites.
Django is the most known and has good documentation,some sites run bye Django djangosites.
Some info about setup Apache with mod_wsgi/mod_python here
HOWTO Use Python in the web

There are also CMS like Plone and Django CMS.

Micro framework has in the last couple of year become very popular, Flask, Bottle, Pyramid to mention some.

There a lot of more stuff that make Python great to interact with web,as honorable mention , Beautiful Soup, lxml

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.