background preloader

PyInstaller

PyInstaller

PEP 8 -- Style Guide for Python Code Code should be written in a way that does not disadvantage other implementations of Python (PyPy, Jython, IronPython, Cython, Psyco, and such).For example, do not rely on CPython's efficient implementation of in-place string concatenation for statements in the form a += b or a = a + b. This optimization is fragile even in CPython (it only works for some types) and isn't present at all in implementations that don't use refcounting. In performance sensitive parts of the library, the ''.join() form should be used instead. This will ensure that concatenation occurs in linear time across various implementations.Comparisons to singletons like None should always be done with is or is not, never the equality operators.Also, beware of writing if x when you really mean if x is not None -- e.g. when testing whether a variable or argument that defaults to None was set to some other value. The other value might have a type (such as a container) that could be false in a boolean context!

Instant Python This is a minimal crash-course in the programming language Python. To learn more, take a look at the documentation at the Python web site, www.python.org; especially the tutorial. If you wonder why you should be interested, check out the comparison page where Python is compared to other languages. This introduction has been translated into several languages, among them Portuguese, Italian, Spanish, Russian, French, Lithuanian, Japanese, German and Greek, and is currently being translated into Norwegian, Polish, and Korean. Note: To get the examples working properly, write the programs in a text file and then run that with the interpreter; do not try to run them directly in the interactive interpreter - not all of them will work. To begin with, think of Python as pseudo-code. x,y,z = 1,2,3 first, second = second, first a = b = 123 Blocks are indicated through indentation, and only through indentation. The first two examples are equivalent. Notice that the end is non-inclusive. print a or b

2.2. Using the gphoto2 command line interface (CLI) OK, we begin with finding out how you can connect a camera to your computer: alice@host:~$ gphoto2 --list-portsDevices found: 4 Path Description -------------------------------------------------------------- serial:/dev/ttyS0 Serial Port 0 serial:/dev/ttyS2 Serial Port 2 serial:/dev/ttyS3 Serial Port 3 usb: Universal Serial Bus alice@host:~$ In this example, we see that we have the three serial devices /dev/ttyS0, /dev/ttyS2 and /dev/ttyS3 which are configured properly and to which gphoto2 has write permissions for. Additionally, there is also a USB bus. However, we cannot tell yet whether we will have write access to the USB device file your camera will be assigned by your operating system. The next step is to connect your camera and find out whether the gphoto2 can find it. alice@host:~$ gphoto2 --auto-detectModel Port ---------------------------------------------------------- Canon PowerShot G2 usb: alice@host:~$ OK, so now let's see what we can find out about the camera:

Créez des executables pour vos scripts python pyInstaller est un outil permettant d'empaqueter un script python dans un exécutable. A la différence du célèbre py2exe, il est multi-plateforme et permet d'empaqueter tous les fichiers necessaires au fonctionnement dans un seul fichier binaire. Pratique pour distribuer un programme sans se soucier des modules disponibles sur le poste des utilisateurs... Notez qu'il ne s'agit pas de la transformation d'un script python en un vrai executable. Téléchargez l'archive sur et décompressez là sur votre machine. Sous Linux, assurez vous d'avoir installé les paquets python-dev et zlib1g-dev. Executez Configure.py et déplacez-vous dans source/linux . Sous windows, vous n'avez qu'à télécharger et décompresser l'archive. Pour la suite du tuto, je considèrerais pyinstaller installé dans le répertoire /home/pyinstaller . Choisissez un script Python qui sera votre premier script compilé avec Pyinstaller. Ouvrez une console. -h, --help Affiche l'aide -F, --onefile -D, --onedir

7. Input and Output — Python v2.7.1 documentation There are several ways to present the output of a program; data can be printed in a human-readable form, or written to a file for future use. This chapter will discuss some of the possibilities. 7.1. Fancier Output Formatting So far we’ve encountered two ways of writing values: expression statements and the print statement. Often you’ll want more control over the formatting of your output than simply printing space-separated values. The string module contains a Template class which offers yet another way to substitute values into strings. One question remains, of course: how do you convert values to strings? The str() function is meant to return representations of values which are fairly human-readable, while repr() is meant to generate representations which can be read by the interpreter (or will force a SyntaxError if there is no equivalent syntax). Some examples: Here are two ways to write a table of squares and cubes: Basic usage of the str.format() method looks like this: '! 7.1.1. 7.2.

JavaInstallation Introduction Java is a technology originally developed by Sun Microsystems, and acquired by Oracle. The following are the prevalent implementations: OpenJDK: The OpenJDK project is an open-source implementation of the Java SE Platform. OpenJDK Installation of Java Runtime Environment Install the openjdk-6-jre package using any installation method. Browser plugin Install the icedtea6-plugin package using any installation method. This plugin works with the main browsers: Firefox, Chromium, Google Chrome, and Epiphany. On Konqueror, go to Settings → Configure Konqueror... and from menu select Java & JavaScript, then tick Enable Java globally option. SDK (Software Development Kit) In Java parlance the Java Development Kit (JDK) is sometimes used for SDK. Install the openjdk-6-jdk package using any installation method. Alternative Virtual Machines Most users won't need to worry about these, but if you use an architecture (e.g. JamVM: This is the default VM for ARM in 11.10. Oracle Java 7 IBM Java

Cours Dernière mise à jour : 29/10/2015 Initiation Algorithmique Objets Qualité Théorie des langages Livres Les Solutions d'Entreprises Business Intelligence Méthodes et Architecture logicielle Design patterns eXtreme Programming Spring Les langages de programmation Ada Algoid/AL Assembleur Basic Caml-Light Fortran Go Haskell Java LaTeX Lua Nice Objective-C OCaml Pascal Perl POV-Ray PowerShell Prolog PureBasic Python RealBasic Ruby et Ruby on Rails Scala Scripting IRC Shell Smalltalk VBScript WLangage Les langages de programmation pour le Web Flash, Flex et ActionScript Java Web Les meilleurs cours et tutoriels pour apprendre le développement et la programmation Web en Java : Spring, Java EE, Servlets, JSTL, Taglib, JSF, Struts, Wicket, GWT, Tomcat... JavaScript Apache Le Web sémantique (RDFS, OWL, RDFa, Microformat, Microdata, ...) Dart Autres Qt Les EDI et les outils pour la programmation Tous Access C++ Builder Code::Blocks Crystal Reports Delphi Eclipse GraphViz JBuilder LabView Lazarus Netbeans Turbo Pascal Visual Basic Visual C++ Visual Studio WebDev Word

Sugar on a Stick What is Sugar on a Stick? BitTorrent links are available at the Spins download page. Fedora and the Infinity design logo are trademarks of Red Hat, Inc. Want to use Sugar on a Stick? Want to contribute to Sugar on a Stick? New contributors start here! Welcome! What can you do? There are three main ways you can contribute to the Sugar on a Stick community. Get Activities on the Stick Get Sticks into Schools Get Contributors What's happening? Sugar on a Stick/Beta Sugar Virtual Box Appliances Import into VirtualBox Contributor stories To find out what other contributors are doing, check out Planet Sugar Labs, where contributors to Sugar Labs and the Sugar on a Stick project aggregate their blogs. Meetings Communication through the Sugar on a Stick mailing list has replaced regular meetings. We once had weekly meetings on IRC - see Sugar on a Stick meetings for more information, including logs from past meetings. Related work Previous versions and other subpages index

Phidgets Inc. - Unique and Easy to Use USB Interfaces UNetbootin - Homepage and Downloads

Related: