Debian Programming :: Implementing PyGtk For Python 3.3 In Wheezy

Sep 12, 2013

I run Wheezy Xfce 64-bit. I went through the Synaptic listings and added Python 3.3.2 and Tkinter for it, and that works fine; but for some reason PyGtk is available only for Python 2.7, not for Python 3.3, unless I'm just using the wrong way to try to find it. Is there a PyGtk available for Python 3.3 in Wheezy, and, if so, how do I install it and then import it once it's installed?

View 1 Replies


Debian :: How To Fix Python-libtorrent Kept Back Package On Wheezy

Oct 11, 2015

I'm currently running Debian Wheezy (upgrading to Jessie is not possible since I'm using OpenMediaVault which only supports Wheezy) but ever since I installed Deluge BitTorrent client that I've had this python-libtorrent package as "kept back". I'd like to fix this system state but how...

A few things I've tried:

Code: Select all$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done

The following packages have been kept back:
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

Code: Select all~$ sudo apt-get install python-libtorrent
Reading package lists... Done
Building dependency tree
Reading state information... Done

[Code] .....

I have the following APT repositories on my sources which I believe are causing my problem:

Code: Select alldeb stoneburner-miller main
deb precise main

They were added through OpenMediaVault's interface when I enabled some checkboxes to be able to install Deluge.

View 6 Replies View Related

Slackware :: Pygtk With Numeric Python Support?

Feb 14, 2011

I have tried rebuilding pygtk after installing Numpy and ended up making a mess of python. I have it back to functional now, but I would like to know how to properly add numeric python support. I suspect there is a proper order to building all of the python dependencies that yields success. Ultimately I am trying to run mypaint.

View 3 Replies View Related

Software :: Build Pygtk With Non System Default Python?

Apr 13, 2011

I'm on Debian Lenny. I've built and installed python-3.2 in /opt/python-3.2. Then i want to build and install pygtk, pycairo with /opt/python-3.2 and install them in that folder and not to use system default python (which is python-2.6) for their build process.

How do I tell pygtk and pycairo 's configure and makefile script to use /opt/python-3.2 's interpreter, include file and library for their build process(and not the system default python)?

I tried doing ./configure --help in pygtk folder but there was no option for specific non-system default python's folder location. Anyone has any ideas?

View 3 Replies View Related

Debian Programming :: GCC Can't Generate 64 Bit Program On Wheezy Mips64?

Dec 21, 2014

I have both 32 bit and 64 bit libs installed with gcc multilib.

I tried following options, but the result is still a 32bit elf:

# cc -mips64 -mabi=o64 -mlong64 -mgp64 -c gendian.c
# file gendian.o
gendian.o: ELF 32-bit LSB relocatable, MIPS, MIPS64 version 1 (SYSV), with unknown capability 0xf41 = 0x756e6700, with unknown capability 0x70100 = 0x1040000, not stripped

The machine is running 64 bit os:

# uname -a
Linux debian 3.2.0-4-5kc-malta #1 Debian 3.2.63-2+deb7u2 mips64 GNU/Linux

Both 4.6 and 4.7 gcc have been tried, and both have the same issue.

Fixed: need -mabi=64

View 0 Replies View Related

Debian Programming :: Uniqueness Test Failure On Wheezy / Virtualbox

Nov 15, 2013

Python's test case to test uniqueness of uuid.uuid1() in is failing on wheezy on Virtualbox. However, when I change it to use uuid.uuid4(), it's successful always. I don't have wheezy installed on a bare machine to test.I faced this problem when installing Python 2.7.6 on my virtualbox. This is blocking a successful installation.

Below is a test file I created:
Code: Select allimport uuid
def test_uuid():
    uuids = {}
    for u in [uuid.uuid1() for i in range(1000)]:

View 0 Replies View Related

Programming :: Automatically Scrolling Text Box In PyGTK?

Jan 4, 2010

I am playing around with PyGTK and come across a problem: When I put a TextView inside a ScrolledWindow, and type text into the TextView until it reaches the edge, the cursor goes outside the viewport and I can't see what I'm typing. How to make it so that the ScrolledWindow automatically scrolls so that the caret in the TextView is always in visible?

View 5 Replies View Related

Programming :: Create PyGTK Gnome Screensaver?

Dec 15, 2010

I have created a PyGTK app (a binary clock) that I would like to turn into a screensaver. I added the .desktop file to /usr/share/applications/screensavers/ but all I get when I select it is a black screen. On the GnomeScreensaver FAQ (here) it says to use a gsthemewindow as the toplevel window, but the libraries given are in C. Is there any way to:Import this C library to get access to this toplevel window, Convert this GTK+ C library to PyGTK, or use a pygtk app as a screensaver in some other way?

View 3 Replies View Related

Programming :: PyGTK: Can't Seem To Launch Program - Gobject.spawn_async Command

Jul 20, 2010

I need to launch a program, throw up a pulsing status bar and then close it when the program quits. I cannot seem to launch the program (a bash script):


This is where I'm getting my information: [URL]...

View 1 Replies View Related

Programming :: PyGTK: Send Output From A File Descriptor To A Textview?

Jul 22, 2010

Within PyGTK I'm using gobject.spawn_async to launch a bash script. I would like the output of that bash script to be displayed within my application. I have a textview set up to receive the text ...

Here are the commands that launch the program:

def run_command(command):
global keep_pulsing
(cpid, cstdin, cstdout, cstderr) = gobject.spawn_async(command,flags=gobject.SPAWN_DO_NOT_REAP_CHILD|gobject.SPAWN_STDERR_TO_DEV_NULL,standard_code....

Here are the two callback functions. But like I say ... I have no idea how to get that data from the 'cstdout' file descriptor into a textbuffer.

textview = wTree.get_widget('textview1')
def update_textview_callback(fd, condition):
global keep_pulsing
if keep_pulsing:

View 3 Replies View Related

Debian Programming :: Crontab Python Script Will Not Run

Oct 10, 2014

This python script works , but not from crontab.Here is my python script:

import os, datetime;
datestring ="%Y%m%d_%H%M%S");
print (datestring);

Here is how I call it from crontab

*/30 * * * * /usr/bin/python3 /home/cwc/logs/

View 2 Replies View Related

Programming :: Make Python Programs Run Without Entering The Command Python?

Mar 22, 2009

I want to be able to do

sudo ./

instead of always having to do

sudo python

What do I need to change?

View 5 Replies View Related

Programming :: Python - Get Text File Data Into An Array On Python?

Nov 30, 2009

I've already used line split stuff to transform my data into something like this in a text file:


['1', '1', '3', '20.7505207']
['2', '1', '3', '23.0488319']
['3', '1', '3', '-1.5768747']
['4', '1', '3', '-26.4772491']


How can I get this on a python program so I can manipulate it as an array?

View 3 Replies View Related

Debian Programming :: Python - Selenium Script Migration

Apr 3, 2014

I have a code that uses the Firefox webdriver with Selenium to execute a couple javascript commands and fetch me some info. Since Debian doesn't use Firefox by default, and Selenium doesn't recognize Iceweasel as the equivalent of Firefox (which may be reasonable, but still kinda dumb), I downloaded and extracted the firefox-28.0 bz2 folder to my desktop. Next, I used the top answer suggested here to point Selenium to the binary:

Code: Select allfrom selenium import webdriver
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
binary = FirefoxBinary('~/firefox/firefox-bin')
driver = webdriver.Firefox(firefox_binary=binary)

However, it results in this error message:

Code: Select allTraceback (most recent call last):
  File "./", line 19, in <module>
    driver = webdriver.Firefox(firefox_binary=binary)
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/", line 59, in __init__
    self.binary, timeout),

[Code] ....

Did I set the binary path incorrectly or something?

View 9 Replies View Related

Debian Programming :: Python - Unable To Install Matplotlib

Jul 16, 2015

I am unable to install matplotlib. I already have installed latest libfreetype and libfreetype-dev.But it still errors out on freetype, I am running Debian testing on my machine. Python is latest 3.5.b3 compiled from source and in virtual env , running the command :

pip install matplotlib

...... freetype: no [Requires freetype2 2.3 or later. Found ...] png: yes [version 1.2.50] ..... .....

* The following required packages can not be built: * freetype ....

Full error log here: [URL]....

I do not understand why requirement is not marked for compilation even though found.

View 5 Replies View Related

Programming :: Implementing A Garbage Collector In C++?

Aug 27, 2009

