text
stringlengths
256
65.5k
I'm trying to open a .txt file with Python. I'm trying to fill a Tkinter text widget with the files contents. However with the following snippet, when I try to open the files contents and put it in a the text widget self.Te, nothing happens. Any clues? Snippet: self.Open = tkFileDialog.askopenfilename(initialdir='C:') ...
I am fairly new in Python so this might be a noob question to some. I am DEVing in Python 3.0 I keep on encountering an error: File "scan.py", line 7, in module json = postfile.post_multipart(host,selector,fields,files) File "C:\Python32\lib\postfile.py", line 10, in post_multipart content_type, body = encode_m...
I already know there is several questions targeting this theme, but none of them solved my specific problem. Or at least I could not find it. I need to execute some program in background, wait for output and manipulate it. But the background program must keep executing. The info from the background program that I need ...
I know of the non-standard %uxxxx scheme but that doesn't seem like a wise choice since the scheme has been rejected by the W3C. Some interesting examples: The heart character. If I type this into my browser: http://www.google.com/search?q=♥ Then copy and paste it, I see this URL http://www.google.com/search?q=%E2%9...
Given this form: form = SQLFORM.factory( Field('name'), Field('created','date'), Field('owner'), Field('cat',requires=IS_IN_SET(range(0,6)))) This will produce these form elements: <input type="text" value="" name="name" id...
I'm trying to create mail with py-appscript (AppleScript interface for python). I tried following code, from appscript import * mail = app('Mail') msg = mail.make(new=k.outgoing_message, with_properties={'visible':True, 'content':"hello", ...
My code below kinda works, it creates the User object and saves but it doesn't save the password: class CreateUserResource(ModelResource): class Meta: allowed_methods = ['post'] object_class = User authentication = Authentication() authorization = Authorization() include_reso...
Gaara barre de progression sur notification en root [finalisé] Bonjour, J'essaie de me faire un petit script qui me prévient avec une notification quand mes mises à jours sont effectuées, en utilisant unattended-upgrades. J'ai réussi à le faire fonctionner avec yad, mais c'est pas très joli. Je voudrais donc utiliser n...
By designing a GUI for my python script which works with PySerial for implementing some serial interface functions I want to have shown up some parameters reading out a source. So this GUI for example has to show the actual voltage which is represented by the parameter volt_act. I thought that I can connect the QLCDNum...
I have set import matplotlib as mpl AXES_COLOR = '#333333' mpl.rc('axes', edgecolor=AXES_COLOR, labelcolor=AXES_COLOR, grid=True) mpl.rc('xtick', color=AXES_COLOR) mpl.rc('ytick', color=AXES_COLOR) mpl.rc('grid', color=AXES_COLOR) The color of the axes labels and the ticks are properly set both in 2D and in 3D. Howeve...
gtk.TreeModel — the tree interface used by gtk.TreeView class gtk.TreeModel(gobject.GInterface): def get_flags() def get_n_columns() def get_column_type(index) def get_iter(path) def get_iter_from_string(path_string) def get_string_from_iter(iter) def get_iter_root() def get_iter_first()...
I'm seemingly unable to deserialize my MongoDB JSON document with the BSON json_util. The json.loads function is choking on the ObjectId() string. I had understood json_util capable of handling MongoDB's ObjectId format and transforming into usable JSON. Python code: import json from bson import json_util s = "{u'_...
Bionet [Résolu] configurer modem interne ISDN RNIS Numeris Bonjour, tout d'abord je voulais préciser que je suis à Mayotte (île aux moyens de communication préhistoriques où l'on se connectes en bas débit 56K ou en Numéris 64K). Alors voilà, j'ai un modem interne ISDN (RNIS, NUMERIS) qui fonctionne très bien sous Windo...
It's just cleaner and a good practice when dealing with a lot of stuff. I ran into this a few weeks ago I was using gevent spawn to verify a bunch of emails against DNS on the order of 30k :). from gevent.pool import Pool import logging rows = [ ... a large list of stuff ...] CONCURRENCY = 200 # run 200 greenlets at on...
PREV CLASS NEXT CLASS FRAMES NO FRAMES SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD public interfaceOngoingStubbing<T> Simply put: "When the x method is called then return y". E.g: when(mock.someMethod()).thenReturn(10); //you can use flexible argument matchers, e.g: when(mock.someMethod(...
smo Re : logiciel creation/remasterisation/clonage de distributions base ubuntu je viens d ajouter quetzal i386 je telecharge pour tester je maj le git apres si ok ... (pas d raisons..) ht5streamer, streaming youtube/dailymotion...: http://forum.ubuntu-fr.org/viewtopic.php?id=1299461 / http://ht5streamer.free.fr ubukey...
Here is an example of a complete app: This function does the computation, here it just sleeps for 5 secs def background(): import time time.sleep(5) return "computation result" # this could an image, HTML, JSON, etc... This is the page accessed by the user. The computation is called by an ajax call and exe...
I want to use Python to send commands to an EV3 brick. In C++ things work as expected - for instance, this starts the motor on port A and then stops it after a while: #include <unistd.h> #include <fcntl.h> int main() { // command to start motor on port A at speed 20 char start_motor[] = "\x0C\x00\x00\x00\x80\x0...
Ludum Dare 30 This weekend I took part in Ludum Dare, the build-a-game-in-48-hours competition. The theme this time was Connected Worlds. I had an idea fairly early on - Scientist (Rodney) accidently opens a portal to another world, gets stuck and has to try to find his way home. Definitely not original, but it was a s...
How to Set Up and Monitor a Multi-Node Cassandra Cluster on Linux With a long and brutal background of setting up Oracle RAC clusters and various other MPP database systems, I was enormously pleased with how easy it is to set up and monitor a multi-node Apache Cassandra cluster. In this article, I’ll walk you through t...
I've seen a quite a few questions on the Project Euler and other places asking how to time the execution of their solutions. Sometimes the given answers are somewhat kludgey - i.e., adding timing code to __main__, so I thought I'd share my solution. Python includes a profiler called cProfile. It not only gives the tota...
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...
I'm a complete noob to HTML. I had to look up "tags" and "class" before I wrote this. I'm aware that urllib2 is the default for this sort of thing now, but I couldn't get my header to work with it properly (otherwise you get a 403 access denied error), so I used requests instead. import requests from bs4 import Beautif...
There is a nice website screenshots.com that hosts historic screenshots for many websites. This post will show how to generate our own historic screenshots with python. $ sudo apt-get install python-qt4 $ sudo pip install webscraping The source of historic webpages will be the Wayback Machine, which has been caching w...
I was recently working on one small tool for Midgard Project, and had to deal with a new framework: PyGI. Strictly speaking, it’s not “totally new”, but it is: a) new for me b) just starts to get attention from application developers. PyGI is a project, which implements dynamic bindings to GObject based libraries for P...
I'm using django_webtest to test my application. I faced with problem when try to test sign-up page. This page should create user and make other initial actions, authenticate newly created user and redirect it to the page specified in next parameter of GET request. Here is the code of view method: def _redirect_path(re...
nesthib [JEU] challenge bash #6 Espaçeur de paragraphes Imaginons un texte, celui-ci est composé de différents paragraphes. La plupart du temps un paragraphe sera coupé en deux à la fin d'une page. Le but de ce challenge est de réaliser un script qui formate le texte de façon à ce qu'un paragraphe ne soit jamais coupé ...
nknico Un nouveau dépôt officiel pour Ubuntu (logiciels commerciaux) Un nouveau dépot officiel vient d'ouvrir. Il contient des logiciels commerciaux. Pour l'instant Opéra et Realplayer sont disponibles. En gros, pour l'installer, il faut: * Activer les mises a jour de dapper * Mettre a jour sa dapper :-) * Via gnome-ap...
I am trying to write a small audio player in PyQt4. This is a part of the code I've written: class Player(QMainWindow): def __init__(self, fileLoc, parent = None): super(QMainWindow, self).__init__() self.totTime = 0 self.audioOutput = Phonon.AudioOutput(Phonon.MusicCategory, self) s...
I am creating many figures for my LaTeX document using matplotlib with 'text.usetex': True. My full preamble looks like this: rc('font', **{'family':'serif', 'serif':['Computer Modern Roman']}) params = {'backend': 'pdf', 'axes.labelsize': 12, 'text.fontsize': 12, 'legend.fontsize': 12, ...
Single-threaded use appears to work: $ echo 'int main(void) { int *a; a[10]=0; return a[5]; }' | ↩ gcc -o a -fmudflap -x c - -lmudflap $ ./a ******* mudflap violation 1 (check/write): time=1227208721.922064 ptr=0x1023de0 size=4 pc=0x1037a33 location=`<stdin>:1:26 (main)' /usr/lib/libmudflap.so.0(__mf_check+0x33...
sefiane [résolu] Logithèque / Synaptic Salut ! J'ai besoin de votre aide S.V.P ! Je suis débutant dans Linux , j'ai la version 12.O4 ATS. Il fonctionnait très bien sans problème, une fois additionner Synaptic, Logithèque ne voulait pas répondre ! Il plantait, lorsque je fermais, une fenêtre apparaît, " logithèque ne ré...
I am working with WARC Tools, a python library for working with WARC files. I've installed everything and it all seems to work except for the last command. While I suspect many of you may not have worked with this tool, perhaps you can make sense of the error message for me. When I run this command: python /path/filesd...
Overview Info Domain Nameentekhab.ir Favicon Alexa Rank#2796 Google Page Rank Ip Address94.182.146.40 Page Size156.9 KB Images312 GIF, 62 JPG, 0 PNG Heading H1 H2 H3 H4 H5 H6 0 0 0 0 0 0 DNS Analysis DNS servers ns1.iransamaneh.com [94.182.146.2] ns2.iransamaneh.com [94.182.130.2] DNS Records Answer records entekhab.ir...
I've been trying to get scribus to work on my new gentoo 12.1 (amd64, XFCE, qt 4.8.2) installation, but when running as a regular user the program won't start up. Thanks to suggestions and extra tests below I've narrowed it down to a problem with .ICEauthority, when I move the file (or start Scribus as root, sho doesn'...
I'm looking for an efficient way to calculate the rank vector of a list in Python, similar to R's rank function. In a simple list with no ties between the elements, element i of the rank vector of a list l should be x if and only if l[i] is the x-th element in the sorted list. This is simple so far, the following code ...
No Relation To Blog Subscribe to the personal musing of Emmanuel Bernard Ever wanted a commit was actually made of two? Read on. There are several reasons why you could wish a commit was actually made of several distinct ones: because it makes the history more readable because you are trying to reorder some commits and...
Is it possible to do array broadcasting in numpy with parameters that are vectors? For example, I know that I can do this def bernoulli_fraction_to_logodds(fraction): if fraction == 1.0: return inf return log(fraction / (1 - fraction)) bernoulli_fraction_to_logodds = numpy.frompyfunc(bernoulli_fraction_...
bertrand47 [Résolu] Duplicate sources list J'ai depuis quelques jours une erreur "duplicate sources list", visiblement du à un doublon i386 et amd64. J'ai une installation amd64. W: Duplicate sources.list entry http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages (/var/lib/apt/lists/security.ubuntu.c...
Here's my code and I simply cannot figure out why my top level window doesn't become transparent. xwininfo says that windows has 32 Bit depth. I am running Ubuntu 11.10 and if I call .set_opacity(.5) on the window itself, it will become transparent. But all the content of the window too. I'd like a transparent backgrou...
I was solving the Find the min problem on facebook hackercup using python, my code works fine for sample inputs but for large inputs(10^9) it is taking hours to complete. So, is it possible that the solution of that problem can't be computed within 6 minutes using python? Or may be my approaches are too bad? Problem st...
I am using ubuntu with libreOffice. I have installed unoconv for convert a *.odp file to *.pdf. When i run the command unoconv -f pdf myfile.odp from terminal then it works very fine. I want to do the same thing with using PHP shell_exec() method. So, I wrote the following code: $output = shell_exec('unoconv -f pdf tes...
Here is a simple HTTP crawler I wrote with python Twsited #!/usr/bin/env python # -*- coding: utf-8 -*- from twisted.web.client import getPage from twisted.python.util import println from BeautifulSoup import BeautifulSoup from twisted.python import log from twisted.internet import defer, task import re # Needs : PyOpe...
Pythonic Parsing Programs The Cover Your Bases Answer The simplest solution to parsing is to parse a file-like object. Again for the newbies, I say file-like because Python has duck typing. According to Wikipedia this term, duck typing, comes from the saying of an old poet—James Whitcomb Riley: When I see a bird that w...
select to_char(SYSDATE, 'MONTH') as "CURRINT MONTH" from dual ; select count(PERSON_ID) as TOTAL_Nsaudi from company_person_all where ( company_person_all.employee_status = 'Active' ) and ( company_person_all.citizenship != 'SAUDI ARABIA' ) ; select count(PERSON_ID) as TOTAL_Saudi from company_per...
vince06fr Re : Nettoyage dans les noyaux (kernel) Umuntu : Si tu veux prendre le temps de traduire ce script, surtout ne te gêne pas comme tout est "hardcodé" dans le script, la seule chose à faire est... De modifier l'ensemble des textes en français présents dans le script pour les mettre en anglais. Une fois le scrip...
Hey guys, First of all, thanks for the 4.4 release! Very, very cool. I grabbed the installer package from the site and everything went smoothly during compilation and install. I have not changed anything; I simply installed and restarted X. Also, I should add this is a brand new, fresh install of Slackware 11.0. The on...
I'm attempting to have inherited class templates, so that all my models have certain default fields, and all have default overrides for a few functions like save_model() If I do it like this, I get the overrides, but then have to go and manually set meta data like db_table... class ModelExtension(models.Model): alt...
How do I create a GUID in Python that is platform independent? I hear there is a method using ActivePython on Windows but it's Windows only because it uses COM. Is there a method using plain Python? "The uuid module, in Python 2.5 and up, provides RFC compliant UUID generation. See the module docs and the RFC for detai...
Today I opened a python module that made me feel sad. It has two classes: one of them has 4 methods, all of them static, and no attributes; the other has only one method: __init__, and 5 attributes. Why people still write classes like these? Use functions ...instead of classes with just static methods. If you have this...
I am getting an error on my theme options page while trying to use the built-in media upload. The error is “Cheatin ‘uh” Any idea how to fix this? I bet You are using SMOF ;} open medialibrary-uploader.php, delete everything and paste: If You were curious this line was added to the beginning of file: add_action( 'init'...
Once in a while I need to install a new Ubuntu (I used it both for desktop and servers) and I always forget a couple of libraries I should have installed before compiling, meaning I have to recompile, and it's getting annoying. So now I want to make a complete list of all library packages to install before compiling Py...
It seems gae assigns very high IDs to the models. When I download my entities, I get for some entries very big numbers. These were autogenerated in first place. Downloading them as csv is no problem. But deleting the existing data and re-uploading the same data throws an exception. Exceeded maximum allocated IDs Trace:...
In desperate need to organize my collection of scientific papers, I had a look at various tools which could help me organizing them. Probably one of the best out there is Mendeley. Mendeley seems to be a very good tool to keep your massive collection of pdfs under control. Unfortunately a very basic function, namely lo...
Hizoka encore du sed et awk Bonjour ! Je viens vers vous pour demander un peu d'aide... Voici un exemple de fichier sur lequel je travaille : poupou (0.0.1~ppa1~precise) precise; urgency=low () * blublu de bugs * blabla -- Belleguic Terence <hizo@free.fr> Fri, 12 Oct 2012 06:39:46 +0200 poupou (0.0.0~ppa1~precise...
kr2sis configauration de Apache --- help please !!! bonjour autre souci que j'ai négligé par nécessité (il a fallu s'occuper du lourd avant de faire le léger...) : apache je ne sais pas si c'est moi qui comprends rien, mais meme en cherchant partout, je ne trouve pas de tuto qui veuille que je réussisse une bonne confi...
I've spent a lot of time on this and it's clearly beyond my newbie understanding/skills. I tried to install django-heroku-memcacheify with pip install, which throws errors. I tracked the problem down to pylibmc, which is causing all the problems. Here's one of the interesting parts of the error log: _pylibmcmodule.h:42...
Advanced Hard Drive Caching Techniques RapidDisk and RapidCache Currently at version 2.9, RapidDisk is an advanced Linux RAM disk whose features include the capabilities to allocate RAM dynamically as a block device, use it as standalone disk drives, or even map it as caching nodes to slower local disk drives via Rapid...
Last Monday we launched an update to our Capitol Words project, which indexes and tokenizes the Congressional Record daily. With the launch behind us and the dust starting to settle, I'd like to walk through how we get from raw text to attributed, searchable quotations, and provide some examples of how you can interact...
Python in the Cloud A basic introduction to using the Python boto library to interact with AWS services and resources. This article explores using the boto library to work with resources in the Amazon Web Services (AWS) cloud. For those wondering, the boto name refers to a species of freshwater dolphin found in the Ama...
I'm following a web.py tutorial that is using the web.py form module. Basically, this little app creates a form consisting of a text box, does some validation to make sure it's a number and that it's greater than 10, and decides if that number was odd or even. I'll post the code before the question as it'll be easier t...
If I have a django model with django fields and some properties called by property() function, can tastypie interact with this virtual fields? Or I have to include logic into tastypie's dehydrate, obj_create, obj_update function? Model: class A (models.Model): x = models.CharField() def get_y(self): ret...
Is there something more simple we could try first? Should we compare the secrets? 'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.' 'God exists because Mathematics is consistent, and the devil exists because we cannot prove it' 'Humanity is still kept in...
cledesol Re : [Conky] Alternative à weather.com ( icones conkyforecast ) Merci de cette précision. C'est vrai aussi qu'en général c'est le soir que je me loggue sur mon PC .... Donc, la météo du jour ... je l'ai vue en réel CM : Asus M4A88TD-M µ : AMD Phenom II X6 1055T / RAM 4 Go Video : EVGA GeForce GTS450 1Go - Ubun...
HappyColibris [Résolu] Le téléchargement des infos du dépôt a échoué 404 Not Found Bonjour à tous, Depuis quelques jours, j'ai un souci au niveau de la mise à jour. En passant par le gestionnaire de mise à jour, j'ai : "Le téléchargement des informations du dépôt a échoué" : W:Failed to fetch http://ppa.launchpad.net/p...
Vicks openoffice et accents circonflexes... Bonjour à tous, J'ai un gros problème avec les acents circonflexes que je ne peux pas utiliser lorsque je suis sous openoffice. Cependant, sur le reste de ma config il n'y a aucun problème... Merci beaucoup de votre aide... @+ Vicks Hors ligne Vicks Re : openoffice et accents...
In Python 2.6 and earlier, the dict constructor can receive an iterable of key/value pairs: d = dict((key, value) for (key, value) in iterable) From Python 2.7 and 3 onwards, you can just use the dict comprehension syntax directly: d = {key: value for (key, value) in iterable} Of course, you can use the iterable in a...
languages wernaeh at April 26th, 2010 19:00 — #1 Hello everyone Recently, I've been having quite some performance problem with using a large (\~\~500 MB) std::vector\, which is repeatedly getting resized, cleared, and dropped in a tight loop. Weirdly, the problem comes from the STL that accompanies Visual Studio 2008. ...
AnsuzPeorth Re : [Gm9diaCenter] Interface graphique pour mediacenter neuf/sfr Re, La suppression des logs se fait au démarrage de l'appli, pas du mediacenter ! (en tout cas chez moi ça marche). Pour le systray, je t'ai ajouté une petit image clicable gnome J'ai ajouté la possibilité de créer/supprimer les lanceurs depu...
peterp@n Re : Logiciel de CAO 2D/3D (Conception Mecanique) Cool, ca se paufine bien tout ça. C'est avec quelle versions exactement la vidéo ? Ubuntu 12.04 64bits, Raspbian “wheezy”, Tango Studio sauce debian Un bureau d'études techniques pour le bâtiment avec des logiciels libre. Entreprise de construction bois. - Form...
Apologies for not being familiar with formatting on here...I've made some progress thanks to helpful replies and edited and removed my original question to be replaced by the current one. My problem lies with converting a C struct or struct pointer to PyObject. There is no alternative to this because I am wrapping an e...
I'm working on a comic book database and there are main covers and variant covers. I have a page that shows all the Main covers, but I'd like to combine the variant covers too, in order of the publication date. This is what part of my models look like: class Image(models.Model): CATEGORY_CHOICES = ( ('Cover', '...
Can you please give me a simple, and straightforward python example of sending an HTML e-mail using App Engine? Plaintext is straightforward, but I'm having difficulties with HTML tags. I haven't tested this, so please forgive any little bugs. It's based on an example from the Google documentation: http://code.google.c...
I'am using Python 2.5 on App Engine and tried to get the Jinja2 ModuleLoader to work. To initialize the environment I use : @staticmethod # get Jinja environment (global) def get_new(): # and initialize Jinja environment...
Cooking with Python, Part 2 Pages: 1, 2 Recipe 18.10: Computing Prime Numbers Credit: David Eppstein, Tim Peters, Alex Martelli, Wim Stolker, Kazuo Moriwaka, Hallvard Furuseth, Pierre Denis, Tobias Klausmann, David Lees, Raymond Hettinger Problem You need to compute an unbounded sequence of all primes, or the list of a...
This post was originally intended to be part of my guest series on cryptography at a friends blog, but I haven’t had word from him about it for a while. So, it’s mine now :P The strength of a password is usually based on the idea that an attacker will have to guess the password by trying lots of different possibilities...
Where does the CherryPy server write its error logs to? I have installed CherryPy and fired up the server with python3.2 from cherrypy import wsgiserver def my_crazy_app(environ, start_response): status = '200 OK' response_headers = [("Content-type","text/plain")] start_response(status, resp...
Some of what I am going to write may be a little too much for a 9 year old, but if he was able to produce such neat, structured code on his own, he should be ready for some further challenge. So to make things less repetitive, all you have to do is figure out how to make what appears different to share a common framewo...
What you /could/ do (I haven't dug into the logging module too much so there may be a better way to do this) is maybe use a stream rather than a file object: In [1]: class LogHandler(object): ...: def write(self, msg): ...: print 'a :%s' % msg ...: print 'b :%s' % msg ...: In [3...
Suppose you have a numpy array and a list: >>> a = np.array([1,2,2,1]).reshape(2,2) >>> a array([[1, 2], [2, 1]]) >>> b = [0, 10] I'd like to replace values in an array, so that 1 is replaced by 0, and 2 by 10. I found a similar problem here - http://mail.python.org/pipermail//tutor/2011-September/085392.html B...
I'm trying to learn the blobstore API... and I'm able to successfully upload files and get them back, but I'm not having any luck trying to combine an upload form with a regular webform to be able to associated extra info with the file, such as a nickname for the file. Below is the code for a simple app I've been playi...
I am trying to download some data from the datastore using the following command: appcfg.py download_data --config_file=bulkloader.yaml --application=myappname --kind=mykindname --filename=myappname_mykindname.csv --url=http://myappname.appspot.com/_ah/remote_api When I...
I'm trying to install Ubuntu 12.10 alongside Windows 7 on my ASUS laptop and I'm new to all of this. I'm using the Ubuntu 12.10 64-bit ISO burned onto a CD. The first time I tried to install it, Ubuntu said it did not detect any other OS, which meant I only had 4 options: Erase disk and install Ubuntu (I don't want to ...
Module languages source code | This file is part of the web2py Web Framework | Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> | License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) | Plural subsystem is created by Vladyslav Kozlovskyy (Ukraine) <dbdevelop@gmail.com> Translation system -------------------...
cherrak Re : A quoi ressemble votre environnement - automne/hiver 2011/2012 Ok merci pour la precision ! Dernière modification par cherrak (Le 07/03/2012, à 03:09) Major Grubert Re : A quoi ressemble votre environnement - automne/hiver 2011/2012 Question bête : quel est le paramètre à modifier pour avoir un affichage "...
AuthorPosts February 18, 2014 at 11:04 pm #225796 I know of a site that uses Enfold and has a stock quote in the header (non-fixed header with social icons and additional navigation), and they’re doing so via a WP plug-in. I desire to do virtually the same thing, and I’ve installed an appropriate plug-in that gives me ...
I would like to change the base class of a class at runtime using __new__. I looked as hard as I could, but I couldn't figure it out. class A(object): pass class B(object): pass class C(B): some_attribute_in_c='hello' def __new__(cls): cls.__bases=(A,) #some code here to change the base class r...
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 frequently need to start several programs that I use every time I start my computer. How can I make it so that whenever I login the program is automatically launched? To make a program start with Ubuntu: To make Ubuntu remember your running applications on shutdown: (NOTE: this may slow system boot, and has not been ...
cmarcx Re : [Script] Client Hubic pour linux ;) Bonjour, J'ai essayé de monter hubic avec la commande : ./hubicmount -l <email> -p <passwd> -o umask=022 -o uid=1000 /media/hubic Mais j'obtiens toujours l'erreur "Unable to login to hubic". Pourtant les logins indiqués sont bons, je fais un copier-coller, et ils fonction...
I'm scraping a page with Python's pyquery, and I'm kinda confused by the types it returns, and in particular how to iterate over a list of results. If my HTML looks a bit like this: <div class="formwrap">blah blah <h3>Something interesting</h3></div> <div class="formwrap">more rubbish <h3>Something else interesting</h3...
Hizoka Re : [glade2script-GTK2] Interface graphique pour script bash ou autre. bah le principe en lui même je le pige. mais c'est son application où j'ai du mal. Il va falloir que je me penche bien sur tes exemples. Hors ligne frafa Re : [glade2script-GTK2] Interface graphique pour script bash ou autre. CouCou ! oulah ...
Are you sure, that you need to know, which of your two workers is doing what right now? In such a case you might be better off with Processes and Queues, because, this sounds as some communication between the multiple processes is required. If you just want to know, which result was processed by which worker, you can s...
Vicks openoffice et accents circonflexes... Bonjour à tous, J'ai un gros problème avec les acents circonflexes que je ne peux pas utiliser lorsque je suis sous openoffice. Cependant, sur le reste de ma config il n'y a aucun problème... Merci beaucoup de votre aide... @+ Vicks Hors ligne Vicks Re : openoffice et accents...
As a concrete example, take bpy.context.scene.gravity. Even though the examples linked are to keyframe an object, there is in fact no difference and the same methods apply to both. Simple: scene = bpy.context.scene scene.keyframe_insert(data_path="gravity", frame=10.0) Advanced: scene = bpy.context.scene if not scene....
bear with me, I've been using wxPython for all of one day now. Short version is, given a reference to a grid.PyGridCellEditor and a string, how can I implement a paste function? This is in the body of a large block of existing code that tries to handle pasting entire rows in a Grid widget, and this block is the special...
I'm running OSX Lion (posted here because this is a Unix-specific question), and am trying to deploy a Pinax project via FCGI. I have the FastCGI daemon running: $ ps wwaux | grep fcgi jonathan 522 0.0 0.2 2480420 4216 ?? S 10:54AM 0:01.14 python manage.py runfcgi method=threaded host=127.0.0.1 p...
obelix Ajouter les backports ! bonjour... je voudrais ajouter les backsports comme indiquer http://wiki.ubuntu-fr.org/installation/depots mais cela plante avec tous les backports une idee ? merci de votre aide ftp://ftp2.caliu.info/backports/dists/breezy-backports/main/binary-i386/Packages.gz: Impossible de récupérer l...
AuthorPosts March 8, 2011 at 3:00 pm #3339 Hello! :) First question: Regarding Levitation; What’s the code needed to change the portfolio page images to a link that goes to the related page (like when you click on the title of that item) instead of the photo gallery that is default. Second question: Regarding Levitatio...
I am now posting over at my new website. Hopefully I’ll update a bit more often than I did over here. I use the Skype 5 client pretty often while I’m at work. It pops up a Growl notification whenever a new message comes in, but if I’m not looking at the screen (or if I’m looking at another monitor), I’ll oftentimes mis...