Python Tips
Follow
Find
19.0K views | +13 today
 
Scooped by Mathieu D.
onto Python Tips
Scoop.it!

Create Facebook Application in Python using App Engine

Run with Friends is a sample Facebook Canvas Application written in Python running on Google App Engine. The application is designed to run within an iframe on a Facebook Canvas page.

 

Facebook provides a large array of integration points for applications and this sample application makes use of only a few of those capabilities. Some of the things that are covered here are:

* Web based Authentication, specifically using the JavaScript SDK and the signed_request.

* Making use of a Social Plugin, notably the Login with Faces plugin.

* Showing Facebook Dialogs to allow the user to post content back to Facebook.

* Making Graph API calls using OAuth 2.0.

* Making use of Real-time Updates in order to keep the cached data up-to-date.

 

You can try the sample at https://apps.facebook.com/runwithfriends/

more...
No comment yet.
Python Tips
Various news, tutorials, and other stuff about Python programming.
Curated by Mathieu D.
Your new post is loading...
Your new post is loading...
Scooped by Mathieu D.
Scoop.it!

Mike Driscoll: How to Convert Decimal Numbers to Words with Python

It may have been a better idea to have called this this article “How to Convert Floats to Words”, but since I’m talking about currency, I thought using Decimal was more accurate.
more...
No comment yet.
Scooped by Mathieu D.
Scoop.it!

Codeswarm - Python Core Development Visualization

particle visualization of Python core development commits: Jan 1, 2010 - Mar 06, 2012
http://www.youtube.com/watch?v=IQPuU_YtN8Q
data source is the commit log from cpython mercurial trunk:
$ hg clone http://hg.python.org/cpython
...
more...
No comment yet.
Scooped by Mathieu D.
Scoop.it!

Building an HTTP shell with AES + Proxy Support in Python « SecManiac.com

"Got a little bored today and decided to write a reverse HTTP shell in Python thats platform independent and supports AES encryption when passing information back and forth. So this works on Linux, OSX, and Windows. The shell also supports proxy settings as well. This Python shell will initiate a reverse connection out of the network and connect to the attacker machine via pure HTTP communications. It’s pretty straight forward on how it works. I’ve byte compiled the code so you do not need to have Python installed on the victim, it will simply run as a normal executable."

more...
No comment yet.
Scooped by Mathieu D.
Scoop.it!

Wallix: Pylogsparser : visualizing ssh attacks in video

Wallix: Pylogsparser : visualizing ssh attacks in video | Python Tips | Scoop.it
In this article we will show another possible application for the pylogsparser library. We will also discover a simple way to draw and use world maps with python.
more...
No comment yet.
Scooped by Mathieu D.
Scoop.it!

Fredrik Håård's Blaag: [rant] Dare to show your code

[rant] Dare to show your code
My name is Fredrik, and sometimes I write code I’m not that proud of.
more...
No comment yet.
Scooped by Mathieu D.
Scoop.it!

Python 2.7 goes live on Google's App Engine | MYH3R3

Python 2.7 goes live on Google's App Engine | MYH3R3 | Python Tips | Scoop.it
Google has announced that the previously experimental version of Python 2.7, available on its App Engine platform, is now a fully supported feature.
more...
No comment yet.
Scooped by Mathieu D.
Scoop.it!

Eli Bendersky: Less copies in Python with the buffer protocol and memoryviews

Eli Bendersky: Less copies in Python with the buffer protocol and memoryviews | Python Tips | Scoop.it

For one of the hobby projects I’m currently hacking on, I recently had to do a lot of binary data processing in memory. Large chunks of data are being read from a file, then examined and modified in memory and finally used to write some reports. This made me think about the most efficient way to read data from a file into a modifiable memory chunk in Python.

more...
No comment yet.
Scooped by Mathieu D.
Scoop.it!

Tarek Ziade: Cornice — web services with Pyramid

Tarek Ziade: Cornice — web services with Pyramid | Python Tips | Scoop.it

Since we’ve initially started Cornice at Services, we had more discussion about how we could make it easier for developers to validate an incoming request.

Our goal is :

- to be able to validate a request and if needed, to convert it to specific data structures

- to complete the documentation of our web services in Sphinx with those validation steps

more...
No comment yet.
Scooped by Mathieu D.
Scoop.it!

Nicolas Paris: HTML output screenshot with Urwid ncurses library

Urwid is a ncurses library for Python, you may check older posts if you’re not familiar about it. So far, we’ve seen some useful functionalities and tricks, to run urwid, therefor, it’s time to see something (almost) useless but geek, and in the spirit of ncurses programs, as urwid allow to take « screenshots » of the application, with a HTML output.
more...
No comment yet.
Scooped by Mathieu D.
Scoop.it!

Python Ecosystem - An Introduction » mirnazim.org

When developers shift from PHP, Ruby or any other platform to Python, the very first road block they face(most often) is the lack of overall understanding the Python ecosystem. Developers often yearn for a tutorial/resource that explains how to accomplish most tasks in a more or less standard way.

 

What follows, is an extract from the internal wiki at my workplace, that documents the basics of Python ecosystem for web application development for our interns, trainees and experienced developers who shift to Python from other platforms.

more...
No comment yet.
Scooped by Mathieu D.
Scoop.it!

Building Web Services with Pyramid

Building Web Services with Pyramid | Python Tips | Scoop.it

Last year, when we started to write servers apps in Python at Mozilla Services, we’ve built a light micro-framework on the top of WebOb and Routes. That made a lot of sense back then because all our applications were pure JSON web services –except the reCaptcha view we display when you register in Sync–

