background preloader


Twisted is an event-driven networking engine written in Python and licensed under the open source ​MIT license. Twisted runs on Python 2 and an ever growing subset also works with Python 3. Twisted makes it easy to implement custom network applications. Here's a TCP server that echoes back everything that's written to it: from twisted.internet import protocol, reactor, endpoints class Echo(protocol.Protocol): def dataReceived(self, data): self.transport.write(data) class EchoFactory(protocol.Factory): def buildProtocol(self, addr): return Echo() endpoints.serverFromString(reactor, "tcp:1234").listen(EchoFactory()) Learn more about ​writing servers, ​writing clients and the ​core networking libraries , including support for SSL, UDP, scheduled events, unit testing infrastructure, and much more. Twisted includes an event-driven web server. Learn more about ​web application development, ​templates and Twisted's ​HTTP client. Twisted includes a sophisticated IMAP4 client library.

Related:  DjangoSoftware DevPython

VirtualEnvForNewerDjango - PythonAnywhere A virtualenv is a way to have your own private Python environment that has different versions of packages to the system default. You can have many virtualenvs, each with its own versions of installed packages. On PythonAnywhere, this is a great way to use newer (or older) versions of software than the ones we have installed. One reason you might want to do this is to use a newer version of Django. For Python 2.7, our system default is currently 1.3.7, while the latest version is 1.7. These instructions explain what to do if you want to use Django 1.7; if it's a different package that you want to upgrade (or you need a different version of Django), then the changes should be pretty obvious.

articles/why-you-need-both-a-mobile-app-and-a-responsive-website-in-2012/ A lot of people are struggling with the choice between a mobile app and a responsive website. When you look at the discussion of responsive vs app, the answers have been given already. It basically all boiles down to whether your content is static or interactive. Static content (like posts on a blog) has more use on the web, where interactive content (like most webapps, Google Docs for example) fits better in an app at the moment. A pattern I also see more often nowadays is to tell your mobile web users to download the app from their store on a responsive portal page. This is a great way to send users to the correct location if you don't have a responsive website. Reactor pattern - Wikipedia Structure[edit] Resources: Any resource that can provide input to or consume output from the system.Synchronous Event Demultiplexer: Uses an event loop to block on all resources. When it is possible to start a synchronous operation on a resource without blocking, the demultiplexer sends the resource to the dispatcher.Dispatcher: Handles registering and unregistering of request handlers. Dispatches resources from the demultiplexer to the associated request handler.Request Handler: An application defined request handler and its associated resource.

How to Think Like a Computer Scientist — How to Think like a Computer Scientist: Interactive Edition Welcome! Take a tour, experiment with Python, join more than 850,000 other readers in learning how to think like a computer scientist with Python. (welcome) Node.JS and the WebSocket protocol After reading Simon Willison’s post on Node.JS, I decided I’d give it a try myself. Today I released node.websocket.js After a couple of months I’ve been watching the progress on the WebSocket protocol, which gives JavaScript developers full-duplex communications channels in the browser. This is a very exciting alternative to the COMET techniques we’re used to seeing. Node.JS is a framework for networked, event-driven applications, where JavaScript has a natural fit.

Django Performance: 4 Simple Things by Frank Wiles on May 6, 2015 Optimizing for performance often comes with a bunch of headaches and hard problems, but it doesn’t always have to be that way. Below are four simple things you can do to quickly and easily improve the performance of your sites. They’re so simple you should make them part of your standard setup. Persistent database connections PythonOsmApi This documentation is about a python class to communicate with OpenStreetMap API v0.6 developped by User:EtienneChove (currently maintained by User:Metaodi). Please submit an issue if you require other features. Hello World : node download 17.6. sched — Event scheduler — Python 3.5.2 documentation Source code: Lib/ The sched module defines a class which implements a general purpose event scheduler: class sched.scheduler(timefunc=time.monotonic, delayfunc=time.sleep) The scheduler class defines a generic interface to scheduling events. It needs two functions to actually deal with the “outside world” — timefunc should be callable without arguments, and return a number (the “time”, in any units whatsoever). If time.monotonic is not available, the timefunc default is time.time instead.

Installation and quick start — nose 1.3.0 documentation nose extends unittest to make testing easier. On most UNIX-like systems, you’ll probably need to run these commands as root or using sudo. Install nose using setuptools/distribute: Node.js is the New Black If you’ve been paying attention to news about web technology in the last year, you’ve most likely heard the name node.js mentioned at least once or twice. What happened next probably went like this: you asked, “What is it?” and someone (or Google) told you that it was a way to write web servers using JavaScript.

Obey the Testing Goat! Someone recently wrote to me asking about decorators, and saying they found them a bit confusing. Here's a post based on the email I replied to them with. The best way to understand decorators is to build a couple of them, so here are two examples for you to try out. The first is in the Django world, the second is actually a simpler, pure-python one. Challenge: build a decorator in a simple Django app Making use of OpenStreetMap data with Python Ever wondered how web maps are created? Ever wondered if you could build something like Google Maps over a weekend? You probably can’t, but this talk will show you the basics of what you need to know, such as importing data, rendering maps and even building simple routes.

airmon-ng [Aircrack-ng] Description This script can be used to enable monitor mode on wireless interfaces. It may also be used to go back from monitor mode to managed mode. Entering the airmon-ng command without parameters will show the interfaces status. Usage

Related:  Python