text
stringlengths
256
65.5k
Here's my ORM entity class. The primary key is composite cause 'id_string' may be the same for different users (identified by uid). One thing I understood from Postgres SQL error when creating a table based on this class ( ProgrammingError: (ProgrammingError) there is no unique constraint matching given keys for refere...
I am using web.py and creating a basic webpage, I had a basic html code which has a button as below <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <meta http-equiv="Content-Type" con...
JavaScript one_relic — 2011-07-27T20:46:59-04:00 — #1 First and foremost, I want to state that while I have a basic understanding of javascript, I'm still fairly new to it, so any assistance or advice is greatly appreciated. I've recently been going through the process of redesigning my website to include some jquery f...
Kivy runs on android using the python-for-android project, which support android services. This works in a simple way, you basically bundle two main.py in your application, one for the UI, one for the service. The UI can start the services on start. From that point though, things may be a little uneasy. Why? Because yo...
Author: Eirik Schwenke Many thanks to all the other slackers, that managed to get an extension for all of us that were too lazy to even ask — and to the professor for granting the extension. Without your help, this paper would not have been accepted. Also many apologies for the rough quality of this document; I only fo...
Ayu Grub ne se lance pas Bonsoir, J'ai installé windows 7 et Xubuntu 11.10 sur un nouveau pc avec cette configuration:CM: Asus P8H67 B3Processeur: i5 2500kDD: 1TO 7200 RPMRAM: 2x4GOCG: Gigabyte GeForce GTX 560 Mais je boot toujours sur windows et Grub ne se lance pas j'ai essayé de réinstaller grub depuis une session l...
Hi, Just installed Xfce-4.6.1 on a new Gentoo system. Sat down and installed my preferred theme, wallpaper and made some customisations to get Xfce4 to how I like it and everything was fine. I then did some tweaking of the /etc/X11/xorg.conf (mainly trying out the nvidia-xconfig to re-tweak it then adding things back i...
So, following previous blog entries about importing fixed width data, fromPostgres Online Journal and David (perl) Fetter, I couldn't resist followingthe meme and showing how to achieve the same thing with pgloader. I can't say how much I dislike such things as the following, and I can't help thinking that non IT peopl...
This example uses Tkinter, one of several open source GUI libraries available for Python. Tkinter is the de facto standard Python GUI, and is typically included with the language (see Installation Notes for details). An Introduction to Tkinter is a highly accessible tutorial on using this library in your own programs. ...
rubens xubuntu dapper sans iso ? Bonjour, Je voudrais passer d'une Ubuntu Breezy Badger à une Xubuntu Dapper Drake, Je fais d'abord ça sur un portable Dell Precision qui me sert à effectuer des tests. Je verrai plus tard sur ma station de travail IBM PC 300. Quelle est la bonne méthode ? Je précise que je voudrais ne p...
I would like to pass some options to Python (version 2.6) every time, not just in interactive mode. Is there a file I can put such commands in? EDIT: Specifically, I'm wanting to silence the Deprecation warnings. I would like to pass some options to Python (version 2.6) every time, not just in interactive mode. Is ther...
I am wondering why I am receiving this error: cmd = "INSERT INTO resulttest (category, value, timestamp) VALUES (" + key + ", " + str(value) + ", " + str(timestamp) + ")" c.execute(cmd) db.commit() INSERT INTO resulttest (category, value, timestamp) VALUES (composed, 2, 1343186948.8) Traceback (most recent call las...
I want to avoid boilerplate code for creating Google Cloud Endpoints APIs for different models of my Google App Engine application. Suppose I have a Post, User and Category model. The data is stored in the datastore. I want to create a REST API with the resources posts, users and categories. I have written the followin...
I am trying to stream cast a computer generated video using gstreamer and icecast, but I cannot get gstreamer appsrc to work. My app works as expected if I use xvimagesink as the sink(see commented code below). But once I pipe it to theoraenc it does not run. I exchanged shout2send with filesink to check if the problem...
What are metaclasses? What do you use them for? A metaclass is the class of a class. Like a class defines how an instance of the class behaves, a metaclass defines how a class behaves. A class is an instance of a metaclass. While in Python you can use arbitrary callables for metaclasses (like Jerub shows), the more use...
January 03, 2012 - by joyentjames As part of SmartDataCenter 6.5, we've introduced something I'm pretty excited about sharing, which is an open signing protocol for HTTP. We're using it in what we call CloudAPI, which is the REST API that powers our customer portal, and is exposed to you to create your own applications...
Many timestamps have an implied timezone. To ensure that your code will work in every timezone, you should use UTC internally and attach a timezone each time a foreign object enters the system. Python 3.2+: >>> import time, datetime >>> datetime.datetime.fromtimestamp( ... time.mktime(time.strptime("March 5, 2014, ...
I have a french character that is encoded as follows: "Jos\xE9e" I need to convert it to regular character because it produces this error on my server: invalid byte sequence in UTF-8 What can I do to fix this error? Rails 3 Ruby 1.9.2 require 'iconv' utf_string = Iconv.conv('UTF-8', 'ISO-8859-1', "Jos\xE9e") Use a edi...
This answer comes from Steven Bethard on Google groups. I'm reposting it here to make it easier for people without a Google account to access. You can override the default behavior of the error method: import argparse import sys class MyParser(argparse.ArgumentParser): def error(self, message): sys.stderr.w...
/projects/mymath$ ls __init__.py __init__.pyc mymath.py mymath.pyc tests and under the directory tests I have /projects/mymath/tests/features$ ls steps.py steps.pyc zero.feature I tried to import my factorial function sys.path.insert(0,"../../") #import mymath from mymath.MyMath import factorial But it said No...
Question: Write a program that asks the user to enter a number of seconds, and works as follows: There are 60 seconds in a minute. If the number of seconds entered by the user is greater than or equal to 60, the program should display the number of minutes in that many seconds. There are 3600 seconds in an hour. If the...
Python-Powered Templates with Cheetah by Andrew Glover 01/13/2005 XML transformation via XSL Transformations (XSLT) is quite popular and indeed powerful. Well-constructed XSL can produce HTML, PDF, XML, and just about any other text format imaginable. XSLT, however, requires that the subject data be a well-structured X...
Gemnoc Re : Logiciel de CAO 2D/3D (Conception Mecanique) Une autre demande pour Ellypsis, pourrais-tu démarrer FreeCAD de cette façon dans le terminal : freecad --write-log Ceci va enregistrer un fichier journal FreeCAD.log dans le dossier ~/.FreeCAD, ouvres-le et postes le contenu ici. J'ai testé rapidement le Sketch...
n3o51 Liste des onglets Bonsoir y a t'il un moyen de copier directement dans un fichier txt la liste des onglets ouverts dans opera et firefox ? ligne par ligne ? Merci d'avance Edit modérateur : si vous n'avez pas de réponses à donner, ne sortez pas le sujet des "Sujets sans réponses". Dernière modification par xabilo...
Here's the best solution I could develop (valid for Linux only): Install AutoKey, add a script there: from Xlib import display c = display.Display().screen().root.query_pointer()._data x = c["root_x"] y = c["root_y"] mouse.click_absolute(x,y,3) keyboard.send_key("<down>", repeat=10) keyboard.press_key("<enter>") keyboa...
Corzntin error /boot/grub/i386-pc/normal.mod not found Bonsoir ! En tentant d'installer Ubuntu depuis une clef USB faite avec Unetbootin, l'erreur "error /boot/grub/i386-pc/normal.mod not found" apparaît (le LiveUSB ne démarre pas du tout, donc impossible d'essayer Boot Repair). J'ai essayé à plusieurs reprises de "ref...
I've been struggling with how to implement scripting in my game engine. I only have a few requirements: It should be intuitive, I don't want to write a custom language, parser and interpreter, and I don't want to use threading. (I'm certain there's a simpler solution; I don't need the hassle of multiple game logic thre...
Class: ARGF Inherits: ARGF Includes: Defined in: io.c, io.c Overview ARGF is a stream designed for use in scripts that process filesgiven as command-line arguments or passed in via STDIN. The arguments passed to your script are stored in the ARGV Array,one argument per element. ARGF assumes that any arguments thataren'...
#1626 Le 13/05/2012, à 15:13 Hizoka Re : [glade2script-GTK2] Interface graphique pour script bash ou autre. echo "TERM@@SEND@@$cmd\n" sleep 3 # permet de laisser le temps au process d'etre créer pid=$(pidof cdrdao) while kill -0 $pid >/dev/null; do sleep 0.2 ## barre de progression ####### ...
[This post is by Elliott Hughes, a Software Engineer on the Dalvik team. — Tim Bray] If you don’t write native code that uses JNI, you can stop reading now. If you do write native code that uses JNI, you really need to read this. What’s changing, and why? Every developer wants a good garbage collector. The best garbage...
abelthorne The Humble Voxatron Debut Après la concurrence de l'IndieRoyale Bundle pas pour Linux, Wolfire revient dans la course avec le Humble Voxatron Debut. C'est la saison des bundles ! Bon, après un bundle d'un seul jeu (Frozen Synapse) récemment, voilà qu'ils nous refont le coup du jeu unique (Voxatron, donc) et ...
Description: Gensim - Python Framework for Vector Space Modelling Gensim is a Python library for Vector Space Modellingwith very large corpora. Target audience is theNatural Language Processing(NLP) community. Features All algorithms are memory-independentw.r.t. the corpus size (can process input larger than RAM), Intu...
tomtom Re : [HOW TO] adesklets : installation sous Ubuntu Breezy raaah ! j'ai un probleme d'interpreteur python ! J'ai installé toutes les librairies via synaptic et adesklets aussi. J'ai DL YAB (Yet Another Bar) et j'ai ca : [i]tomtom@barad-luin:/mnt/config/programmes/adesklets/yab-0.0.2$ [/i][b]ls -l[/b] total 56 -rw...
lanzrg Scraper un site simple (sans AJAX) en python + download ? Bonjour, Je souhaite scraper le site de sublime text 3 afin de récupérer l'url de la dernière version stable. Pour ensuite la télécharger. Tout ceci en Python évidemment. Ce que j'ai et qui à l'air de fonctionner (n'hésitez pas à me dire que c'est à chier...
As I'm sure everyone knows, we've been moving up the Distrowatch list. We're somehitng like #58 in the 6month ranking, though we'll drop a few positions when something else (read: inferior) is released. But I juts played about with the settings, and instead of looking at 6month, looked at 30days and 7days. 30days: we'r...
I have a Dell Precision M4500 laptop with 4GB RAM memory and Ubuntu 12.04 64-bit installed with 8GB of swap memory. After launching usual Java development environment (Eclipse, MySQL Server, SQuirreL, several tabs in Chrome, Skype and Tomcat with relatively small GWT webapp deployed in devmode) about 100 MB of free mem...
AnsuzPeorth [HtmlDesktopTools] Tout pour votre bureau en HTML5/JS/CSS3 Bjr, N'ayant pas trouvé une taskbar qui me convienne, j'ai codé, pour le fun, une taskbar html. Plutot que de me faire juste ma taskbar, j'ai plutot développé un outils qui permet de faire ses widgets en html pour le bureau, dont ma taskbar. Ce proj...
Piping PHP output to the linux 'less' command causes 'less' to really act up. (CentOS 6.2, didn't happen with CentOS 5.) When I pipe output from php into 'less', it requires the enter key be pressed after every command, even after the 'j' command (the command to scroll down one line). In addition, the command key is sh...
The Flask Mega-Tutorial, Part XVI: Debugging, Testing and Profiling The goal of the tutorial series is to develop a decently featured microblogging application that demonstrating total lack of originality I have decided to call microblog. Here is an index of all the articles in the series that have been published to da...
00:00 22 December 2010 tl;dr: Don’t retrieve a whole row just to get the primary key you had anyway. Don’t iterate in the app; let the database server do the iteration for you. There’s a couple of bad habits I see a lot in Django code (including, sadly, my own), which is abuse of a ForeignKey field. Let’s take the clas...
This is a long winded way of saying that I decided to implement another feature first to make it easier for me to test refresh out, editing an existing database. The first step of this was to be able to add columns. So I added an "add column" button. I used quickly.prompts to get the string from the user. To actually a...
As we all know writing tests is not particularly fun and having a test suite which takes a long time to complete makes everything even less enjoyable. Currently at Cloudkick our test suite is not particularly large or slow, but I still wanted the tests to finish faster (when dealing with tests, every minute counts). We...
I've been facing the similar problem as you seem to be having. My django application performs a lot of calls to rest services to render the view and it bothered me they had to be serialized. I developed this: https://github.com/kowalski/featdjango/ This is a application server based on twisted web. Unlike the django-on...
Simulating complex real-world systems is now possible with SimPy , an open source simulation package. SimPy, originally developed by the authors of this article, has been developed to production quality by a small team of enthusiastic open sourcerers around the world. As far as we know, it is the only existing discrete...
#7001 Le 08/02/2013, à 08:52 Grünt Re : Topic des Couche-Tard (cinquante-sept) Ben oui, Shanx. Transformer du MP3 en FLAC donne un fichier plus gros, au son identique. Red flashing lights. I bet they mean something. Hors ligne #7002 Le 08/02/2013, à 08:56 PPdM Re : Topic des Couche-Tard (cinquante-sept) The Uploader a ...
I'm a newbie in Tornado. And I begin my learning with “Hello World" code like this: import tornado.ioloop import tornado.web import tornado.httpserver class HelloHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world!") application = tornado.web.Application([ (r"/", HelloHandler)...
Hagar de l'Est [How-To] Installer OpenOffice.org avec les RPMs officiels Si vous n'avez pas la patience d'attendre que les dépôts soient mis à jour pour installer la dernière version d'OOo, voici la méthode manuelle à partir des RPMs officiels. NB: avant d'installer, si vous avez modifié la configuration des dictionnai...
wooper77 Réponses : 1 Bonsoir, Je pense rencontrer plusieurs problèmes avec ma carte graphique. Pour l'instant il y en a deux apparants, mais qui sont déjà trop génant. Le premier : je ne peux pas lire de vidéo en pleine écran sur YouTube. Le deuxième : Minecraft ne se lance pas les deux problèmes sont lié je le pense ...
Babdu89 Re : HY-D-V1 un nouveau Desktop Bonjour... Alors, comme j'ai toujours du temps, de la place sur mes hdd, et de la suite dans les idées ... Toujours au sujet de la tentative d'Hybrydiser la Cubuntu 13.04 32 bits ... Voir post ci-dessus . J'ai réinstallé, j'ai fais les maj système en commande, j'ai été obligé d'i...
grandtoubab Re : La mise a jour clamAV et clamtk Salut Pour que ça se mette à jour automatiquement, on crée une nouvelle tâche quotidienne: @ubuntu-desktop:~$ sudo gedit /etc/cron.daily/clamav on y mets les lignes suivantes: #!/bin/sh /usr/bin/freshclam >> /var/log/resul_freshclam.txt on mets les droits d'exécution: ...
The only way I can find would require you to write a bit of Python code. This is the site that provides a module for Pythonhttp://code.google.com/p/pygooglevoice/ This page gives you details on how to set a message to read. Look for the Mark function under the Message section.sphinxdoc. github.com/pygooglevoice/api.htm...
gtk.GenericTreeModel — a TreeView model that helps create tree models in Python class gtk.GenericTreeModel(gobject.GObject, gtk.TreeModel): gtk.GenericTreeModel() def invalidate_iters() def iter_is_valid(iter) def get_user_data(iter) def create_tree_iter(user_data) The gtk.GenericTreeModel helps in...
My new buildbot I've added some buildbot instances on various architectures to my new buildbot at http://perl514.cpanel.net/build/. I needed about a day to set it up. Tested projects are so far: perl5, rakudo, nqp, parrot and p2. The buildslaves are currently: centos5 (old system), cygwin, cygwin64, darwin (my macbook ...
I have a post model and a postImage model: class PostImage(models.Model): post = models.ForeignKey(Post, related_name="images") # @@@@ figure out a way to have image folders per user... image = models.ImageField(upload_to='images') description = models.CharField(max_length=100) order = models.Integ...
I am a bit confused about multiproessing feature of mod_wsgi and about a general design of WSGI applications that would be executed on WSGI servers with multiprocessing ability. Consider the following directive: WSGIDaemonProcess example processes=5 threads=1 If I understand correctly, mod_wsgi will spawn 5 Python (e....
Question 1: Restrict to certain characters You are right, this is easy to solve with regular expressions: import re input_str = raw_input("Please provide some info: ") if not re.match("^[a-z]*$", input_str): print "Error! Only letters a-z allowed!" sys.exit() Question 2: Restrict to certain length As Tim menti...
I have a view function which needs to be manually transaction managed, but when I apply the @transaction.commit_manually decorator, django ALWAYS raises the below exception. As you can see from the code trace below, the transaction is committed right before return from the view. I am using sqlite, both on windows and l...
All web frameworks need to generate HTML pages so they all include a template language to describe the content of these pages. The template language describes how to render data (in the form of XML or a Python dictionary for example) into HTML. All template languages consist of HTML text embedding code delimited by spe...
Prologue Today I'd like to talk about the use of regular expressions to parseand modify HTML. Or rather, the misuse. I'm going to try to convince you that it's a very bad idea to useregexes for HTML. And I'm going to introduce you toNokogiri, my newbest friend and life companion, who can do this job way better, andnear...
Python Classes To create your own custom objects, you must define a sort of template, or cookie cutter, called a class. You do so in Python using the class statement, followed by the name of the class and a colon. Following this, the body of the class definition contains the properties and methods that will be availabl...
this is an example of truly redundant data. the paths are documented. they don't need to be included in the results. "user_questions_url": "/users/22656/questions", "user_answers_url": "/users/22656/answers", "user_favorites_url": "/users/22656/favorites", "user_tags_url": "/users/22656/tags", "user_badges_...
mao-40 Re : TBI + wiimote + ubuntu En ce qui concerne 'gtkwhiteboard.ico', ce n'est pas l'image de calibration je pense, puisque le logiciel demande de calibrer l'écran avec les 4 coins du bureau et après cela fonctionne bien. Ah ok, j'essaierai au demain au vidéo-projcteur. Dernière modification par mao-40 (Le 04/02/2...
htmlEncodeStringReplacement JavaScript performance comparison Info Compiled regexes. Preparation code <script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>   <script> Benchmark.prototype.setup = function() {     var html = document.body.innerHTML;     var map = {       "&": "&amp;",       "'"...
Sorry for the lousy summary. this code: thumbContent = thumbContent + '<a href="javascript:viewPic('+ contact[i].ThumbnailUrl + ', ' + contact[i].Name + ', ' + contact[i].Description+ ')" ><img src="'+contact[i].ThumbnailUrl+'" border="0" width="134" height="78" /></a>'; outputs this: <a href="javascript:viewTruck(http...
MEH-TECH Re : [Support] Team Fortress 2 Je me disais aussi que c’était du pipo... Je me connecterai dans la soirée alors pour le récupérer Merci Hors ligne MEH-TECH Re : [Support] Team Fortress 2 C'est bon je l'ai reçu Hors ligne kurapika29 Re : [Support] Team Fortress 2 Bien le bonjour, chez moi depuis le début TF2 es...
nad paquets casée Bonjour, je comprend pas dans le gestionnaire de paquet quand je veut faire une mise a jours il me dise de corrigee d'abord les paquets casser. je vois pas il sont ou les paquets casser, si vous pouriez m'aider sa serait super merci cette erreur et arriver apres que j'ai modifier le fichier source.lis...
I have scripts calling other script files but I need to get the filepath of the file that is currently running within the process. For example, let's say I have three files. Using execfile, script_1.py calls script_2.py. In turn, script_2.py calls script_3.py. How can I get the file name and path of script_3.py *from c...
Module: ActiveRecord::FinderMethods Included in: Defined in: activerecord/lib/active_record/relation/finder_methods.rb Constant Summary ONE_AS_ONE = '1 AS one' Instance Method Summary (collapse) - (Boolean) exists?(conditions = :none) Returns trueif a record exists in the table that matches theidor conditions given, or...
I have an Atom feed generator for my blog, which runs on AppEngine/Python. I use the Django 1.2 template engine to construct the feed. My template looks like this: <?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en" xml:base="http://www.example.org"> <id>urn:uuid...
#0 Re : -1 » Dell XPS 13 » Le 29/03/2013, à 13:40 Nicky_rr Réponses : 18 Ouais enfin si ça n'a pas changé l'admission se fait sur dossier plus entretien mais il faut quand même passer le premier barrage... et effectivement il vaut mieux être dans la tête de son IUT qu'au milieu pour y avoir accès et avec à peine la moy...
Perhaps someone more fluent in Python's Multiprocessing Pool code could help me out. I am trying to connect to several hosts on my network simultaneously (N at any one time) over a socket connection and execute some RPC's. As one host finishes, I want to add the next host into the Pool to run until all are complete. I ...
I copied and pasted this binary data out of sql server, which I am unable to query at this time. 0xBAC893CAB8B7FE03C927417A2A3F6A60BD30FF35E250011CB25507EBFCD5223B How do I convert it back to a byte array in c#? Something like this: using System; public static class Parser { static void Main() { str...
I've been trying to find a more pythonic way of generating random string in python that can scale as well. Typically, I see something similar to ''.join(random.choice(string.letters) for i in xrange(len)) It sucks if you want to generate long string. I've been thinking about random.getrandombits for a while, and figur...
I do my apologizes for the dummy question, but i'm experiencing a weird problem with a simple script that seems correct but doesnt' works as expected #!/usr/bin/python import json,sys obj=json.load(sys.stdin) oem=obj["_id"] models = obj.get("modelli", 0) if models != 0: for marca in obj["modelli"]: ...
I'm trying to develop a panel plugin based on the sample provided, but am having trouble when I need to use GDK-supplied functions. I've added the following to configure.ac.in: XDT_CHECK_PACKAGE([GDK], [gdk-2.0], [2.0]) and in my Makefile.am I use the resulting settings: libcardapio_la_LIBADD = \ $(LIBXFCE4UTIL_LIBS) \...
Possible Duplicate: How to clone a Python generator object? Suppose I have a generator 'stuff_to_try', I can try them one by one but if I had a method that wanted to go through the generator and that method is recursive, I want to let each recursion get a fresh new generator that starts at the first yield rather than w...
Python has an identity crisis sometimes. It starts with the premise, from Guido’s prior work on ABC, to make a simple but easy to understand language. But then turns around and cries out “one way to do it“, leaving the programmer perplexed as to how Guido van Rossum thought we should do things. For example, Guido hates...
use the following search parameters to narrow your results: e.g. subreddit:aww site:imgur.com dog subreddit:aww site:imgur.com dog see the search faq for details. advanced search: by author, subreddit... ~16 users here now News and links for Django developers. Refresh model objects from database (self.django) submitted...
I have two problems: Button 'Today' does not work because the calendar is not initialized with the selected value, and initialize the current month. I need override onclick for button 'Done' - how do this? script: $('.datefield_month').datepicker({ changeMonth: true, changeYear: true, ...
想法 利用marshal把python bytecode轉成string, 就可以pickled. 把Function轉成Pickled string 1 2 3 4 5 6 7 8 import pickle import marshal maintask_bytecode = marshal.dumps(maintask_callback.func_code) output = { 'maintask_bytecode': maintask_bytecode, 'maintask_defaults': maintask_defaults, 'maintask_args': maintask_args} print p...
The notion of "level" is somewhat unclear here. It sounds like you mean you don't want the geometry in your "level" file, only where objects are located. A more clear term for what I'm talking about is "placement editor" (ie. use Blender to place objects around the scene) I've written a script to do that using Python, ...
i have a drop down list that i add items to it,i ask the user to type in brand name and check first if that brand is already found on the drop down list if yes prints a message if no do some actions. here is the code: def add_brand(self,x): self.elem=self.driver.find_element_by_id('MainContent_txtBrand') self...
doudoulolita Faire une animation sur la création de jeux vidéo libres Dans le topic Création de jeu vidéo libre - Appel à candidatures, j'ai découvert le créateur de jeu de Ultimate Smash Friends, Tshirtman. Voici ce que je lui ai écrit: Je cherche un jeu que notre Espace Public Numérique pourrait proposer aux jeunes s...
Python newbie needing help with a simple task. I'm trying to create a list of stand-alone tables in an sde workspace. Code below works just fine to list feature class names and paths and table names. fcList = gp.ListFeatureClasses() for fc in fcList: descFC = gp.Describe(fc) print "FC Name: " + fc + ", Path: " ...
#0 Re : -1 » Dolphin dans Gnome par defaut » Le 15/04/2014, à 04:35 Pierre Thibault Réponses : 40 Ici ma solution. Il faut d'abord créer le fichier dolphin.desktop dans /usr/share/applications Voici mon fichier dolphin.desktop: [Desktop Entry] Name=Dolphin Comment=Access and organize files Comment[ar]=ﻦﻈﻣ ﺎﻠﻤﻠﻓﺎﺗ ﻮﺼِﻟ...
Your problem is actually Eclipse. Assuming that you use PyDev, I was able to reproduce the problem. When entering something in the Eclipse console, the problem occurs as described in your question. But when directly executing the very same script with the Python 3.1.1 interpreter, inputted does not include a newline ch...
Generating Graphics With Piddle by Michal Wallace 05/31/2001 You probably know by now that Python's flexible data structures make working with complex data a breeze. Did you know Python also makes it a snap to visualize your data in vibrant color? Thanks to the slew of graphics modules people have built, Python is a ha...
XML-RPC in Python by Dave Warner 11/22/2000 The Internet, with its simple protocol and ubiquity, has opened up huge opportunities for programs to communicate between computers, a task that always seemed complex and daunting in the past. Now there is a new dilemma. Which framework should you use for automating communica...
Is there a UI library to create a message box or input box in python? Your best bet is the tkMessageBox module, which should work on all systems (as Python will typically come with Tkinter). If you can restrict yourself to a specific operating system, better choices might be available. Simple message boxes and input bo...
» Scripting Gedit + Gedit allows you to write python scripts which interface with its backend (and frontend via pygtk). This is very cool, for reasons obvious to VIM and Emacs users. You can write your own plugins to manipulate the document you are editing in many useful ways. Well I was using various external tools to...
I'm using matplotlib to generate many plots of the results of a numerical simulation. The plots are used as frames in a video, and so I'm generating many of them by repeatedly calling a function similar to this one: from pylab import * def plot_density(filename,i,t,psi_Na): figure(figsize=(8,6)) imshow(abs(ps...
My monitor is sort of finicky. Sometimes I run a program that cycles through resolutions and the monitor will refuse to give its EDID information for a few days: (/var/log/Xorg.0.log) [ 239.653] (II) fglrx(0): Restoring Recent Mode via PCS is not supported in RANDR 1.2 capable environments [ 260.113] (II) fglrx(0):...
Is there a way to interpolate (IDW) while providing clipping geometry? My objective is that I want to interpolate temperature data but I do not want it to interpolate the entire extent of the point file but rather fit the output to the extent of a particular polygon. Thanks. go to arctoolbox => 3d analyst tools => IDW ...
I've been trying to figure out why this query (on integers) is using an index scan when both values (the original table, and the table its looking up in) are integers. The first part is used to fill a table with values. The second part is the search query that I'm battling with. If you run the execution plan on the que...
Jython is Python for Java - are you sure this is what you want? I have answered this for "normal" Python for Windows, I assume this is what you are after. To use Python under Windows, you need to install the Windows binary installer, which you can download from the Python download page. Make sure you choose the binary ...
For this to work you will need the Jquery form plugin http://jquery.malsup.com/form/ At the top of web2py_ajax.html add ... response.files.insert(3,URL(r=request,c='static/js',f='jquery.form.js')) ... at the bottom of web2py_ajax.html replace with the following code ... function web2py_trap_form(action,target) { jQ...
chaoswizard Re : TVDownloader: télécharger les médias du net ! Bonsoir, Non ce n'est pas possible, RtmpDump (et je suppose Flvstreamer) n'arrive pas à parser l'URL si elle n'est pas découpée. J'avais étudié ce problème en mettant au point Arte Live Web pour TVO. Bon courage pour votre projet Je viens pourtant de tester...
I am trying to numerically integrate an arbitrary (known when I code) function in my program using numerical integration methods. I am using Python 2.5.2 along with SciPy's numerical integration package. In order to get a feel for it, i decided to try integrating sin(x) and observed this behavior- >>> from math import ...
I'm using this cookbook recipe to encode images in a multipart form data to upload to Twitter. When I run the code to pack the image in a django shell everything runs fine (even the print statements that I used to debug the post body with binary data) but when I try to run the same script from a django Command or a muc...
The easiest way that I have found was to do something along the lines of: el = driver.find_element_by_id('id_of_select') for option in el.find_elements_by_tag_name('option'): if option.text == 'The Options I Am Looking For': option.click() # select() in earlier versions of webdriver break This may ...