The framework just needed to route a request to a function and let us do our work in pure Python from there.

more...
No comment yet.
Scooped by Mathieu D.
Scoop.it!

PyCharm: New PyCharm 2.0 EAP build: multiple projects, JavaScript debugger, console options

PyCharm: New PyCharm 2.0 EAP build: multiple projects, JavaScript debugger, console options | Python Tips | Scoop.it

This week’s EAP build of PyCharm 2.0 is probably going to be the last one before the Beta release, and as such, it brings the last major batch of new features to be included in PyCharm 2.0.

more...
No comment yet.
Scooped by Mathieu D.
Scoop.it!

Just a little Python: Using MongoDB's New Aggregation Framework in Python (MongoDB Aggregation Part 2)

Just a little Python: Using MongoDB's New Aggregation Framework in Python (MongoDB Aggregation Part 2) | Python Tips | Scoop.it
Continuing on in my series on MongoDB and Python, this article will explore the
new aggregation framework introduced in MongoDB 2.1.
more...
No comment yet.
Scooped by Mathieu D.
Scoop.it!

Learn Python The Hard Way, 2nd Edition

This simple book is meant to get you started in programming. The title says it's the hard way to learn to write code; but it's actually not. It's only the "hard" way because it's the way people used to teach things. With the help of this book, you will do the incredibly simple things that all programmers need to do to learn a language:

Go through each exercise. Type in each sample exactly. Make it run.

That's it. This will be very difficult at first, but stick with it. If you go through this book, and do each exercise for one or two hours a night, you will have a good foundation for moving onto another book. You might not really learn "programming" from this book, but you will learn the foundation skills you need to start learning the language.

This book's job is to teach you the three most essential skills that a beginning programmer needs to know: Reading and Writing, Attention to Detail, Spotting Differences.

 

more...
No comment yet.
Scooped by Mathieu D.
Scoop.it!

Want features? Just code!

Want features? Just code! | Python Tips | Scoop.it
Somebody just sent an email on a user’s mailing list for an open-source scientific package entitled “Feature foo: why is package bar not up to the task?” (names hidden to avoid pointing directly to the responsible of my wrath).
more...
No comment yet.
Scooped by Mathieu D.
Scoop.it!

httpie - Python-powered HTTP CLI for humans

httpie - Python-powered HTTP CLI for humans | Python Tips | Scoop.it
httpie - Python-powered HTTP CLI for humans: Although cURL is great, we’re always looking for great console tools for working with HTTP. Jakub Roztocil has released HTTPie.
more...
No comment yet.
Scooped by Mathieu D.
Scoop.it!

Ian Bicking: Python Application Package

I’ve been thinking some more about deployment of Python web applications, and deployment in general (in part leading up to the Web Summit). And I’ve got an idea.
more...
No comment yet.
Scooped by Mathieu D.
Scoop.it!

Travis CI now supports Python and Perl

Travis CI now supports Python and Perl | Python Tips | Scoop.it
Travis CI now supports Python and Perl: Since we first covered Travis CI a year ago, the project has continued to improve support for Ruby as well as additional languages.
more...
No comment yet.
Scooped by Mathieu D.
Scoop.it!

Daniel Greenfeld: Evaluating which package to use

Daniel Greenfeld: Evaluating which package to use | Python Tips | Scoop.it

In November of 2009 I wrote about which third-party Python Packages I'll use. Here is my modern take on it - much of it inspired by personal experience and the advice of peers and mentors.

more...
No comment yet.
Scooped by Mathieu D.
Scoop.it!

Alex Gaynor: Why del defaultdict()[k] should raise an error

Raymond Hettinger recently asked on twitter what people thought
del defaultdict()[k] did for a k that didn't exist in the dict.
more...
No comment yet.
Scooped by Mathieu D.
Scoop.it!

John Anderson: Writing tests for Pyramid and SQLAlchemy

Pyramid's documentation doesn't cover the preferred way to test with SQLAlchemy, because Pyramid tries to stay out of your way and allow you to make your own decisions. However, I feel i'ts necessary to document what I think is the best way to test.
more...
No comment yet.
Rescooped by Mathieu D. from Python libraries
Scoop.it!

Pygcurse - Curses Emulator for Pygame

Pygcurse - Curses Emulator for Pygame | Python Tips | Scoop.it

Pygcurse (pronounced "pig curse") is a curses library emulator that runs on top of the Pygame framework. It provides an easy way to create text adventures, roguelikes, and console-style applications. The mascot of Pygcurse is a blue pig with a skull tattoo on its butt.

 

"We already have a curses module for Python."

 

Yes. But unfortunately, the curses module that comes with the Python standard library does not work on Windows. The excellent Console module from effbot provides curses-like features, but it only runs on Windows and not Mac/Linux. By using Pygame, Pygcurse is able to run on all platforms. Also, since this curses-like module is built on top of Pygame, your programs are not strictly limited strictly to text characters. You can use all the normal Pygame drawing and graphics functions, as well as any libraries made for Pygame.


Via Debaser
more...
No comment yet.
Scooped by Mathieu D.
Scoop.it!

Mike Driscoll: wxPython and SqlAlchemy: An Intro to MVC and CRUD

Mike Driscoll: wxPython and SqlAlchemy: An Intro to MVC and CRUD | Python Tips | Scoop.it
In this article, we will be creating a program to store our personal books or perhaps just the books you’ve read. It will demonstrate how to combine wxPython and SqlAlchemy, a SQL Object Relational Mapper (ORM).
more...
No comment yet.