Programming :: GTK / Glade Use C - Bash - Pascal Or Settle For Python?

Dec 17, 2010

I have searched the net for guides on GTK/Glade and have learned that I have to install Glade in order to experiment with it. It also appears that it only works for Perl. I would primarily like to use C ,Bash , Pascal or settle for Python if possible. Can anyone offer some general info on this topic?

View 4 Replies


ADVERTISEMENT

Programming :: Use Glade With C/python To Create A Graphical User Interface

Jan 30, 2011

I am working with ubuntu (linux) and have to create a graphical user interface. The GUI is a 2-D plot that have to plot a point. The point ( x and y co-ordinates) are not hardcoded, and are coming from another file (another piece of code written in c / python). I was thinking to use Glade with c/python to create this. But, I am not sure how to start with this.

View 4 Replies View Related

Programming :: Piping In Bash Using Python?

Dec 16, 2010

I have a bash script that I want to import in to Python, mainly just to see if I can or not. However in the script I do use some piping of commands into sed to trim it down to what I need. When I tried doing it with the os.system() call, it didn't work. The exact error is

sed: -e expression #1, char 16: unterminated `s' command

However the command that was run can be run in bash without an error. Is there a better/another way to do this? For reference the command is:

Code:

locate -n 1 wp-config.php | sed 's/wp-config.php/
/g' | sed '/wp-config.php/ d' | sed '/^$/ d'

View 3 Replies View Related

Programming :: Python To Bash Translation?

Oct 17, 2010

Ive been learning bash over the past 6 months or so and have written a few scripts etc and i have just downloaded julius to execute my scripts and a few commands with speech recognition, the example script that comes with julius to execute commands is written in python and the example works fine when executed but i would like to further extend and customize it but i dont know anything about python, so ideally i would like to translate it to bash as that is what i am learning/using at the minute and would like to learn/use one language at a time, translating it as i think im a little out of my league, i look at the script and sort of understand how it works but i dont know anything about python and my knowledge of bash is limited for use of translating languages.

the python script is:

Code:
#! /usr/bin/python -u
# How to use it:
# julius -quiet -input mic -C julian.jconf 2>/dev/null | ./command.py
import sys

[Code].....

View 1 Replies View Related

Programming :: Differences Of C And Pascal

Feb 22, 2010

I was wondering what are the main difference with these two languages? I mean besides just the syntax, only recently started looking at pascal. I find the syntax of Pascal nicer than C. So under the hood so to speak what are the differences? Also why do i see many look down at Pascal? Since C and C++ now are in more use than pascal, im guessing it offers something that Pascal and Object Pascal cant?

View 8 Replies View Related

Programming :: Python Passing Multiple Args To Bash

Jan 14, 2011

I have a text string I want to pass as the second arg to a bash shell.

My python line is :

The first arg "gap" works great and the bash shell uses it as $1

I need "fill" passed along as $2 intact

Here is the bash line:

As you can see after the -f it has to be in single quotes and $FILL will complete the single quote

Nothing is getting passed as a second arg from python, I did have the first word at one time but that was 85 tries ago and forgot how I did it!

The bash script complains about an unterminated quote.

View 6 Replies View Related

Ubuntu Installation :: Samba Needs Glade On 11.04 - ImportError: No Module Named Glade

May 1, 2011

After upgrading my media computer earlier today, I tried to run Samba config (system-config-samba) and it crashed. Running again in terminal I got the following error:-

Code:
import mainWindow
File "/usr/share/system-config-samba/mainWindow.py", line 30, in <module> import gtk.glade
ImportError: No module named glade
Ths was fixed by installing (via Synaptic):-

Code:
python-glade2

View 2 Replies View Related

Programming :: Syntax Error - Pascal ?

Apr 29, 2010

I have an error, which I have no idea why appears. All brackets seems ok.

error:

Code:

Code:

View 13 Replies View Related

Programming :: Double-quotes Do Not Escape Properly (bash=python)?

May 2, 2010

