Programming :: Python And Curses : Unable To Getch() For A Curses.KEY Event

Nov 8, 2010

When I getch() a key event (UP arrow key), the getch() function return a string of characters that I cannot compare with curses.KEY_UP constant. Here is the code I use :

while True:
w = gb.scrn.getch()
c = chr(w)
otp = 'touche:'+str(w)+' '+str(c)+"

[Code]...

It seems like getch() return three distincts bytes while I would retrieve it with a single ord() instruction in python like describes in curses/python documentation.

View 1 Replies


ADVERTISEMENT

Programming :: Errors Using Curses.h?

Feb 28, 2010

I am trying to compile a program for my assignment at school that uses curses.I have installed libncurses5-dev, and curses.h is now in /usr/include, but I am getting all these errors(it compiles fine at school).

Code:
grcunning@grcunning-desktop:~/school/cs474/assign7$ gcc -o proj7 proj7.c
/tmp/cc2ZFXrs.o: In function `main':

[code]....

View 2 Replies View Related

OpenSUSE :: Curses.h Not Found?

Oct 25, 2010

i have installed suse 11.3 and c and c++ programs are running fine but when i try to execute any code with curses.h header included error is shown that curses.h not found what can i do?

View 1 Replies View Related

General :: Scriptable / Non Curses IM Clients

Apr 16, 2011

Just something I've been curious about. I've been messing a fair bit with some of my own scripts, and in some cases, getting sent an IM would be useful to let me know when a task is done. the ability to set account information in a text file.It'd be okay if I can designate only a single recipient, or set recipients in the config file at the very least, jabber support.Be able to be controlled via standard shell commands - for example I should be able to pipe a message output into the program for example.

View 1 Replies View Related

General :: Make Curses Or GUI For JWM Theme Switcher

Mar 3, 2010

I need to make a simple GUI or even commandline based theme switcher for my JWM slackware 13-current setup.Basically, to change themes I just use a cp command from menu.However, the more themes, the bigger the menu gets and so it would be nice to have a app/script something that will allow me to click on theme I want and when I hit "apply" it cp's the theme for me.

View 5 Replies View Related

Networking :: Inputting WPA Password With Wicd-curses?

Jan 17, 2010

I'm reviving an aging Thinkpad X22 by installing Debian and running only in text mode. I've installed wicd to control the wireless network connections. When I run wicd-curses from the cli, it finds the network and I'm able to obtain an IP address. The wireless ESSID that I'm connecting to is encrypted with WPA. I can't seem to figure out how to input the encryption password so I can connect.

View 2 Replies View Related

Programming :: C Programming Using Curses?

Apr 28, 2010

I have a Database using C programming and text based screen using curses. When I run the program and select "add a customer". The startcontract and endcontract variable does not appear. Also, when I add a name, it does not display what I have written down. All that appears is some jargon which I don't know how to fix it.

PHP Code:
#include <unistd.h>
#include <stdlib.h>

[code]....

View 3 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 :: Unable To Configure Apache2 With Python Support

May 31, 2011

I'm unable to configure the apache2 with python support. I have done the configuration in the following method, but unable to start the python cgi support: I have installed the libapache2-mod-python it has installed python.load in the mods-available directory. In the apache2/sites-available/default file, I have added the following lines.

[code]...

when I request for a python script in the py folder. I get a 404 Not found error.

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 :: Mq_notify Not Notifying About An Event

Nov 30, 2010

I'm using mq_notify to be notified about events on a message queue. But my registered notifier function is not being called. I'm pasting my code snippet below:

[Code]....

View 4 Replies View Related

Programming :: Event When Network Interface Goes Down?

Jul 13, 2010

I am trying to write an app that will perform some actions when a network interface is unplugged. Is there a way to get the OS to signal me when a network interface is unplugged. I have looked at DBus but can't figure it out.

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

Code:

def blah(self, (string1, string2))

View 4 Replies View Related

Programming :: Event Device Nodes And Xorg?

Oct 14, 2010

When i create a new event device (/dev/input/event) it is automatically grabbed by Xorg:

Code:
(II) config/udev: Adding input device Keypad Emulation Driver (/dev/input/event7)
(**) Keypad Emulation Driver: Applying InputClass "evdev keyboard catchall"

[code]....

View 1 Replies View Related

Programming :: Invoke A ButtonPress Event Using XLib?

Nov 17, 2010

I'm working on an application which generates random shapes when clicking on a window. I designed the window using Motif. I want to invoke the ButtonPress Event .

View 1 Replies View Related

Programming :: Detect A Keypress Event In A Console Session?

Oct 27, 2010

Is any way to detect a keypress event in a console session? Preferebly without needing the application to be running in the foreground

View 2 Replies View Related

Programming :: Add Time Of Occurrence For Mouse Event In Xinput?

Jan 24, 2011

i need to have the time of occurence for mouse event in xinput,right now i run

Code:
xinput test <device_id> >log.txt
(for finding device_id using xinput list)

[code]...

View 4 Replies View Related

Programming :: Java Applets - Mouse Dragging Event

Jan 4, 2010

I know how to deal with a mouse click event like so:

Code:

But was happens when I am dealing with mouse dragging? Will my implementation of mouseDragged() get called for every pixel moved? So I just getX() and getY() like with a mouse click?

Also, in order to know when mouse dragging stops and starts, do I also have to put code in mousePressed and mouseReleased?

View 1 Replies View Related

Programming :: Run A Script On Switch-user Event Ubuntu 9.10?

Feb 18, 2010

How to do so? For starters, I'm not sure there is such an event. Maybe it has something to do with the OS moving through certain run-levels

View 6 Replies View Related

Programming :: Using Perl To Update Mysql Table On Certain Event?

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

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

Programming :: Python 2.x Vs 3.x

Apr 21, 2010

I'm starting to learn python and I am wondering whether I should start with python 2.x or should I just start learning python 3.x?

View 2 Replies View Related

General :: Unable To Determine What Exactly Python OpenSSL?

Jun 11, 2010

I haven't been able to determine what exactly Python OpenSSL and what it does. Google searching has not yielded me anything I can understand. In a terminal window (using RHEL 4.8 AS) typing

Code: rpm -qi pyOpenSSL yields information pertaining to the version of Python OpenSSL on my server. Can you explain what Python OpenSSL is in simple terms?

View 5 Replies View Related

Programming :: Convert Map From Python 2.x To 3.x

Apr 6, 2010

I have an existing line of code from a P2 script that I cannot find a solution to converting to P3:

Code:
for i, x in map(None, list1, list2):
I have found the information about converting the simple case:
map(None,x) becomes list(x)

But my googling was unable to find a solution when more than one iterable exists.

View 2 Replies View Related

Programming :: How To Run Python Script From C

Jan 31, 2010

I have a python script I wrote a while ago and now I would like to call that script from inside C. I know how to do one command from C, but how would you execute an entire script from C, and passing arguments? Like:

Code:

int main(void)
{
python( myprogram(1 2 3) );
}

So I can pass arguments to my script.

View 3 Replies View Related

Programming :: Py_FindMethod In Python 3.1.1

Jan 19, 2010

what the equivalent function in Python 3.1.1 is for Python 2.6.4s:

Py_FindMethod

Be buggered if I can find anything in the doco to say what replaced it or what alternative code may need to be entered to replace it

View 1 Replies View Related

Programming :: Python With Web Development ?

Dec 17, 2010

I have decided to learn python as it seems to be powerful not just for web development (like php) but also a clean powerful language for other puposes.

Q: Can someone suggest a tutorial or book, on learning python (beginner to intermediate) which has as its focus for learning, web development?

In order of preference: 1. Comprehensive, 2. Online, 3. Free

View 2 Replies View Related

Debian :: Unable To Locate Package Python-virtinst

Sep 28, 2015

I'm trying to install some virtual machines to a dedi using KVM. So far everything seems to be working, I tested the KVM install with virsh -c qemu:///system list and it responded, however, I'm trying to now install the script for generating new vps's python-virtinst but putty is returning this error:

E: Unable to locate package python-virtinst

View 3 Replies View Related

Software :: Unable To Create An RPM That Will Install Python 2.7.1 Along With Sqlite 3.7.3?

Mar 8, 2011

I want to be able to create an RPM that will install python 2.7.1 along with sqlite 3.7.3, MySQL-Python-1.2.3 on a CentOS 5.5 x86_64 host(s) in a directory (e.g. /opt/python2.7). Once that's done, I want to be able to alias the new python binary in .bash_profile so that my developers can begin using it.

I understand 2.7.1 can't be installed on a CentOS host but I've done the above using a shell script successfully. If you search hard enough, I posted my script on line . However, I need to create the RPM for political reasons. Besides placing the source file(s) in the SOURCES directory, what do I need to do in the spec to be able to successfully create an RPM installer?

Please be gentle with me. I've been drinking the Windows cool-aid for most of my IT career so, this is one of my first attempts of becoming a better DevOps Admin.

View 6 Replies View Related







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