15,179 Topics

Member Avatar for
Member Avatar for python01

Hi all, does anyone know if there is already a module or something floating about that would let me create apps for my itouch all responses are appreciated, python01

0
51
Member Avatar for KrazyKitsune

If we have a number -2.0, -1.0, 0.0, 1.0, 2.0, 3.0 etc, can we remove the floats with minimal usage of if statements? I know that we can round down, but it wouldn't work in case we get a float like 1.2435532, or something similar. Note: Note that the list …

Member Avatar for Gribouillis
0
48
Member Avatar for novice20

I want some insight into /etc/apt/preferences and /etc/apt/sources.list file on debian

Member Avatar for Gribouillis
0
43
Member Avatar for Wumbate

I'm trying to make a Python script that makes a HTTP POST with some headers, and with a file as the body. I've found all sorts of documentation online about making a HTTP POST with headers, but can't figure out how to make the POST with a file as a …

0
44
Member Avatar for knan

I have 2 lists X=['a'] Y=['b','c','d','e','f'] I need to make a new list Z such that, Z = ['ab','ac','ad','ae','af'] I know this uses simple concatenation. I tried several times but without success. I am a beginner so please help me with the code. Thanks in advance.

Member Avatar for Gribouillis
0
113
Member Avatar for Ultralisk

Hi I've been pulling my hair out over this program. It is uses a Class for creating objects to be used in an ordering tracking system. I'm having problems calling the objects and implementing them. I'm trying to follow a structure along these lines When an order is created payment …

Member Avatar for Ultralisk
0
156
Member Avatar for sss33

Convert the following code to a for loop while (b < a) : b = b + 1 print b

Member Avatar for snippsat
0
44
Member Avatar for nk28

Hello all, I am in need of a simple plotting library in python that can work according to the given specification. I have around a million entries of data which I need to represent on a graph. The problem is that most of the libraries need a list for plotting …

Member Avatar for Gribouillis
0
145
Member Avatar for python01

whenever i want to use urllib or urllib2, i get this error IOError: [Errno socket error] (10035, 'The socket operation could not complete without blocking') i have tried googling it yet i havent found anything helpful any help is apreciated, python 01

Member Avatar for python01
0
164
Member Avatar for sjones1025

Hi there, I am fairly new to Python and have installed Python 2.6 and IronPython 2.6 for .net 4.. I am attempting to write my first script and can't get past my first line of code, which is just import clr I get the error ImportError: No module named clr …

0
46
Member Avatar for PaulStat

I'm trying to use pythons logging.handlers.SMTPHandler with a configuration file (so that I don't have to have passwords etc. inside of the script) Now the guide I'm following is [URL="http://docs.python.org/library/logging.html#configuration-file-format"]here[/URL], now the RotatingFileHandler is working, but I never receive an email, or an error for the SMTPHandler. Anyway here's the …

Member Avatar for Gribouillis
0
1K
Member Avatar for dustbunny000
Member Avatar for Nick Evan
-1
85
Member Avatar for python01

hi all, im fairly new to python and am struggling to find out how to read javascript values from a site. Help is much appreciated. thanks, Python01

Member Avatar for python01
0
247
Member Avatar for dustbunny000

Say I have two lists: list1=[a,b,c,d,e,f,a,b,c] list2=[a,c,d] How could I compare list1 and list2 such that I would get an output like: list3=[match,-,match,match,-,-,-,-,-] So that it goes in order Here's my code: [CODE]h=[] for i in range(len(change2)): for j in range(len(atom)): if atom[j]==atom[i]: h.append("H") else: h.append("-") print h[/CODE] Both change2 …

Member Avatar for Gribouillis
0
116
Member Avatar for dustbunny000
Member Avatar for Gribouillis
0
226
Member Avatar for Megabyte89

Sorry if this is in the wrong thread, I haven't been here in a long time. Hi, I'm having a hard time in trying to position my wx.StaticText and wx.TextCtrl so that it's not stuck at the very top and very left. Life so [URL="http://i154.photobucket.com/albums/s274/Tye-Ann/daniweb.png"]Screenshot Here[/URL] Here is the code …

Member Avatar for Megabyte89
0
979
Member Avatar for G-Do

Here's something of mine that might actually be useful: a Python implementation of the K-means clustering algorithm. I wrote something similar last year in Java for a school project, and decided to rewrite it in Python this summer for practice. The purpose of the algorithm is to discover internal structure …

Member Avatar for woooee
2
1K
Member Avatar for jeffrey.pry

Hey, I am trying to use multiprocessing via the Process module. I run two processes in unison and for some reason python or the os kills my process after roughly 50 seconds or during long processes (~3 min). I just get the following output: File 3 of 8 2010-10-11 13:28:09.090816: …

Member Avatar for woooee
0
164
Member Avatar for arareyna

Hi everyone.. I'm new to python, the more to matplotlib :( and I am hoping that I can get help from this community... :) I have a .csv file, first column is a time stamp with format HH:MM:SS, next 8 columns are values of different parameters. I want to plot …

Member Avatar for Gribouillis
0
3K
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
567
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
123
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
78
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

The End.