I wrote the Automatik widget (you can find it at :http://kde-look.org/content/show.php...&PHPSESSID=caeTo improve it, I would like to add this one-line script into a text sensor :

top -b -n 1 | head -12 | tail -6 | sed '/top/d' | awk '{ printf "%-12.12s %-4s %-4s %-3s
" , $12,$9,$10,$2}'

[code]...

View 3 Replies View Related

Programming :: Made A Program In Pascal But Cant Open It ?

Jun 13, 2010

On ubuntu i just compiled my first program using lazarus and i can open it in terminal fine but if i double click the file simply marked 'hello' nothing happens.

Here is the source:

PHP Code:

program Hello;

View 1 Replies View Related

Programming :: After USB Boot - Detect Which Device The Ramfs Was Loaded From - Bash Or Python

Sep 22, 2010

How one could determine (for use in a Bash or Python script) which device (eg /dev/sda1, /dev/hda1... etc) a ramfs was loaded from when booting from a USB drive.

I have a RIPLinux/Tinycore live USB disk that automatically needs to run a script that is stored on the same USB drive but not part of the RIPLinux/Tinycore image. (Please note that I do not want to put this script into the RIPLinux image.) I therefore would like to remix the RIPLinux/Tinycore ISO to automatically run this script once it has started up. After RIP linux has booted I would like to automatically mount the USB drive that RIPLinux/Tinycore was booted from. I need help detecting which device this is.

View 3 Replies View Related

Programming :: Interface Glade 3.6.7 And 'C' In Ubuntu 10.10?

Apr 18, 2011

this is my first time here: I've been programming GUI software in C# in MonoDev for some time now. I just noticed that I can use my favorite language, C, with Glade to do the same thing. I've been going through some tutorials with a little frustration with them. Some seem to be written for older Glade versions.

The latest example had me save my Glade project to a "tutorial.glade" file. Then run it through a 'gtk-builder-convert' utility. Problem: the utility program returns errors indicating the the tutorial.glade file was written badly, that there is supposed to be a <glade-interface> tag that is missing.

[Code]...

View 1 Replies View Related

Programming :: Invoke Cairo Functions From Glade?

Feb 12, 2011

I have created a glade file which so far have two regions in it:

1) On the right division is a toggle button which calls a C script when enabled.

2) I have a drawing area, in which I would like to plot a point (X-Y scatter plot). The plot should be generated dynamically using a C script. I am not sure how the integration between the two is possible for a drawing area.

In glade what properties of drawing area should I set? eg.expose event, realize etc. I was thinking of using cairo for generating the plot.

View 2 Replies View Related

Programming :: Calling Bash Script With More Than One Variable From Python Script?

Oct 4, 2010

I am calling a bash shell script from a python script trying to pass several arguments to the bash script with no succes can this be done? I have researched (google) with no clear indication of how to achieve this. Using "os.system"

View 4 Replies View Related

Programming :: Opening A Text File From Glade Interface?

Jan 26, 2011

opening a text file from glade interface.how?using c code

View 1 Replies View Related

Programming :: Bash-shell-like Less Functionality In The Python Shell?

Jun 25, 2010

Is there some type of functional way to read things in the Python shell interpreter similar to less or more in the bash (and other) command line shells?

Example:

Code:

>>> import subprocess
>>> help(subprocess)
...
[pages of stuff to read]
...

I'm hoping so as I hate scrolling and love how less works with simple keystrokes for page-up/page-down/searching etc.

View 4 Replies View Related

Programming :: Open Gnome Terminal (pass Commands ) On Clicking Glade Button

Dec 18, 2010

I am working on a small project for making a small configuration tool for ubuntu 9.10 for new linux users, that make their system working easily without knowledge of the linux commands.I created a gui in glade and loaded the gui with my python program to show up, now i wish to have some python codes that can launch a gnome terminal (and also pass some linux commands to it) on the click of a button contained in the glade file.

View 1 Replies View Related

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

Mar 22, 2009

I want to be able to do

sudo ./program.py

instead of always having to do

sudo python program.py

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:

