15,190 Topics

Member Avatar for
Member Avatar for novice20

while trying to install net-snmp-5.6, i get following error [B]gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.5 -c netsnmp/client_intf.c -o build/temp.linux-i686-2.5/netsnmp/client_intf.o netsnmp/client_intf.c:1:20: error: Python.h: No such file or directory In file included from /usr/local/include/net-snmp/net-snmp-includes.h:69, from netsnmp/client_intf.c:4:[/B] my debian system has python2.5.2 where can I find Python.h header …

Member Avatar for Gribouillis
0
568
Member Avatar for dustbunny000

I am having problems with tuples. I have a list of tuples that have (x,y,z) coordinates. Each coordinate is a float. How can I calculate the distance between two coordinates? Can you do this with tuples? [CODE]coord=[] for line in CN_list: x=line[30:39] y=line[38:47] z=line[46:55] coord.append((float(x),float(y), float(z)))[/CODE]

Member Avatar for griswolf
0
95
Member Avatar for lewashby

Minimal Server [CODE]import socket s = socket.socket() host = socket.gethostname() port = 1234 s.bind((host, port)) s.listen(5) while True: c, addr = s.accept() print 'Got connection from', addr c.send('Thank you for connecting') c.close()[/CODE] Minimal Client [CODE]import socket s = socket.socket() host = socket.gethostname() port = 1234 s.connect((hos[/CODE]t, port)) print s.recv(1024) These …

Member Avatar for Gribouillis
0
124
Member Avatar for Archenemie

Im making a custom text editing program as a mini project and id like a little advice on the way to go about it. Within wx python I could use a rich text box or a textctrl box I believe. The type of things I am going to need my …

0
65
Member Avatar for P!th

I heard this forum was a wonderful place to ask programming related questions. So here I am, I'd like to know if anybody has a solution to a problem I'm having. I'm currently planning on creating a game on Python, and I've decided to make use of a joystick in …

Member Avatar for P!th
0
232
Member Avatar for Abhishek2805
Member Avatar for cghtkh
0
55
Member Avatar for softbrianes

[CODE]def egcd(a,b): u, u1 = 1, 0 v, v1 = 0, 1 while b: q = a // b u, u1 = u1, u - q * u1 v, v1 = v1, v - q * v1 a, b = b, a - q * b return u, v, a …

Member Avatar for Schol-R-LEA
0
103
Member Avatar for pacers10

The problem is to get a random list of numbers from a list This is what i have so far.[CODE]import random def numberShuffle(myList): sList = [] nNumbers = len(myList) for i in numbers: j = random.randint(i) return (sList) [/CODE]

Member Avatar for TrustyTony
0
61
Member Avatar for pacers10

I think i have the function for mean but i also need to figure out below mean. This what i have so far.[CODE]import math def mean(alist): belowMean = alist mean = sum(alist) / len(alist) if mean <= alist: belowMean = item return belowMean [/CODE]

Member Avatar for Schol-R-LEA
0
91
Member Avatar for pacers10

