Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
Could you please tell me, How do I write a basic webpage without using framework like Django, Web2Py and others third party frameworks. Also, I don't like to use CGI for it. I need basic MVC structure with a hello-world web page only.
I suppose you mean a http server, because for a webpage only, you'd use html, not python.
I suggest you start with some reading on this page. It's the http server for python. As you want to keep things easy, you probably just want to overwrite the BaseHTTPRequestHandler or the SimpleHTTPRequestHandler classes, especially the do_GET and do_POST methods.
Note that this won't force you to use MVC, that's your own responsibility. You'll need an actual framework if you want to enforce MVC.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I have a working R script. Can this be wrapped in a Python code so it can be deployed as an API ?
As mentioned in an earlier post, things that are not easy in R can be relatively simple in other languages. Another example would be connecting to Amazon Web Services. In relation to s3, although there are a number of existing packages, many of them seem to be deprecated, premature or platform-dependent. (I consider the cloudyr project looks promising though.)
If there isn’t a comprehensive R-way of doing something yet, it may be necessary to create it from scratch. Actually there are some options to do so by using AWS Command Line Interface, AWS REST API or wrapping functionality of another language.
http://jaehyeon-kim.github.io/2015/11/Quick-Test-to-Wrap-Python-in-R.html
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I want to create a web app for my company that functions like a tool suite for non-technical employees to use. I'm using
Python
Selenium WebDriver,
BeautifulSoup,
Srapy,
Django
Is it possible and is this the right approach?
"The idea is to create a variety of methods that can be run by
clicking a button and/or inserting content in inputs, and having the
tests / functions run and returning the specified results."
Maybe Flask can help you here. It has a nice functionality to route urls to specific functions or methods in your code. It provides a convenient way to bind actions to code. You can search the web for how you can leverage Flask to cater to your specific needs, but here I just wanted to convey that it would help.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have a python script that takes inputs from commandline. I simply want to modify this script so I can run it on web. I want the commandline interface to be replaced by a simple boxes in a web page, and once the script is executed, I want the results to be shown on a webpage like it does in commandline.
Any help on where to start, which python packages to use and which steps to take would be much appreciated.
Until now, I read a little about webapp2 for Google App Engine and web.py. I do not want to use Django.
Thank you!
While you can use a microframework like Flask [1] for quickly getting started, you can get closer to the metal. Try learning about the HTTP protocol and implement your own server using the http module. Python 3's http.server contains a class SimpleHTTPServer [2] which can be very good for understanding how you're communicating between the client and your process.
[1] http://flask.pocoo.org/docs/0.12/quickstart/
[2] https://docs.python.org/2/library/simplehttpserver.html
Have you considered using Flask?
http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world
This is a pretty great tutorial on how to make a basic webapp.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I made in python a webcrawler, and I want to make Django website to display the results of the crawling, can I do it? for example: the crawler enter to "https://stackoverflow.com/questions" and take the questins of the first page and display it on the website(maybe on the tamplate of Django).
EDIT: I just re-read your question and it looks like you're already doing the scraping? You should implement that functionality into a Django site and then yes of course you can display it.
Yes you can do it. A great combination for web scraping with django is using the python requests library (which I'm guessing you're using) andBeautiful Soup. I've used this combination in a few different projects and I've been happy with it.
Another popular option uses the python Scrapy library and combines it into a django app called django-dynamic-scraper.
Hopefully this points you in the right direction.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm a learning Python/Django programmer and want to try to create an easy web-messenger. Is it real to write web-messenger for django? And does any modules for that exist or any open-source protocols support python?
Or you can install xmpp server (like eJabberd) and write a server side interface over it. It will be easier, faster and optimal solution.
Gmail and Facebook both uses xmpp protocol. People using your application will also be able to send chat request to their friends in gmail.
You wont even have to write a website interface, there are javascript library (like Converse.js) available which you can directly plug into your website and you will be good to go.
Not sure what you mean by 'web-messenger'. Do you mean a chat system? Django have plenty of chat apps that you can integrate into your projects.