Code:

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

[code]....

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

View 3 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

Code:

def blah(self, (string1, string2))

View 4 Replies View Related

Programming :: Exporting Glade Text View To Text File?

Jan 8, 2011

I want to display something in my text view widget in glade using c code. that's all right.
now I need to attach a save button beneath the text view.so that on click the text view content should save as a txt file..

View 8 Replies View Related

Ubuntu :: Python - Export Variables To Bash Commands?

Feb 19, 2010

I created variables in python and would like to be able to incorporate those into bash commands that will be mixed into the script. Example:

Code:
name=raw_input("Type your name and press ENTER: ")
import os
os.system( echo "name")

Of course this doesn't actually work, but i think you get an indication of what I am trying to do.

View 1 Replies View Related

Ubuntu :: Control Line In Volume In Bash/python?

Nov 14, 2010

How do i do to:1. Check if there is a audio source plugged in via line in?2. Control the volumeI want to do it through either bash or python script.

View 1 Replies View Related

General :: Write Either PYTHON Or Bash Shell Scripting?

Jun 4, 2010

I do not know how to write either PYTHON or Bash Shell Scripting. I am to learn one for Linux Administration purpose. Which one will you recommend for a Linux Admin/Eng environment?

View 4 Replies View Related

Security :: Bash And Python Scripts - Encrypt Them But Still Be Able To Execute Them Encrypted?

Aug 24, 2010

I have some bash and python scripts. Is there any way to encrypt them but still be able to execute them encrypted?

View 7 Replies View Related

Fedora :: Udevadm Settle Timeout ?

Jan 24, 2010

Problem occured yesterday and has added 3 mins to my boot time. all i can say about it is that it occured after a yum update and then a crash while using wine. i navigated to the file but really cant say much about it. however the pci call there makes me wonder if it is related to the post below.

Starting udev:

Wait timeout. Will continue in the background.

View 2 Replies View Related

Programming :: Totem Python Plugin Programming: Any Signal For Video Mouse Click?

Feb 9, 2011

I want that I click with the mouse on the video, it paused.I notice that there is "BaconVideoWidget" which I guess is the video rendering widget but it don't have signal named "clicked":

Code:
vd = totem_object.get_video_widget()
vd.connect("clicked", vd.hide)

[code]....

View 3 Replies View Related

Ubuntu Installation :: Can't Open Udevadm Settle?

Jun 26, 2011

I am trying to install ubuntu 11.04 to my laptop, currently I have 10.10 installed and working. When I try to boot the computer from USB for installation, I get (after waiting a few minutes):

[Code]...

I am currently using windows 7 and ubuntu as dual boot. I didnt have this problem when I was installing 10.10. I am not sure but I think I upgraded my BIOS after my 10.10 installation, so that might be related. I didnt change anything else related to hardware since.

I am not sure what other information I should provide, Also note that given error message might not be 100% correct as I have typed it from a photo.

View 2 Replies View Related

Ubuntu :: Bash: Cd: /home/mycomp/.nautilus/python-extensions: No Such File Or Directory

Aug 8, 2010

I was trying to install periscope, from the instructions here: http://code.google.com/p/periscope/wiki/NautilusSupport

The problem is that at:

cd ~/.nautilus/python-extensions

I get an error:

bash: cd: /home/mycomp/.nautilus/python-extensions: No such file or directory

View 6 Replies View Related

Fedora :: Troubleshoot Slow Udev-settle Service?

Jun 14, 2011

F15_x64, upgraded from F14 on Sandy Bridge. Any idea how to troubleshoot this slow loading service?

Code:
[root@sandy andy]# systemd-analyze blame
4598ms udev-settle.service
1611ms fedora-wait-storage.service
Code:
[root@sandy andy]# systemd-analyze
Startup finished in 2024ms (kernel) + 1527ms (initrd) + 11217ms (userspace) = 14770ms
[root@sandy andy]#

[Code]...

I've tried systemctl disable udev-settle.service, but it doesn't work, service loads on every boot.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved