Programming :: Initializing Pmw Megawidgets For Python 2.6

Oct 12, 2010

I am having a problem initializing the Pmw megawidgets for Python 2.6.I have Pmw_1_3 loaded in the site-packages directory.

View 1 Replies


ADVERTISEMENT

Programming :: Initializing A Structure To Zero?

Nov 20, 2009

I have a struct (small instance so not using code brackets )

struct random {
int a;
int b;
}example;

What i am trying is

example={0,0};

and it gives an error how to initialize all the entries within a struct to zero? In the above example i have used integers but what if they are some other data structure for example another structure?

View 2 Replies View Related

Programming :: Initializing A Variable In C?

Nov 5, 2010

Following is the way I saw a variable initialized in C

Code:

static const unsigned int rtl8139_rx_config =
RxCfgRcv64K |
(RX_FIFO_THRESH << RxCfgFIFOShift) |
(RX_DMA_BURST << RxCfgDMAShift);

on following link

[URL]

I have initialized variables in past but above initialization I could not understand what is it?

View 4 Replies View Related

Programming :: Semaphore Used Without The Initializing?

Nov 4, 2010

I am using semaphore.h I declared a variable of type sem_t. I am able to use the variable without even calling sem_init or sem_open, and it is working properly.if the variable is automatically assigned some value? Also would I run into any trouble doing so?

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 :: Initializing Arrays In The Bash?

Mar 12, 2009

I'm making script for automated compiling of one program which would output builds optimized for many architectures. For clearancy, I do each build in it's own catalogue and list of builds with their respective catalogues would be stored as array. I'm using this guide as reference. It describes making array as naming a variable with additional brackets denoting it's position in array.

In my code, it looks exactly like this:

Code:

mtune[1]="build/mtune/athlon"
mtune[2]="build/mtune/athlon-4"
mtune[3]="build/mtune/athlon-mp"

[code]....

But upon invoking $mtune or any $mtune[x] variable, output is blank, like the variable(s) were never initialized. What am I doing wrong?

View 1 Replies View Related

Programming :: Error While Executing Scripts And Initializing Exe's?

Oct 13, 2010

I am having the following error while executing script and initialing my application

./ss.sh: line 1: kk.sh: command not found
./ss.sh: line 2: mon.exe: command not found

Can somebody assist ASAP.

View 4 Replies View Related

Programming :: C++ - Initializing Static Member Array?

Jun 7, 2011

The code below defines an array of structures in a class. I would like this to be a Static array and then initialize the array in a initialization method. I understand that initialization lists are the way to go but due to the size and complexity of the array I plan on using (the example below is a simple snippet that illustrates the problem) I would like to use the initialization method. However, I cant even get this thing to compile. The error says the reference to the ArrayOfStructs in the initialization routine is undefined.

l_long_Island

P.S. This is the error message

undefined reference to `ClassWithStaticArray::ArrayOfStruts'

class ClassWithStaticArray {
public:
struct IntegerStruct
{

[code]....

View 5 Replies View Related

Programming :: Declaration A Variable In One File And Initializing In Another?

Nov 25, 2010

I made 2 files which are different from the program above one is temp1.h and another is temp2.c to understand how extern is used. So here is temp1.h

Code:

#include<stdlib.h>
typedef struct node * bond;
extern int jk;

and temp2.c is

Code:

#include<stdio.h>
#include<temp1.h>
struct node {
int data;

[code]...

I had declared jk in temp1.h as an extern int so why can I not initialize it in temp2.c?

View 5 Replies View Related

Programming :: Initializing The SS Register (Intel Architecture)?

Jul 9, 2011

Kernel 2.6.21.5, slackware 12.0 as 2.17 [I am speaking here about 80x86 processors, with their segment registers SS, DS, CS, ES.] In a source file for as, I wrote

Code:

.section _STACK
.rept 4096
.word 0
.endr

Now, in the .text section, I want to initialize SS, the stack segment, to point to the _STACK section. In other assemblers, there was a special section for the stack, and the linker cared about initializing SS. Here I use a common section for the stack. For a segment such as DS, I could write

mov ax,_DATA
mov ds,ax

But I don't think mov ax,_STACK would do with as/ls.how do I initialize SS?

View 4 Replies View Related

Programming :: Initializing My Application - Error While Loading Shared Libraries ?

Oct 14, 2010

While initializing my application the following errors is returned:

Bash profile for the user is as follows:

View 1 Replies View Related

Programming :: Initializing A Branch In One Launchpad Project On Multiple Computers?

Mar 25, 2010

initializing a branch in one Launchpad project on multiple computers, or even upon reinstalling an OS? I know I sure haven't.

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 :: 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

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

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 :: Accessing Python Scripts Using Web?

Mar 17, 2011

I am using Centos. I have written some scipts in python that access my routers and fetch the configuration, etc. Now i was thinking of creating a web interface which i can access from my windows XP. I want it to have good look n feel :-),

View 7 Replies View Related

Programming :: C++ Or Python - Create 3D Animation ?

Jan 25, 2009

I want to create 3D animation and also make some big programs. Is python capable of that? or should I stick to C++?

View 3 Replies View Related

Programming :: Linking Options For Python?

Dec 11, 2010

I am trying to build an application that must link with python so as to load a python module during runtime.I have this makefile :

Code:
[alex@iskandhar src]$ cat Makefile
CFLAGS = -Wall -O3 -I ../../../SPOOLES.2.2 -DARCH="Linux" -DSPOOLES -DARPACK

[code]....

View 4 Replies View Related

Programming :: List Sorting In Python?

May 10, 2011

I have a list of list and I'd like to sort the list according to the last value of each row.

Let's say we have the list

L1 = [ [1,2] , [4,6] , [78,-3] ]

I wish to get

L2 = [ [78,-3] , [1,2] , [4,6] ]

Is there a simple way to do that in python?

View 4 Replies View Related

Programming :: Parsing S-Expressions In Python?

Feb 1, 2011

I've been loosely following this:http://norvig.com/lispy.htmlAnd I have a problem: the parsing function throws an array out of bounds exception. I thought that maybe I'm doing it wrong, so I copy and pasted the code from the page, and still the same error

View 2 Replies View Related

Programming :: Python - Global Name Not Defined

Jun 17, 2011

I found an interesting screencast online about how to make gtk Pyton apps. The thing is, though, the guy was using the interactive shell. I've been trying to get his code into a script, and have been having troubles.

Here's what I got:

Code:

It spits out the error "NameError: global name 'browser' is not defined"

I know I'm doing something wrong with how I'm telling it where to find "browser" and "text", but I can't figure out how to point it to the right place.

View 5 Replies View Related

Programming :: Python - How To Avoid Spaces

Oct 1, 2010

In the code below:

Code:

The output is:

Code:

Looks like the "," operator in the print inside the loop is adding a space for its own.

I want to print the sequence WITHOUT spaces. Something like this:

Code:

But I couldn't figure out how to do this.....

How to print a sequence, inside a loop, without that space ?

View 14 Replies View Related

Programming :: Python: Get The Return Value Of The Last Function?

Jun 13, 2010

But it's been hell finding an answer, or I just don't know what to look for..I have a prompt that asks for a float, and if the user doesn't put in a valid number, then it should die with an error message.

Code:
def die_with_error():
print 'ERROR: You didn't specify a valid number!'

[code]....

View 2 Replies View Related

Programming :: Python Program For Time ?

Jun 24, 2011

I need to write a program for time. like i have 2 tasks both minutes and hours.

like this
1st task=5 hours and 30 minutes
2nd task=2hours and 45 minutes

Together they will take 8 hours and 15 minutes.

I need to write a program thats called ADDTIMES to do something like this.

This is what i have so far.

H1=int(input("enter the number of hours:")) etc..

View 6 Replies View Related







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