15,175 Topics

Member Avatar for
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
145
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
248
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
Member Avatar for Cayris

I'm trying to make a simple program that prompts for a password and then continues to a different section of the program, else loops back to the original prompt for the password. I can't find a way to do this other than to use external things - such as text …

Member Avatar for Cayris
0
136
Member Avatar for giancan

Dear all, I built 2 script to manage 2 different frames (which I will then convert to exe with py2exe). Frame 1 (GG1) is like this [CODE]import wx # begin wxGlade: extracode # end wxGlade class MyFrame(wx.Frame): functions here ... if __name__ == "__main__": app = wx.PySimpleApp(0) wx.InitAllImageHandlers() GG1 = …

Member Avatar for woooee
0
312
Member Avatar for jobs

How do I get datalist to string? >>> days = 24/6 >>> print days 4 >>> hours = 45/7 >>> print hours 6 >>> datalist = [] >>> datalist.append(days) >>> datalist.append(" days ") >>> print datalist [4, ' days '] >>> datalist_str = "".join(datalist) Traceback (most recent call last): File …

Member Avatar for cementovoz
0
855
Member Avatar for vlady

Hello! Here is the code, pls have a look fist: [CODE]class Cstudent(): def __init__(self, name): self.name = name self.subjets = [] self.mark = [] def add_subject(self, subject): self.subjets.append(subject) def add_mark_student(self, subject, mark): subject.add_mark(mark) def __str__(self): return 'I am object of student: %s'% \ (self.name) def print_list_of_subjects(self): lst = [] for …

Member Avatar for vlady
0
116
Member Avatar for FALL3N

[CODE] import os; def callAS(cmd): os.system(cmd); def selectFile(): callAS("""osascript -e 'tell application "Finder" to return choose file "Select the file:"'""") def fixPath(raw): arr = raw.split(' '); return(str(arr[1])); thePath = selectFile() thePath = fixPath(thePath); print(thePath); [/CODE] When the above code is run in IDLE, it just gives an error. But, when …

Member Avatar for FALL3N
0
290
Member Avatar for vegaseat

The code shows a fast prime number generator using a sieve algorithm. It looks at only odd numbers. Technically 1 and 2 are prime numbers too, since they are only divisible by unity and themselves, exceptions are made for 1 and 2. Zero and negative numbers return an empty list. …

Member Avatar for Mavericks
1
3K

The End.