Programming :: Update Textview In Each Itration?
Feb 12, 2011
i need to display some values in glade textview.in my program on a button click a function is called .the function will print values in textview.its dynamically printed in loop.so i need to create a window in each itration. so how can i prevent multilple windows from being created in each itration? i want to update *textview in each itration..how?
View 1 Replies
ADVERTISEMENT
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:
Code:
def run_command(command):
global keep_pulsing
keep_pulsing=True
(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.
Code:
### THE FOLLOWING ARE GLOBALS:
textview = wTree.get_widget('textview1')
textbuffer=textview.get_buffer()
def update_textview_callback(fd, condition):
global keep_pulsing
if keep_pulsing:
progressbar.pulse()
code....
View 3 Replies
View Related
Jan 18, 2011
When I add text to the TextView object it expands the parent window rather than adding scroll bars. How do I fix this?
I want to keep the parent window user re-sizeable.
FC14 x64 & gtkmm 2.4
View 1 Replies
View Related
Jun 18, 2010
i have a host file called myhosts.txt as follow:
Quote:
10.20.3.9 host1
10.20.3.10 host2
10.20.3.11 host3
[code]...
In my script, i am using NSLOOKUP to get the ip address of a host that just rebooted and connected to my network (this part has been done).But now i want to check the myhosts.txt file if the host has the same or different IP address, if is different then myhosts.txt file must be updated with the new IP.i am using the following AWk command:
Quote:
awk '/host4/{$1=val}{print}' val=10.0.3.4 /tmp/myhosts.txt
it prints on screen fine and i see the host4's ip address gets replaced but the actual file does not get updated with the new IP. I might need to use gsub?
View 11 Replies
View Related
Apr 27, 2011
I have written a daemon server. I would like to add the ability for the daemon to update itself. That is, it should be able to download the latest version of the code (when it receives a signal from a client) and then restart itself. I am stuck on getting the daemon to restart itself. The problem is killing the old daemon without killing the process that is starting the new daemon. In my latest attempt, the daemon that is updating itself runs a program in a subshell (using system) that starts a restarter daemon that runs the original daemon (again using system) with the restart command option. With the restart option, the new version of the daemon sends a terminate signal to the old version. Obviously, when I run the original daemon manually with the restart option, it restarts reliably. I figured that issuing the same restart command from a daemon would adequately isolate the process doing the restarting from the program being restarted. Using ps, I can see that the daemon does actually restart. However, the client locks. In fact, a few times, the OS locked and I had to reset.
View 7 Replies
View Related
Jun 11, 2010
I need to update very old mail files to make them mbox compliant. What I need to do is find all lines beginning with ^To: and put a comma between a random number of names on this To: line. So I want to replace the 2nd and all subsequent <space> on this lines with ,<space>.
It should be something like:
s/^To: [ ]/&,/2g
But that isn't correct.
View 2 Replies
View Related
Mar 27, 2011
I need help getting this bourne shell script working properly. This script I found online while reading some tutorials on getting a caching name server running, which is supposed to update the rootserver hints file.
The below case statement always returns that the hints file has failed. Even though when I check the file it looks normal and I can see the NOERROR status in the returned header.
Code: dig (at)e.root-servers.net . ns >root.hints.new 2> errors
case `cat root.hints.new` in
*NOERROR*)
# It worked
[Code]..
View 2 Replies
View Related
Mar 24, 2011
Provided this example code with a few givens:
- a database connection has already been made and proven to work
- the variables $newname, $newnumber and $oldnumber have a value; $newname is type varchar(25), the other two are integer).
PHP Code:
$params=array($newname,$newnumber,$oldnumber);$new_result=pg_query_params($db,"UPDATE mytable SET name=$1, number=$2 WHERE number=$3",$params);$new_number_rows=pg_affected_rows($new_result);
I get an error, and when looking on the database end I the query with the $1 $2 and $3 instead of assigned values; pg_last_error() shows: Quote: ERROR: syntax error at or near "WHERE" LINE 1: WHERE number=$3 ^
Since the given name may contain quotes, or someone may try sql injection, I wanted to use this safe(r) function;
View 13 Replies
View Related
Apr 10, 2011
How can i delete from ListStore or get TreeView iter when i toggle renderer1?
Code:
View 1 Replies
View Related
Jun 7, 2010
The script that Iam trying to write is running a for loop and reading line by line from a text file. inside this for loop i would like to execute update SQL statement .
a pesudo code is
Quote:
`$ISQL -U $username -P $Password -D $Dbname -I $INTERFACE <<QRY
for id in $idlist #idlist iam reading from a file
[code]...
View 8 Replies
View Related
Apr 8, 2011
I want to make an application that will update my facebook status. How can I make that ?
View 7 Replies
View Related
Jan 8, 2010
I'm pretty new subversion, and have a basic question which I haven't found the answer to:Say that I on machine A modify the working copy of my code, create a tag "release-1.0", and commit it, how can I on machine B point the working copy to the tagged code? For example, say my "code" is actually config files for Apache, and I wan't apache running on machine B to update it's config files based on the files found in tag "release-1.0", how is this done?
I'm sure the solution is very easy, but I just can wrap my head around it.
View 2 Replies
View Related
Jan 13, 2011
I've been thinking to adding the ability to update some code I've been working on from the internet. So basically writing some C/C++ code that on startup of the software looks across the next to a server to update itself. However I have no idea how to do this, can anyone point to to linux tutorials or examples which show how to do this?
View 3 Replies
View Related
Feb 6, 2011
I'd like to use a perl script to update a fields in mysql database when pianobar (command line pandora radio player) starts a new song. Pianobar has the ability to run a script based on events, I'd like to take advantage of and use perl toparse the artist,song,album and update the corresponding fields. Then later retrieve them and display them with php/html. I am by no means proficient with perl. I started to use bash, but it looks like perl will be much more efficient and and less time consuming.
Code:
#! /usr/bin/perl -wT
use strict;
[code]...
View 2 Replies
View Related
Nov 6, 2013
I have mysql installed successfully. I can insert rows into my table using phpMyAdmin. I can successful retrieve those rows in PHP with a select statement. However, I cannot insert or update rows from PHP. I get no error messages and everything appears to be working okay, just no results in mysql table.
View 0 Replies
View Related
Feb 8, 2010
How can I make shell script to use sqlplus to update some database table? This is what I'd like to make:
- login to db server (I have create ssh-keygen to bypass the login session)
- login sqlplus / as sysdba
- update status set status='END' where status='BEGIN';
- commit;
- quit;
I'm using oracle 10g database and SLES 9.0
View 3 Replies
View Related
Dec 7, 2010
I've a program which manages my pdf and references. I wish to put some of the information on my website but that program (Mendeley) does export only in XML (or bibtex). I'd like to simply convert the XML output files to SQL in order to create or update an SQL database.I'm not an expert in either XML or SQL (use only PHPMyadmin). Does someone get help me to figure out?
View 2 Replies
View Related
Jul 27, 2010
I am trying to automate yum update of specific package on a remote machine. Essentially, the script executes, does a yum update, if not needed it would return echo result "update successful", if it needs the update and it installs it without error, it will return echo result "update successful", or if it fails the update it would echo "update failed". So far I have this:
[code]...
This is OK, but I NEED it to just return the final echo "Update successful". I can't have all the other lines. How can I do this?
View 2 Replies
View Related
Oct 18, 2010
I have two txt files containing x and y coordinates: xcoord.txt & ycoord.txt. I need to open them; read them line by line to get each coordinate; then each time I need to update Xs and Ys parameters inside another file called "dc.in" with the grabbed values.
Finally each time I need to run two exe files ( dc_2002 and st_vac) and produce corresponding output for each Xs and Ys ( dc.in is an input file for this exe files)
I have written the following code but it does not work:
View 14 Replies
View Related
Jul 4, 2010
I am trying to update using Update Manager and I get this message: Failed to fetch "Failed to fetch [URL]..404 Not Found" My system is 64 days out of date now.
I have looked elsewhere for an answer and some others have had similar problems, but I have not found a reason for it happening, nor an answer. I wonder if anyone can help me please. I have been using Ubuntu for several months, can use the Terminal if I have the right commands to issue, but beyond that have limited knowledge of the system.
View 9 Replies
View Related
Sep 30, 2010
As the title says i updated my system which then needed a reboot. I also installed Mixxx djing software to try it out. So i thought id just restart the system. Usually when i boot into my desktop wireless automatically can connect to my router but not this time, wired only for now... i know theres tons of wireless issue threads but some more experienced users will be able to get straight to the point and run through some diagnostics with me.
View 1 Replies
View Related
Mar 14, 2011
having had problems with getting grub2 to work on dual HDD setup...despite the most excellent advice on the forum i took the plunge and installed 10.10 from update manager within 10.04..... bingo fixed grub and now have dual boot again. but the update manager and synaptic package don't work because of libedata-cal1.2-6 file that remains..following other advice on the forum Advice gratefully received, how can i force an unistall of this package
mark@studypc:~$ sudo apt-get -f remove
Reading package lists... Done
Building dependency tree
Reading state information... Done
[Code]...
View 9 Replies
View Related
Jun 8, 2011
Update Manager is inviting me to update from my Maverick Meerkat to Natty. Is this a good idea?
View 7 Replies
View Related
Jul 26, 2011
On two Centos5 servers, yum gives a segmentation fault error when trying 'yum update' or 'yum check-update' after running 'yum clean' :
[Code]....
The error is the same for the other computer except while attempting to update the rpmforge repository. Nothing has really changed on the servers in some time and 'yum update' worked fine on each yesterday and I have no idea why they would both suddenly fail!
View 3 Replies
View Related
Apr 19, 2009
I've install F10 to use it as server and router and found a strange problem on my XP machine which is behind the F10. I've tried to update my Lineage2 client from official server but the update crash, tried to open the web page it didn't open. Also tried to open microsoft web it didn't open. When i try to open the same pages on PC with F10 they open with no problem.
[Code]...
View 6 Replies
View Related
Apr 14, 2010
How can I make the security applet stop showing an update for firefox 3.5.9? I have a more recent version installed from mozilla repo: firefox 3.6. The mozilla repo already has a higher priority (95 instead of 99), so I don't know what to do.
View 5 Replies
View Related
Apr 27, 2011
I have a problem in updating opensuse 11.4, when I try to update the system the progress stops in the update window, and no updates appear
View 9 Replies
View Related
Sep 21, 2010
when I launch Yast2 - Online Update, I get an error during the repository refresh that it could refresh the repository.Since it's easier to copy-paste - here is the output from 'zypper ref' with the same error:
Code:
Retrieving repository 'Updates for openSUSE 11.3 11.3-1.82' metadata [|]
Failed to download ./repodata/cefcc9d56264aa169f70a53c560ffc39cb6af575-deltainfo.xml.gz
from http://download.opensuse.org/update/11.3/
A[code]...
View 8 Replies
View Related
Jan 14, 2010
I have logged in today and update manager reminds me of an update with linx-backports-module-2.6.31-14-generic. However my current kernel has been updated a while ago and is now 2.6.31-17. That obviously is more recent that that backport version. What should i do? By the way that update is from a PPA repository other that the default. I am wondering the update manager has no way to tell which kernel version i have at all? Should i actually go ahead with the installation?
View 1 Replies
View Related
May 2, 2010
I started the upgrade to 10.4 from 9.10 through the update manager. It started the update to 10.4. After downloading almost 95% of the update, it gave an error message of "could not download certain components. downloaded files will not be erased" and stopped the update. I restarted the PC, and started the update manager again. But now it does not show any option of update to 10.4. how do I continue or resume the update process? I just started using ubuntu about 15 days back. So, I am relatively new to this.
View 3 Replies
View Related