Python is an interpreted programming language that is often, but not solely, used as a scripting language. A version of Python is included by default on all Ubuntu distributions.

learn more… | top users | synonyms

2
votes
2answers
931 views

Trying to create a GtkTreeView from Python, doesn't seem to work

I'm writing an app using Gtk/PyGI, and I need to create a sidebar with a Nautilus-like tree. However, Gtk refuses to cooperate with me. I tried both with Glade and GtkBuilder (creating the ...
1
vote
1answer
602 views

Quickly ubuntu-application + indicator template don't work

I've started to work with quickly and python (because I wanted to have some GTk3 integration and create and appindicator), and so I create the projecto like this : quickly create ubuntu-application ...
2
votes
1answer
1k views

Problem with Python3 picking Python2 package

I installed python3-numpy package, but trying to import it in Python3 interpreter I get this: $ python3 Python 3.2.3 (default, May 3 2012, 15:54:42) [GCC 4.6.3] on linux2 Type "help", "copyright", "...
2
votes
2answers
414 views

How can I add new window to my project in using quickly?

I'm new to glade and python. But the code generated by quickly when making my first app is so much confused for me to understand. I don't know where should I add the code to initialized my new ...
2
votes
1answer
409 views

Ready-to-use time and/or datetime selection widgets for GTK3?

I've checked hamster-applet, gnome-control-center datetime and gnome-schedule. They all define a different datetime selection composed from basic widgets. I'm surprised it wasn't made available as a ...
0
votes
1answer
419 views

Path to gettext locales directory

I want add locales support to my python app, but I have problem with path to directory with translates. Defualt is /usr/share/locale, but what is recommended method to define it? Writing path in ...
3
votes
2answers
179 views

Build failed with the command : quickly submitubuntu

We try to submit our application for the ubuntushowdown contest, but when we do the command : quickly submitubuntu, the application is not submitted, we have errors such as "build failed". We spend ...
0
votes
2answers
603 views

How to hide a GTK window in Python before call or os.system

So, I'm depeloping a Python/GTK app which, after showing an assistant, it hides the assistant's window and runs an external app. The problem is that window.hide() doesn't works if, after the command, ...
1
vote
2answers
1k views

How do I force only one instance of my application?

I am developing a program using quickly. I am using an indicator which can hide/show the main window. But when I launch the application from the launcher it starts a new instance of that application (...
0
votes
1answer
82 views

Quickly User Dialog error

I think there is an error in the Quickly tutorial. In the User Dialog section, the tutorial instructs users to enter: title = saver.title_text in the save dialog method. This gives some error which is ...
2
votes
2answers
1k views

Make new instance of main window, python gtk

I am fairly new to python and gtk and I am writing an app for the Ubuntu App Showdown using Quickly. I want to make a new instance of the main window when the user clicks on 'New'. I have the button ...
2
votes
1answer
92 views

Why changing signals causes NameErrors in a sane code? - PyGtk issue

I'm working on a very simple app for Ubuntu. I've asked a question on stackoverflow, and it seems that the issue I am having is caused by signals, not by the scope of variables, as I originally ...
4
votes
2answers
742 views

How do I stop a container box from expanding horizontally in Glade?

Currently, when my button's label gets more characters, its container boxes resize horizontally, and push away the other containers next to it. I don't want this behaviour. How do I give my boxes a ...
1
vote
2answers
225 views

Problems related with spin buttons

So, I have an important problem related with spin buttons in Python/GTK3. I'm trying to create a spin button in my project, Virtuam, and it seems to work... but with a bug which blocks the +/- toogles....
4
votes
2answers
240 views

How do I add spellcheck to a TextView object in my Quickly app?

Specifically for a Quickly app, using Gtk3: How do you import GtkSpell in python? How do you set it up to spell-check a TextView object? (If there's an alternative to GtkSpell, do tell.)
3
votes
1answer
416 views

GTK3 tabs with big icons

I want to implement something similar to the ubuntu software center's tabs. What widget is it? Any working example in python where I could take a look? Is this widget available in Glade? Thanks ...
3
votes
1answer
382 views

Can't add page in a notebook

I am having some trouble adding a page to a Notebook widget. The error I get is this: AttributeError: 'function' object has no attribute 'append_page' I assume this means the object pages in the ...
7
votes
2answers
2k views

How to use GDK with Quickly

I trying to use the library gdk for scale down an image and apply it to a GdkImage. This is the code pixbuf = Gdk.pixbuf_new_from_file(fileName) pixbuf = pixbuf.scale_simple(100, 100, Gdk....
1
vote
2answers
1k views

How do I include basic image editing in my python application?

I am making an application for the Ubuntu App Showdown and I want to include basic image editing like adding black and white, grey effects etc to the image. But I don't know how to do that. I have ...
4
votes
1answer
216 views

Get child elements of a Notebook

I have a Notebook element and TextView elements inside them. Because the pages on the notebook will be constantly switched between. I need to be able to have in a variable the currently selected ...
3
votes
1answer
135 views

How do I commit changes to a text file on button press?

I've written a small app that creates a GUI for setting up uShare. Currently it depends heavily on the 'w' (write) and 'a' (append) functions to generate/edit ushare.conf file. But I've been trying to ...
2
votes
0answers
30 views

How to create Python app , which asks for sudo permissions? [duplicate]

Possible Duplicate: How do I call a dialog for authentication? My application needs sudo permissions , so I want that when program starts , it asks for sudo permission , like Software Center ...
4
votes
1answer
441 views

Quickly Application making it run on startup

I have a PyGtk application that I made using Quickly, and I would like to have it run on startup when installed. How would I go about doing this? I'm not sure if sticking the .desktop file in ~/....
1
vote
1answer
106 views

How to implement event changed event on Entity object Python/Quickly

I start to develop a test application to experiment button clicks, window's title change and other widgets use. on button objects it's easy to make event "clicked" to work, in to window class and ...
6
votes
3answers
4k views

How to add vte terminal widget in GTK3?

I'm trying to add vte widget in my application and the examples I've found use .fork_command() to execute a command in that widget. But according to http://developer.gnome.org/vte/0.26/VteTerminal....
1
vote
1answer
450 views

Why is ComboBoxText giving me a “no attribute” error?

I'm trying to add a text Combo Box into my app. I've created in and populated the list but when I I try to print out the active text I get an error. Here's the part of the code in question: def ...
7
votes
6answers
20k views

How do I set up a python development environment?

Ok so I have decided to delve into the realms of casual coding and I have been told Python is a great language for beginners like myself. I know (not really sure though) the Python interpreter is ...
1
vote
1answer
181 views

Invalid syntax error when following “Creating your first ubuntu app” video

$ quickly run Traceback (most recent call last): File "bin/mybrowser", line 32, in <module> import mybrowser File "/home/michael/mybrowser/mybrowser/__init__.py", line 14, in <module&...
1
vote
1answer
155 views

How can I store variable changed by user?

I'm working on simple application for Ubuntu App Showdown. I'm relatively new to programming (started learning Python last week), so maybe this question sounds stupid. Anyway, lets say there's a ...
0
votes
1answer
136 views

Teeview-Binding to CouchDB not working with quickly (PyGtk + Glade)

For the Ubuntu App Developer Showdown I need to know some basics about quickly. One really important thing is to know how the Treeview-Binding works with CouchDB. I did the Tutorial1 (rickspencer3.com/...
7
votes
1answer
969 views

How to use the AccountsService API with Python?

I'm writing an application for the Ubuntu app showdown and I try to read/write the user's profile picture using this >>> from gi.repository import AccountsService, GLib >>> ...
7
votes
1answer
27k views

How to run a .pyc (compiled python) file?

When I compile a python file, I get a *.pyc file. When I try to run that, I get a message saying there is no program for running them. When I search for a program online via that option, it says there ...
3
votes
1answer
3k views

Glade: How can I set the value of a spin button?

I've done some spin buttons with Glade for my Python/GTK3 app, but I don't know how to set things like default, lower or higher value. How can I do it? Using the following things for development: ...
1
vote
1answer
310 views

Open Dialog, created with quickly does not work

I tried to open a dialog like David Planella describs here (and quickly help add): Open Custom Dialog Windows (PyGTK + Quickly) But this don't works for me. I always get the same Error-Message if I ...
6
votes
3answers
5k views

How to detect a computer's physical screen size in GTK

I've come across this bug while writing my app. In short, the app's window size is fixed, which does not work well with smaller screens such as in netbooks. In those, the lower buttons are off the ...
7
votes
3answers
6k views

How do I create and use keyboard shortcuts in a Gtk app that I am developing?

I am creating an application for the Ubuntu App Showdown in Python + Gtk with quickly. I am calling it Discvur. I would have liked to include some keyboard shortcuts. Searching the web, I found this ...
2
votes
1answer
461 views

How do I access the preferences from my main dialog window? Also how do I add a new preference?

class PreferencesCalorieBurnerDialog(PreferencesDialog): __gtype_name__ = "PreferencesCalorieBurnerDialog" def finish_initializing(self, builder): # pylint: disable=E1002 """Set ...
1
vote
1answer
158 views

Is there a recommended DB to work with Quickly?

CouchDB used to be the recommended DB to work with Quickly until 12.04, when it was dropped out. Now, I want to know if there is another DB recommended to replace CouchDB that works nicely with ...
2
votes
1answer
142 views

Is there a way to use the “primary toolbar” with QT or Java?

I am developping a software in order to compete in the Ubuntu App Contest, but I am having a problem. I started with quickly and glade, but since I am not very familiar with python, and since now the ...
1
vote
1answer
3k views

Glade GTK entry get text

Sorry for a newbie question but I could not figure out how to print a text which a user enter in a GTKEntry field after he press a button. I design my app with glade, a simple TextEntry Field and a ...
4
votes
5answers
12k views

Where is Python source code?

I have Python 2.7 installed for learning purposes (I'm a starting programmer reading 'Learn Python The Hard Way') and wanted to know how some things were done. I installed it from Synaptic and want ...
0
votes
1answer
3k views

How to connect GTK3 button click events to callbacks

So, I'm developing my 1st app with GTK3 and I don't know how to link my buttons with their respective defs. Can anyone post a tutorial, an example or some docs? Using next things for developing my ...
3
votes
1answer
935 views

Changing TextView font in PyGTK

I have TextView widget in Glade named "formula-view". I'm trying to do this to change font: formulaView = self.builder.get_object("formula-view") fontdesc = pango.FontDescription('Ubuntu 16') ...
0
votes
1answer
702 views

How do I ignore missing trusted keys in apt sources.list? [duplicate]

Possible Duplicate: How do I bypass/ignore the gpg signature checks of apt? i have a problem in ubuntu hardy: i use an old hardy server that i may not upgrade with the historical sources: ...
2
votes
1answer
186 views

Custom widgets/controls in application indicators

I want to develop an app for ubuntu, that integrates inside the calendar indicator/menu. It should allow to enter info right from it, and have several controls like input boxes, drop downs, spinners ...
3
votes
2answers
329 views

Quickly packaging errors

I'm having some trouble packaging my Quickly (Python/GTK) app. Creating and packaging a new app (created using quickly create test and cd test; quickly package) works just fine, but the actual app ...
5
votes
1answer
597 views

Python/GTK3 app crashing on importing “indicate” (python-indicate)

I'm trying to integrate my Python/GTK3 app with Ubuntu's messaging menu and every time I try to import "indicate" (python-indicate) my app crashes, with the following traceback: /usr/lib/python2.7/...
2
votes
1answer
76 views

Is there a native way to share a link?

Is there some sort of API available in Ubuntu that allows you to share a link with Twitter, Facebook etc? I've found this: https://code.launchpad.net/~ken-vandine/+junk/gwibber-api-examples but it ...
2
votes
1answer
542 views

Getting the name of the process, that corresponds to the active window

How can it be did using Python(in Ubuntu)?
0
votes
1answer
187 views

Video Codec Error

I have noticed on some videos that when I play some unusual video formats I always see this message. Can someone please give me instructions how to resolve this issue? Which codec do I need to install ...