I am having trouble trouble figuring out this problem any help would be appreciated. The problem wants you to change english into pirate language. Using the string split and join methods. This is what i have so far. [CODE]import copy def wordReplace (wordText): wordDict = { "hello" : "avast" , …

Member Avatar for Schol-R-LEA
0
79
Member Avatar for corrwee

Hi, guys I'm having trouble writing this word count program in python3. I've been able to find alot of help for past versions but nothing for 3. It is just a simple word count program, with a user input sentence. So far I have [CODE] def main(): print ("This program …

Member Avatar for griswolf
0
237
Member Avatar for tushartyagi

For my final year project, I plan to write a cloud server using Python. The client will be written by the other team member in Java. The first and foremost problem I have is make the necessary communication between the server and clients. For server to client talk, I thought …

0
59
Member Avatar for Syphilis

Ahoy Sailors! So I'm making an application using py2exe, Now as we all may know files get a tad hefty, I've trimming un-needed modules, Compressed the remained and finally compressed the resulting exe with UPX. Currently I've built the file under Python2.3 (Earlier the version, The smaller the dll). However …

Member Avatar for Syphilis
0
75
Member Avatar for Sci@phy

Hello. I've just started learning Python and I have a few questions. I'm using my program to communicate with some device through serial port using serial.py library. It's all going really fine. I've got a class device, and I'm using it to communicate with a device (logical ;) ). Q: …

Member Avatar for Sci@phy
0
110
Member Avatar for Don Monroe

Hi, I am a beginner with python,and have this assignment that buggs me for some while..hope smb can help me...now, the thing is that I have merged the lists of view point positions of the camera in an function:[CODE] mergeList=list() def linear_merge(list1, list2): mergelList = [] for item in list1: …

Member Avatar for TrustyTony
0
314
Member Avatar for peachdot

Hi there, i used tabControl. In first tabpage, user need to fill in the textboxs(ie:Name,id number,age,address,etc.) Then "Next" button click, a summary of what have been entered in 1st tabpage need to be display in second tabpage. i tried using label to display, self._label12.Text = self._textBoxName.Text self._label14.Text = self._textBoxAge.Text but …

Member Avatar for woooee
0
178
Member Avatar for rajashekharv

hi All, Looking for the python code which adds the lines to existing file at the beginning of the file. Tried using the seek method but not able to succeed. Can any one please help on this ?

Member Avatar for Gribouillis
0
81
Member Avatar for PaulStat

I'm trying to use the [url=http://docs.python.org/library/logging.html]logging[/url] module for python (2.6), whenever I try to use one of the handlers however it claims it doesn't exist. For example [code] import logging.handlers.SMTPHandler [/code] Gives me the error [quote] Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module …

Member Avatar for PaulStat
0
65
Member Avatar for ghingghing

we have a project on our finals and we need to make a program of payroll using menu with the output of employee name, update employee record. display employee record, delet record and exit in the main menu. .we are using the c++ program. .hope u can help me thank …

0
43
Member Avatar for DragonReeper

Okay basically I want to load an image and skew it. Does anyone have any suggestions how I can accomplish this? For a visual representation of what I want to do [CODE]+-+-+-+ |o|o|o| +-+-+-+ |o|o|o| +-+-+-+ |o|o|o| +-+-+-+ To: +-+-+-+ |o|o|o| +-+-+-+ |o|o|o| +-+-+-+ |o|o|o| +-+-+-+ [/CODE] The o's are …

0
68
Member Avatar for Saboo-Coder

Hello, friends! How can you resize an image in Python without using any image modules. Our teacher said that we can ONLY use the MEDIA module - no other modules allowed! So, how would you resize an image in this case? Here is the task that our teacher gave us: …

Member Avatar for TrustyTony
0
104
Member Avatar for novice20

hi.... I am doing an snmpwalk on MIB variables and dumping the output to a text file. I dont need all the info and need to read only a part of it. How can this be done efficiently in python?

Member Avatar for ptmcg
0
224
Member Avatar for Vibze

Hello, i want to pass variables in url with slashes for example if the url is [url]http://host.com/script/2008/05/05[/url] the script would get 2008, 05 and 05 as variables (year,month,day) i'm using mod_python/publisher. Thanks in advance

Member Avatar for Schol-R-LEA
0
2K
Member Avatar for udaydce

A is [[ 0. 2. 0. 0. 0. 4. 0. 2. 0. 4.] [ 0. 0. 0. 8. 4. 0. 0. 1. 8. 0.]] B is [+0.016 +1.950 +0.016 -0.028 +0.121 +4.007 -0.016 +2.008 -0.028 +4.009 ] [-0.536 -0.121 -0.536 +7.684 +3.856 +0.179 +2.230 +0.358 +7.684 +0.214 ] When I …

Member Avatar for Gribouillis
0
76
Member Avatar for udev

I want to set the last 7 columns in the given matrix. Here is the code I used [CODE] temp = mat('[6 0 0 0 0 0 0 0 0 0; 0 0 0 0 0 2 0 0 0 4; 0 3 0 0 0 0 0 3 0 …

Member Avatar for Schol-R-LEA
0
83
Member Avatar for gishi

Hi Guys, I was hoping someone can help me with this. I have a python program that reads and writes files in utf-8(unicode). When I run it in Eclipse, the output is perfectly fine. When I try making an exe file of my program it is not working. I also …

Member Avatar for TrustyTony
0
369
Member Avatar for novice20

i have a problem... within my python script which does an snmpwalk, there should be an intelligence to create a static table which maps OIDs to corresponding text strings, query the table and in the output of snmpwalk, i need to replace the numeric string with its textual string.. for …

Member Avatar for woooee
0
119
Member Avatar for --Fire--

Hi As a part of my semester project, I am supposed to do a Python based OS. The key idea is, simplest OS that lets you boot successfully and run some simple command line scripts, like how DOS works, but in Python and runs Python. I am completely baffled as …

Member Avatar for Archenemie
0
738
Member Avatar for snow56border

I am working on an assignment in python. The goal is to make a function with two parameters, one for a string and the other for a pattern. If the pattern appears in the string, the program must return true, or false if otherwise. Also, the pattern can accept *'s …

Member Avatar for TrustyTony
0
374
Member Avatar for pythonlearning

just write this function for a recursion trace back, but it become a infinite loop and won't get into the next level of recursion. I cannot find the problem, many thanks! p_value gotten from a matrix outside, tested that and it is OK. status, i, j pass form main and …

Member Avatar for Gribouillis
0
75

The End.