15,175 Topics

Member Avatar for
Member Avatar for Namibnat

I am new to working with Django, and have found it really fun and interesting to develop with. But I have been trying to upload it to a hosted server and just not getting it to work. I have followed the instructions they give, but just not getting it to …

Member Avatar for Namibnat
0
221
Member Avatar for jop-pop

Hi, Need to do a project where the data from a HTML form is sent to Python, and then repackaged and sent back out as HTML. Problem is, I'm having issues with Python. When I run the form information with Python, I get this error: [QUOTE]There was an error with …

Member Avatar for Beat_Slayer
0
443
Member Avatar for sebcbien

Hello I'm currently working on a program which read 16bit(565) BMP files. I've tried hard to read them with pyQt and show them directly but it never worked properly, the image were not read properly even with the good format as argument. So I've decided to call a wx App …

0
61
Member Avatar for ryuurei

I had been working on this program for a while. It was inspired by the slowness of Windows' search feature. I made it so I could simply look for files to see if/where they existed quickly. I eventually added in the feature to delete files. It was no major extension …

Member Avatar for tls-005
3
449
Member Avatar for NightKev

I've been putting together a player list for a sort of risk-like webgame-type thing me and a friend are working on, and I'm having trouble getting some text to display on a webpage. Here's the code: [CODE=Python]from django.http import HttpResponse class players: def info(self, name, territory, color): self.name = name …

Member Avatar for tls-005
0
162
Member Avatar for Tech B

I'm going to start learning web development useing Django. I'm following the tutorials on their site and when I run "python manage.py runserver" i get a traceback saying: [code] Traceback (most recent call last): File "manage.py", line 11, in <module> execute_manager(settings) File "C:\Python26\lib\site-packages\django\core\management\__init__.py", line 362, in execute_manager utility.execute() File "C:\Python26\lib\site-packages\django\core\management\__init__.py", …

Member Avatar for tls-005
0
217
Member Avatar for frogy

Hi, I am trying to obtain the equation of a best fitted plane to a cluster of 3d points in python. I run into a problem when all of my points are on the same plane, for example z=0. My minimum eigenvalue obtained from my matrix ends up being 0 …

Member Avatar for ultimatebuster
0
141
Member Avatar for Fearx351

I am new to python and am actually using python as a result of taking a computer science class in college. I am writing a program to fit a hypothetical scenario. Well I have ran into a problem..Please help me! the traceback and snippet are below. [code] def high_Priority(): ## …

Member Avatar for Fearx351
0
140
Member Avatar for lewashby

