15,181 Topics

Member Avatar for
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
141
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
197
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
199
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
243
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
281
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
270
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
124
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
120
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
612
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
231
Member Avatar for spyhawk

[B]I am trying to return True or False by comparing dimension size(width and heights) of two pictures. so i came up with[/B]import media f = media.choose_file() pic = media.load_picture(f) g = media.choose_file() pic1 = media.load_picture(g) x = pic.get_width() * pic.get_height() y = pic1.get_width() * pic1.get_height() [B]but i have no idea …

Member Avatar for Lucaci Andrew
0
255
Member Avatar for wolf29

I have a lot of backup files with names like Corn-Curl-Server_Backup_2002-02-23.tar.gz that makes sense as [hostname]_[comment]_[date of the backup].tar.gz It is easy to scan it with a human eye and discover the backups older than 28 days so they can be deleted, however the files are in separate folders under …

Member Avatar for TrustyTony
0
163
Member Avatar for ustar

hi everyone, following is a part of my assignment and your help will deeply appreciated. Thank you, I'm a complete newbie at python. q) each month should: 1. Calculate the monthly interest payment by multiplying the monthly interest rate, as a fraction, by the remaining principal. 2. Determine the amount …

Member Avatar for woooee
0
1K
Member Avatar for floatingshed

My very reason for getting involved with Python was to use it as a gui for some command line programs, like eac3to, sox and neroaacenc. Previously I'd been using batch in windows and had become quite proficient. In batch, a line to process audio with sox looks like this: [CODE]"tools\sox.exe" …

Member Avatar for woooee
0
257
Member Avatar for moroccanplaya

i have variable a with binary values then i have variable b with another set of binary values, i want variable b to into variable a and stored into variable c, i hope that not confusing a = "01101000011001010111100100000000000000000000" b = "011000100111100101100101" c = "01100010011110010110010100000000000000000000"

Member Avatar for moroccanplaya
0
119
Member Avatar for ihatehippies

Just wanted to point out for anyone using py2exe that it apparently doesn't always (or maybe ever) raise AssertionErrors. It's been a while since they've updated the program so it's probably just easier to implement a workaround for those of us who use this compiler. I've noticed it not raising …

0
98
Member Avatar for Thropian

I started into a project in Python,Tkinter. I have a button that I have two images for. I know buttons include the "-relief" option so I can get rid of the border. Now I'm trying to get rid of the click animation border, and have the image on the button …

Member Avatar for floatingshed
0
6K
Member Avatar for fatalaccidents

Hey guys, I've been doing python programming as basically my sole programming language for about a year and have learned a lot (obviously still learning more everyday). I do a lot of computational work so I'm forced to do a lot of bash scripting as well, although I have made …

Member Avatar for moroccanplaya
0
361
Member Avatar for hasanatkazmi

Hi, I am struck in a big problem. I am creating a JAVA ME application which requires to consume web services created at my server using SOAPpy. I am using netbeens for creating JAVA mobile application. Netbeans has a web services import feature from where you can simply paste WSDL …

Member Avatar for TrustyTony
0
887

The End.