15,175 Topics
| |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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", … | |
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 … | |
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(): ## … | |
[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, … | |
[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, … | |
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 … | |
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 … | |
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. | |
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 … | |
| 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, … |
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 … | |
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 … | |
[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 * * * * * * * * * * * * … | |
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 … | |
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 … | |
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, … | |
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 … | |
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 = … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
[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)) … |
The End.