[CODE]import pygame from pygame.locals import * from sys import exit from random import * pygame.init() screen = pygame.display.set_mode((640, 480), 0, 32) while True: for event in pygame.event.get(): if event.type == QUIT: exit() random_color = (randint(0, 255), randint(0, 255), randint(0, 255)) random_pos = (randint(0, 639), randint(0, 479)) random_radius = randint(1,200) pygame.draw.circle(screen, …

Member Avatar for lewashby
0
1K
Member Avatar for lewashby

[CODE]import pygame from pygame.locals import * from sys import exit from random import * pygame.init() screen = pygame.display.set_mode((640, 480), 0, 32) while True: for event in pygame.event.get(): if event.type == QUIT: exit() screen.lock() for count in range(10): random_color = (randint(0, 255), randint(0, 255), randint(0, 255)) random_pos = (randint(0, 639), randint(0, …

Member Avatar for TrustyTony
-1
306
Member Avatar for WildBamaBoy

I don't really know how to word what I want to ask so please bear with me. I'm making a program that will start up a game server written in Java and read the outputs and edit the packets so that I can modify this game. It will read outputs …

Member Avatar for WildBamaBoy
0
77
Member Avatar for Musing888

Using the following code I am trying to check the users input string (CAcodes) and checking each one individually by assigning each element in CAcodes to a list (CAcode). A for-loop checks the conditions to make sure that the conditions for each code are met. The main for-loop tests several …

Member Avatar for TrustyTony
0
271
Member Avatar for vegaseat

Python programming can have its lighter moments. Here we use one of those moments to draw an optical illusion using the Tkinter canvas to draw a rectangle, some lines and circles.

2
680
Member Avatar for davidkhan

Hello, can anybody convert python code that read openstreetmap xml file from [url]http://github.com/rory/python-osm/blob/master/pyosm.py[/url] i try to translate but with the lack of knowledge of python , never get it done. Even approximate conversion that will be greate. [CODE]#! /usr/bin/python import xml.sax class Node(object): def __init__(self, id=None, lon=None, lat=None, tags=None): self.id …

0
48
Member Avatar for leegeorg07

Hi all, I currently have some code: [CODE]import time import Tkinter as tk root = tk.Tk() pass_entered= False def show_pw(): pw = pw_entry.get() if pw == "password": label2['text'] = pw pass_entered==True return pass_entered else: label2['text'] = "Sorry, wrong pass" def logoff(mins): lbl1.config(height=3, font=('times', 20, 'bold')) for k in range(int(mins), 0, …

Member Avatar for leegeorg07
0
119
Member Avatar for doomas10

Hello all, How are you? Hope well. Just a quick question. I have a file which contains abstracts (small texts) and i am looking for certain keywords and their frequency. These keywords are provided from another file. I was thinking to read the keyword file first and the perform a …

Member Avatar for doomas10
0
299
Member Avatar for Simplified

Hello all Just joined the site - mainly due to the fact that 7/10 times I Google a problem this site comes up :) Not looking for an easy ride, but can someone point me in the direction of a site/tutorial that shows how to run a loop periodically? What …

Member Avatar for Simplified
0
92
Member Avatar for Ultralisk

[CODE]totalRows = int(raw_input ("Please enter a number: ")) for currentRow in range(1, totalRows+1): for currentCol in range (1, currentRow+1): print '*', print print for currentRow in range (1, totalRows+1): for currentCol in range(1, currentRow+1): print '*', print[/CODE] Output * * * * * * * * * * * * …

Member Avatar for Ultralisk
0
116
Member Avatar for cnuzzo

I am trying to use an event box with a label inside to create a custom button. I found an example online to create a button using an event box but when I tried to load the event box button into a VBox I ran into errors. Does anyone see …

Member Avatar for woooee
0
244
Member Avatar for Beat_Slayer

ITunes Library Persistent ID Editor. Sample usage: [CODE]fxml = 'iTunes Music Library.xml' # path to xml file fitl = 'iTunes Library.itl' # path to itl file itk = ITunesLibKeys(fxml, fitl) print itk.file_xml # prints path to xml file print itk.file_itl # prints path to itl file print itk.xml_key # prints …

0
1K
Member Avatar for Kruptein

Hey, I've been not so active for the past months, but that's because I was working on a litle project called Deditor. It's a text-editor for linux. The thing that makes it special is that it is made for python and thus has some python-specific features like, syntax-highlighting, interactive interpreter, …

Member Avatar for redyugi
0
100
Member Avatar for rahul8590

i did go thru a google search and found some functions .. but those results where horrifying , i guess i am using a wrong method of finding time . [code] def test(): "Stupid test function" L = [] for i in range(100): L.append(i) if __name__=='__main__': from timeit import Timer …

Member Avatar for Beat_Slayer
0
841
Member Avatar for anurag.kyal

I have a forked child process running which executes a system command killing the child using os.kill(child_pid, SIGKILL) stops the child process but the system process continues ! Can something be done to stop the system process also? A part of the code is something like this: #Child child_pid = …

Member Avatar for jcao219
0
156
Member Avatar for personx1212

hi, i have this problem with wx.toolbook : this is the first page class : class newPanel(wx.Panel): def __init__(self, Parent): wx.Panel.__init__(self,Parent,id = -1) self.SetBackgroundColour('yellow') frame = wx.Frame(None,size=(400,400),pos=(500,300)) toolbook = wx.Toolbook(frame,-1, style=wx.BK_LEFT) il = wx.ImageList(32, 32) bmp = wx.Image(r'c:\python26\img.png',wx.BITMAP_TYPE_PNG).ConvertToBitmap() index = il.Add(bmp) toolbook.AssignImageList(il) toolbook.AddPage(newPanel(toolbook), 'xxxx', index) ------------------------ the 'img.png' is 32 …

0
55
Member Avatar for ryuurei

I am looking for some ways to have my Python code access a video stream on ustream and have the program create a user account by entering a username, password, and email address, and then have it then send a message to be entered into the chat. Does anyone know …

0
71
Member Avatar for deeapk_kapdi

Hi, I am a beginner in Python. I have created 1 script in notepad++ and trying to execute the script from command line but it's giving an error. I have set the PATH of Python in the environment variables also. Can anyone send me the complete steps for executing the …

Member Avatar for TrustyTony
0
9K
Member Avatar for jenzilla

Hi.. I've been trying to get this to work for hours now but I'm not understanding what to do. Basically I'm creating a quiz on python with 5 questions. I have a function that is only for the quiz. Another function is to display the highest quiz score. I want …

Member Avatar for Beat_Slayer
0
4K
Member Avatar for ish13

I am having a problem with the data I have collected. When I write the data to a file it is shown like this. (231.2314,32434.344,134.2342,345.345,1234.45) (2323.567,32.6754,12323.8776,12323.575,233.5673) now when I read data and put it in a list it looks like this. data = ['(231.2314,32434.344,134.2342,345.345,1234.45) \n','(2323.567,32.6754,12323.8776,12323.575,233.5673)\n'] is there any way i …

Member Avatar for TrustyTony
0
189
Member Avatar for fekioh

I am new in Python. I wrote a program that reads-in large text files using xreadlines, stores some values in lists (and arrays) and does some calculations. It runs fine for individual files, but when I try to consecutively process files from a folder, I get a memory error. my …

Member Avatar for TrustyTony
0
154
Member Avatar for lewashby

[CODE]import pygame from pygame.locals import * from sys import exit from random import randint pygame.init() screen = pygame.display.set_mode((640, 480), 0, 32) while True: for event in pygame.event.get(): if event.type == QUIT: exit() rand_col = (randint(0, 255), randint(0, 255), randint(0, 255)) for _ in xrange(100): rand_pos = (randint(0, 630), randint(0, 479)) …

Member Avatar for vegaseat
0
258

The End.