I'm interested in writing a generational garbage collector in C++. This is for a Python-like programming language project. I have used Boehm's garbage collector before, but I'm worried that it will have noticeable pause times (unacceptable for interactive programs). Since I can't really find any other C++ established GCs out there, I have been thinking of simply writing my own.

However, there are two essential ingredients I need for this:

- Some kind of write barrier mechanism that will notify my collector when something is written to a part of the heap

- A way for me to know the addresses and sizes of the stack, heap and global storage (the root sets)

how to implement write barriers (and how to get the stack, heap and global storage information) on the Linux platform? As an alternative, if you know of C++ GCs other than Boehm, I would also be interested.

View 14 Replies View Related

Programming :: Implementing Scrollbar Using Xlib ?

Oct 17, 2010

I am working on xlib project to develop text editor without using help from any of toolkit/widgets.I get stuck in scrollbar.I have no idea how they work and developed.It become more difficult as I am using low-level C library - xlib.

View 1 Replies View Related

Debian Programming :: Searching For A List Of Strings In File With Python

Oct 14, 2013

I'm trying to search for several strings, which I have in a .txt file line by line, on another file.

So the idea is, take input.txt and search for each line in that file in another file, let's call it rules.txt.

So far, I've been able to do this, to search for individual strings:

Code: Select allimport re

shakes = open("output.csv", "r")

for line in shakes:
    if re.match("STRING", line):
        print line,

How can I change this to input the strings to be searched from another file?

So far I haven't been able to.

View 3 Replies View Related

Debian Programming :: Return How Many Items Occurs In List (Python)

Jan 29, 2014

I going through the Python course on Codeacademy. I have some trouble understanding what I'm doing wrong. This is my code below:

Code: Select alldef count(sequence, item):
    total = 0
    for x in sequence:
        return x
        if x in sequence:
            total += 1
    return total
print count([1,2,1,1], 1 )

The code gives me an error: "Oops, try again. Your function fails on count([1],7). It returns 1 when it should return 0."

It should be outputting 3 because 1 occurs 3 times in the list.

View 7 Replies View Related

Debian Programming :: Packaging Shared Library With Python Wrapper

Apr 12, 2014

I have written a shared library and successfully used debhelper 9 to create a Debian package from source using a Makefile generated by cmake. I then went about writing a python wrapper to that library and wish to package that wrapper in with the library so I can have a single distributable rather than 2 separate ones.

All of my attempts so far have me placing my python source and a file in the same directory as the makefile at the time where I call debuild.

From here I have tried a couple different configurations to my debian/rules file as seen below:

Attempt 1:
# -*- makefile -*-
dh $@ --with-python2 --buildsystem=python_distutils

This try seemed to package up the python stuff nicely but proceeded to ignore my makefile for the shared library and therefore ultimately failed.

Attempt 2:
# -*- makefile -*-
dh $@ --with-python2

This try ran make, but completely ignored the python stuff. From some research I have gathered that the --buildsystem flag tells debuild to ignore any makefiles in the directory, which obviously causes a problem in my case.

Another attempt was to modify the build dependency to first run make and then call the python build process that file looked like this

Attempt 3:
# -*- makefile -*-

dh $@
dh $@ --with-python2 --buildsystem=python_distutils
dh $@ --with-python2 --buildsystem=python_distutils

This appears to somewhat work as both processes do build, but a few of the python files are still not getting installed.

Is this the way I should be going about doing this? I've noticed that most python wrappers tend to package themselves individually and then make that package dependent on the library it is attempting to wrap.

View 0 Replies View Related

Debian Programming :: Python-TK Alloc - Invalid Block Error

Sep 23, 2015

Just installed Debian 8 last night and trying to run one a few of my scripts that use easygui (a front-end for python-tk basically) and I keep getting alloc: invalid block any time a file or folder selection dialog is presented. I'm able to select a file/folder with no issues, but once the dialog closes I get a variation of what appears to be a memory error followed by alloc: invalid block.

Here's one of my scripts that does it. This one pops up a file selection dialog pretty early on to ask for a file to check, and as soon as I select any file the dialog closes and that error appears in the terminal. It happens whether I run it with Python 2 or Python 3. You will need to install python3-easygui for this script to run properly if you want to check for yourself what happens. This is a first time encountering this error for me.

