14,951 Topics

Member Avatar for
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
90
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
69
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
236
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
74
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
105
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
223
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
176
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
80
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
63
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
102
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
210
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
368
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
711
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
373
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
Member Avatar for danholding

i am a newbie to python (well to all programming really) i am having problems with "pywinuato" i have downloaded it and installed it but when i try to import it, it states that there is no module names "pywinauto" am i missing something. also i tried deleting it and …

Member Avatar for cghtkh
0
367
Member Avatar for TrustyTony

From [url]http://stackoverflow.com/questions/228181/zen-of-python[/url] Tells you what is Zen of Python Actually this is enough to print the Truth: [CODE]import this[/CODE] Loop version from [url]http://stackoverflow.com/questions/3559124/dissecting-a-line-of-obfuscated-python[/url] [CODE]result = [] for c in this.s: ## fixed tonyjv if c in this.d: result.append(this.d[c]) else: result.append(c) print "".join(result) [/CODE]

Member Avatar for TrustyTony
0
518
Member Avatar for novice20

while trying to configure yapsnmp-0.7.8, i get the following.. checking for patch... patch checking for kstat_open in -lkstat... no checking for socket in -lsocket... no checking for HMAC in -lcrypto... no checking for init_snmp in -lsnmp... no configure: error:[B] Couldn't find libsnmp [/B] what might be the reason?

Member Avatar for novice20
0
162
Member Avatar for udev

Hi! I want to read from a set of documents and put the information into a matrix[x][y] , where x is the document and y is a boolean field denoting whether a particular word appears in the document x or not. So each row would have y fields/dimensions where i …

Member Avatar for udev
0
114
Member Avatar for novice20

hi... is there any MIB parsing tool which generates an excel file or like that can be queried?

Member Avatar for jice
0
47
Member Avatar for patrickm129

Hello, I'm trying to learn Python to get ahead in school but don't know where to start. I already have a shell and SW installed on my machine to write the code, but I can't find a good index of the codes. What would you suggest I do or learn …

Member Avatar for cghtkh
0
243
Member Avatar for craffel

Hi all, long time lurker and first time poster. I'm writing a Python program which does analysis on mp3 files, so I'd like to read in the mp3 data as a numpy array. I'm using pymad, which seems stable and works well. When you read in a frame of data …

Member Avatar for craffel
0
194
Member Avatar for Gribouillis

I thought users of the python forum could be interested in a seminar conference by Guido van Rossum about the design and implementation of the python language, so here is the link [url]http://irbseminars.intel-research.net/GuidoVanRossum.wmv[/url] (it may be easier to download the file first instead of reading it directly from your browser)

1
112

The End.