15,190 Topics

Member Avatar for
Member Avatar for 69MASTER

Hey i'm trying to place a ship onto my grid but my translation function is trying to iterate over None type, if someone would write a simple horizontal ship placement in translation function i'm sure i can finish the rest, thank you! [CODE]class start(object): def __init__(self): self.GameT = int(raw_input("One Player …

Member Avatar for woooee
0
434
Member Avatar for DanWebb3148

[CODE]sizeA = 2**28 M = [0]*sizeA[/CODE] The above code creates an array but, each element is 4 bytes each. How do create a large byte array with type 'B' (eight bits unsigned)? I would like it to be as large as possible. I need it for a sieve prime number …

Member Avatar for DanWebb3148
0
971
Member Avatar for n3red

Hi. I have a small dilema. I have 1 Picassa .ini file a contacts.xml file and a few images all in the same folder. On the images there are certian people, picassa.ini file holds the image name and id's of people included on that image in such format: [CODE][img_8538.jpg] faces=rect64(4ac022d1820c8624),d5a2d2f6f0d7ccbc …

Member Avatar for wortelkoek
0
231
Member Avatar for PythonIsCool

For school I have to write a program that requests a 3 part name and breaks it into a first, middle, and last name. I wrote the code but the alignment of my output is not right. I was wonderng if someone can tell me what I did wrong and …

Member Avatar for TrustyTony
0
168
Member Avatar for blindg35

Hello guys, just joined the community. Found it through google. :) I am basically new to python, only couple of days of knowledge. I am trying to make all the words in a txt file appear in 4 or 5 in a row. so the txt file looks like this: …

Member Avatar for woooee
0
252
Member Avatar for ComputerGirlie

For school I have to write a program that requests a 3 part name and breaks it into a first, middle, and last name. I wrote the code but the alignment of my output is not right. I was wonderng if someone can tell me what I did wrong and …

Member Avatar for ComputerGirlie
0
639
Member Avatar for new2pyp

Hi, Just started learning python..and want to learn to do this I want to read a text file that something like 10000 20000 30000 40000 20000 30000 88888 88888 60000 12333 44431 12345 I want to get the difference of numbers in column1 divided by x, where I want to …

Member Avatar for ihatehippies
0
184
Member Avatar for Dillary

(I'm new to programming in general) I created a program in python without an interface and part of it used a raw_input to get a users answer and compare with a stored answer. This was in a loop that limited the number of attempts the user could have. This worked …

Member Avatar for Dillary
0
411
Member Avatar for Lucaci Andrew

So, even thou I have searched throughout the forums, I couldn't get a clear answer, maybe perhaps I'm a noob @ Python. As a beginner, I don't know much about Python, and it's frustrating to search the net and not find the actual answer. So, I'm working on this project, …

Member Avatar for Lucaci Andrew
0
320
Member Avatar for vlady

Hello, pls can anybody show how works printing? here is the code: [CODE]class Student(object): def __init__(self, name): self.name = name self.report = dict() def add_subject(self, subject): self.report[subject] = list() def subjects(self): return self.report.keys() def s_subjects(self): lpre=[] for subject in self.subjects(): lpre.append(str(subject)) print lpre class Subject(object): def __init__(self, name, teacher = …

Member Avatar for Gribouillis
0
95
Member Avatar for DJ-DOO

Hi.. I'm a first time poster so please excuse any idiocies.. I'm a third year software design student and I am on my Industrial placement. I have been given the task of parsing 100's of word documents. I am required to extract the information stored in certain tables and export …

Member Avatar for TrustyTony
0
142
Member Avatar for Netcode

Hi everyone! Am new to python, getting grounded in it as fast as i can but now, i have some issues. I use the web2py framework for web development. At the moment, am working on a blog using one of the CMS (named InstantPress) designed in web2py also. While editing …

Member Avatar for Lucaci Andrew
0
198
Member Avatar for layneb131

i've been having trouble figuring this out since im new to python and i really wanna figure it out! Write a Sentinel controlled While loop that allows the user to enter text until they enter ! by itself. Output would be like this: Enter some text: Hi Enter some text: …

Member Avatar for TrustyTony
0
1K
Member Avatar for knnchau

Hi, I'm pretty new to python, just started 2 weeks ago xD, and new to forum too, I tried to search to see if there were any other question that was similar to this but couldn't find one. Therefore, I apologize if there's already another thread with the similar problem. …

Member Avatar for knnchau
0
200
Member Avatar for python-noob

I have a problem that I have been working on. I felt like I was getting close just to find out with wasn't the 100% correct way of doing it. What I need to do is take a list of names from a file in the format last, first, middle. …

Member Avatar for ihatehippies
0
245
Member Avatar for Matjame

Hi team. I have the below code working 100% on my local machine. It makes the required updates and I am happy with it. But when I try to run it from the server, it gives the attached error message. Please ignore all other lines(I have just removed other lines …

Member Avatar for woooee
0
2K
Member Avatar for scott_liddle

Hi, firstly i'm gonna be honest and say that this is homework for my programming class, but the teacher doesn't have a problem with us using the internet to get help aslong as we dont blatantly steal code. The problem is to take a text file containing for example the …

Member Avatar for Lucaci Andrew
0
171
Member Avatar for MarcusMaximus

Hi. I'm new to python. First off I'd like some advice on where to find modules for python that I can trust don't do anything malicious. There seems to be a lot of modules availible for python but how do I know that they only do what they advertise they …

Member Avatar for MarcusMaximus
0
283
Member Avatar for CrAzD

Hello, I have some networking questions for anyone. What library(s) is best for the following task. Obviously in python. I have 2 servers and an undetermined amount of clients(<100). 1 of the servers is a game server. 1 Server will be used as a "middle man" server that sends commands/info …

Member Avatar for joehms22
0
114
Member Avatar for akshay.nikhare

i using this code for making a page but the images are not showne in web browser win i deploy the script please help..... [CODE] def get(self): self.response.out.write(""" <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>my page</title> <link href="stylesheet.css" rel="stylesheet" type="text/css" /> </head> <body> <h1>my page</h1> """) f_path=os.path.join (os.path.dirname (__file__),'\image') …

Member Avatar for joehms22
0
271
Member Avatar for hokeysmoke

I have a question...I'm trying to get text out of a website containing Spanish characters (like ñ or á) using urllib2 (and with #-*- coding: latin-1 -*- near the beginning of the Python file). However, when I write the output of the text to a file, I get something else--for …

Member Avatar for hokeysmoke
0
3K
Member Avatar for Bauke
Member Avatar for hughesadam_87

I have data which has a very particular format that I'm trying to store in a numpy array. avi_05MSalt00001.txt 2012 Feb 07 20:12:41 50000 (usec) 300 10 I've defined the following numpy datatype: [CODE]timefile_dtype=numpy.dtype([ ('filename', file), ('year', int), ('month', str), #Why don't these work? ('day', int), ('time', str), ('int_time', int), …

Member Avatar for hughesadam_87
0
1K
Member Avatar for moroccanplaya

is there a way to keep the format of a html source code for example when you view a source code of a website, is there anyway to keep the same structure, i have tried using read() readlines() i tried saving the source code then opening it up in my …

0
64
Member Avatar for floatingshed

My little GUI runs a command line program which has a progress indicator in the console window. How can I make this data appear on my Gui status bar? Thanks.

Member Avatar for floatingshed
0
125
Member Avatar for moroccanplaya

hi i want to know how i would display i file that has been open and read into the tkinter text widget do i have to write it out the file to a variable than insert it into tkinter text widget?

Member Avatar for woooee
0
121
Member Avatar for winnar

Hey guys! I wrote a small program, which works. Unfortunately, when things get too complicated, it breaks down. The objective is to list the occurrences of vowels in a given word, such that for (word = yellow) and index spits out (e = 1, o = 1) The code KIND …

Member Avatar for woooee
0
235
Member Avatar for Bauke

Hello, Below a part of my code. The part 'for index in range(len(regels))' works but doesn't go through all of the lists in 'regels'. 'regels' is a nested list. [CODE]for row in inputReader: regels = ['Auto','Brandstof auto',' tinq ',' shell ',' tank s ',' dap ',' slump oil ','q8 ','brand …

Member Avatar for Bauke
0
146
Member Avatar for Lucaci Andrew

I have this code, it's basically a program which I wrote, a 'Guess my number' game. The only problem is that I did something, and now I can't choose from my options anything else, that the first option. I put all my conditions in the while True loops, and now …

Member Avatar for Lucaci Andrew
0
613
Member Avatar for philipalex

Hello, Friends, I am new to python, currently I have a requirement to use python to create a mapreduce job in HADOOP... I searched every where but couldn't get any lead. 1) First I need read a KEY, VALUE pair from the Hadoop sequential file. 2) Secondly, need to uncompress …

Member Avatar for philipalex
0
232

The End.