View 1 Replies View Related

Programming :: Implementing Search Engine Optimization (SEO)

Mar 31, 2011

Though I have developed some web applications (automation tools) using PHP which have been primarily meant for Intranet (within the organizations I have worked for), I have paid little attention to SEO (it was not required until now). But now I want to understand how do we go about implementing SEO and where do we fit this mechanism in a system / website?

Do we need any other tools or learn some specific programming /scripting language to achieve it?Will implementing a good SEO yield identical results irrespective of what search engine (be it Google or Yahoo!) is being used by users?

View 1 Replies View Related

Programming :: Implementing Hamming Code In C Lang?

Sep 12, 2010

implementing hamming code in c: Calculating the Hamming Code The key to the Hamming Code is the use of extra parity bits to allow the identification of a single error. Create the code word as follows:

Mark all bit positions that are powers of two as parity bits. (positions 1, 2, 4, 8, 16, 32, 64, etc.)
All other bit positions are for the data to be encoded. (positions 3, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, etc.)


View 2 Replies View Related

Programming :: Implementing A Classless Qdisc (a Scheduler)?

May 13, 2011

i am running linux kernel 2.6.32-30 and my aim is to do packet aggregation in linux,so i created a qdisc simple one like sch_fifo.c and i wanted to put upon the dequeue function but when i attach my qdisct with tc qdisc add dev wlan0 root aggregate my screen just go black and in var/log/messages it says 31 m of stolen memory.graphic perfomance may suffer. can you somebody pls help me. Below is my dequeue function.

static struct sk_buff *aggregate_dequeue(struct Qdisc *sch)
struct sk_buff *skb;
struct packet_buffer *packet_buffer = {0};
skb = __skb_dequeue(&sch->q);


View 1 Replies View Related

Programming :: Data Structure For Implementing A Text Editor?

Nov 15, 2010

Options:A double linked list with fixed size character arrays. New nodes will be added when previous ones get filled. Dynamic arrays using realloc(). Linked list has the disadvantage of not having an O(1) search like an array but I think using realloc() will be more dangerous since it moves the whole block to a new location and if the new location is not big enough to hold the whole block, realloc fails !! this case will not occur with the linked list since its nodes are scattered.

View 14 Replies View Related

Programming :: Encryption / Implementing AIDE On Client Machines?

Aug 22, 2010

I need to implement AIDE on my client machines. The builds on these machine are different, so each workstation will have its own specific db generated through running AIDE initially. It is not good practice to just leave the db on the machine, since an "attacker" would be able to view this information. However, at the same time I do not want to pull back over 100 different aide db's to the ftp server and have an update pull each specifically every time I need to run the check. The plan is to leave the db on the client machine, but encrypt it (using public/private keys). I need to be able to encrypt the file on the client machine. I will use a cron on the client to pull an update (from my ftp server) that runs AIDE. This update needs to be able to decrypt the file, use it running AIDE, then re-encrypt the file on the client.

View 1 Replies View Related

Programming :: GNU Common LISP Package Implementing Forkpty()?

Mar 21, 2011

I seek a GNU Common LISP package which implements forkpty(); openpty() would also be a big plus, and login_tty() would be a luxury I could live with.

View 3 Replies View Related

Programming :: Implementing Sleeping Barber's With Multiple Barbers?

Oct 11, 2010

I'm working on a problem in which i have to implement the regular sleeping barber problem with multiple (say n) barbers. The code i'm using is this :


how to implement the modification? (there are many more such modifications where i'm stuck , but will ask about those later)

View 6 Replies View Related

Programming :: Implementing Matrix Based Keypad On X86 Processor Using GPIO's?

Feb 5, 2010

I need to control matrix 5x4 keypad, on a processor

i am doing by making one row low at a time, and keeping all other rows high,

by scaning coloums, the corresponding key value becomes low.

my problems is that it is taking much time to respond, like to make gpio

low to high and high to low...

View 1 Replies View Related

Programming :: Python 2.x - Represent The Same In Python 3.x

Mar 4, 2010

I have a function definition in a Python 2.x script which take a tuple as one of its arguments, but 2to3 has no answers nor any of my searching on how to represent the same in Python 3.x


def blah(self, (string1, string2))

View 4 Replies View Related

Copyrights 2005-15, All rights reserved