15,181 Topics

Member Avatar for
Member Avatar for harrykokil

Hi guys.. Im stuck on my project and i urgently need ur help. i want to randomly generate some moving rectangles (one after another moving in the same direction). this should occur infinitely. So far i have only managed to create one moving rectangle. i hope u guys can help …

Member Avatar for harrykokil
0
462
Member Avatar for rbracco

Hi, I am trying to login to a site which is a pretty standard process when using the ClientForm library. My problem is that when I login I am redirected to a site that says another user is logged in on the account and to click to continue and kick …

Member Avatar for rbracco
0
95
Member Avatar for MaxManus

Hey, what does figure() and show() do? I have tried help in ipython, but I still don't understand other than my program sometimes stop when I don't use them.

Member Avatar for MaxManus
0
81
Member Avatar for Raygoe

Well, for the first time it seems I have stumbled onto a bug I have never been able to figure out with google. Application Type: wxPython 2.8.9.1 (Python 2.6 Version ANSI) Python 2.6 py2exe 0.6.9 Anyways, I compiled an application that uses wxPython. I then proceeded to run the application …

Member Avatar for jbennet
0
150
Member Avatar for Stefano Mtangoo

I'm learning ctypes right now and have made simple function and here is the code [CODE=python] #import ctypes module import ctypes as ct #get BOOL C++ value from ctypes from ctypes.wintypes import BOOL #Loading the DLL see: http://www.daniweb.com/forums/thread160430.html bass_dll = ct.cdll.bass #here is function description on the function """ Loads …

Member Avatar for Murtan
0
332
Member Avatar for mikewalsh89

I recently wrote a program to determine perfect numbers..... [CODE]n=raw_input("Please input a number: ") factors = [] p=int(n) for k in range(1): x=0 while x < p-(p/3): x=x+1 z = p/x if p%z == 0: factors.append(z) if factors.count(z) > 1: factors.remove(z) print "The factors are,", factors print "the sum of …

Member Avatar for Murtan
0
119
Member Avatar for bhanu1225

Hi everyone, I am very new to use python scripting language. I am having a doubt that, [COLOR="Red"]how could we write the html programs on python for web applications ? [/COLOR] Please give quick response to my post.

Member Avatar for Stefano Mtangoo
0
78
Member Avatar for codedhands

Hello,am newbie in python.Am trying to write a function that deletes urls in a file.The function accepts the url to be deleted as an argument.I want to use regular expression to match the url in the file and then delete it(maybe replacing it with a white space).My problem is that …

Member Avatar for codedhands
0
121
Member Avatar for jworld2

wxpython question: I am looking for a way to select just a line of text out of many lines of text by just clicking anywhere on the line of text, like what is shown in the attachment. Let's say I have a TextCtrl with lines of text. How would I …

Member Avatar for jworld2
0
115
Member Avatar for kevin07

I am working on an homework assignment and i have got the first half done now i am stuck on the last part. This is what i need to complete now. # Add further attributes to the Account class (account's name, belong to which department, responsible person's name, title, phone …

Member Avatar for kevin07
0
77
Member Avatar for mikewalsh89

Hi, Am a beginner in python. Wrote this program based on the doomsday algorithm to calculate what day of the week corresponds to an inputted date.... at the moment idle rejects the program citing'march4 is not defined'.(line 23) Am i not clearly defining it there?? Please help!! Program text: #Doomsday …

Member Avatar for sillyboy
0
185
Member Avatar for tomtetlaw
Member Avatar for tomtetlaw
0
46
Member Avatar for Dekudude

Hi there! I have been working on an AI program for a while now, and in creating knowledge bases (what does x mean, etc) this small snippet of code has done very well. (just repaste and change variable names / file name) However, I am attempting to modify it to …

0
76
Member Avatar for Littlerocks

Hi,if i have a function A,which can apply a certain rule on a given matrix to generate a another matrix which i call it the next state of the origin matrix,also the function can determine the the final state of the matrix by given times N(apply the rule on origin,and …

Member Avatar for Gribouillis
0
147
Member Avatar for adam291086

Can someone please tell me why this class wont work. [CODE]#!/usr/bin/python import MySQLdb class test: @staticmethod def wanker(): # connect db = MySQLdb.connect(host = "localhost", user = "username", passwd = "Password", db = "test") # create a database cursor cursor = db.cursor(MySQLdb.cursors.DictCursor) # execute SQL select statement cursor.execute("SELECT * FROM …

Member Avatar for adam291086
0
75
Member Avatar for MaxManus

[QUOTE]Make a function [CODE]def rhs(u, t): [/CODE] for returning the right-hand side of the first-order differential equation system from Exercise 11.36. As usual, the u argument is an array or list with the two solution components u[0] and u[1] at some time t. Inside rhs, assume that you have access …

Member Avatar for MaxManus
0
125
Member Avatar for Stefano Mtangoo

I have been trying to learn ctypes so as I can call C++ DLLs in python and have no problem on Loading DLLs. My question are: What are procedures of calling functions in DLLs especially since Py and C++ have different data types? I see argtypes and restypes: What are …

Member Avatar for Stefano Mtangoo
0
531
Member Avatar for tom7tom

I have just started using python and am trying to write a program that generates 500 random numbers in the range (1,100),then counts the number of occurrences of each number and prints the frequency of occurrence. Also i was wondering how could i extend the program to show a bar …

Member Avatar for Gribouillis
0
82
Member Avatar for tomtetlaw

Im learning VPython and im doing a tutorial that i found on the net and i start my program and when i press the red x at the top of the screen the window closes but the pythom shell and the editing window closes aswell, any ideas? heres my code …

Member Avatar for tomtetlaw
0
162
Member Avatar for leegeorg07

Hi again but i seem to have a problem whenever i try to use the sqrt() function it says that sqrt() doesn't exist. can anyone help me?

Member Avatar for shadwickman
0
90
Member Avatar for kruglok

Any one could help me to write a program that lets the user order a hamburger just the way he or she wants it. The GUI should allow the user to enter his or her name. It should also allows the user to select any combination of the following toppings: …

Member Avatar for shadwickman
0
139
Member Avatar for mckillmt

I am trying to program a game and am having trouble with collision detection. I am trying to get the "monsters" to chase the "knight" when the knight gets close. I am using Panda3D to run the game. I have three classes, the Knights Quest, monster, and wasdCamera. I am …

Member Avatar for shadwickman
0
87
Member Avatar for shadwickman

Hi, I didn't really know how to word the title, but I was just wondering if it was possible to write a function and make it accessible as if it was any other str function. It was a simple (but useful) few lines which returned a list of all the …

Member Avatar for shadwickman
0
156
Member Avatar for Prahaai

Good day. I've been trying to port HGE ([url]http://hge.relishgames.com[/url]) to Python for more than 4 months now... HGE is a hardware accelerated 2D game engine. It comes with the source and examples. In the folder "include", you can find "hge.h", the file that i am talking about in all the …

Member Avatar for Prahaai
0
282
Member Avatar for mn_kthompson

I've been trying to step into learning wxpython, so I followed some examples on the web and put together this very simple application. The good news for me is that it is working almost exactly as I would expect it to. I do have a couple of questions for the …

Member Avatar for Stefano Mtangoo
0
478
Member Avatar for Andrew Wiggin

I am trying to use shutils to copy a folder but it throws errno 13 at me. The traceback points to open() as the culprit. I wrote a test script: open(raw_input("Filename: ")) this is the result: Filename:e: Traceback (most recent call last): File "C:\Documents and Settings\talvey\Desktop\testOpen.py", line 1, in <module> …

Member Avatar for lllllIllIlllI
0
16K
Member Avatar for Piratenaapje

I'm currently developing a Google Reader Notifier for linux (check it out at [URL="http://grnotify.sf.net"]http://grnotify.sf.net[/URL] if you're interested), and need to be able to open the users default webbrowser and login to google reader automatically. I currently do this using the webbrowser module, and then using the command webbrowser.open("http://google.com/reader"). But this …

Member Avatar for EAnder
0
98
Member Avatar for vasioky

Hi guys! I 'm new in python and i don't how can I capture resize event on root, can anybody help me?

Member Avatar for vasioky
0
58
Member Avatar for Littlerocks

Thanks in advance. I am wriiting a code about Conway's game of life,and i am a beginner of python,have looked at my code for hours,still couldnt find out the bug...when i run it,it doesnt work....only return the same matrix as the test code given..anybody can help with check it would …

Member Avatar for Littlerocks
0
116
Member Avatar for Gribouillis

Python 3.0 comes with a builtin [icode]print[/icode] function which breaks old code. In order to write code wich is compatible both with the 2.x series and with the 3.x series, I'm using the following [icode]Print[/icode] function [code=python] import sys def Print(*values, **kwd): fout = kwd.get("file", sys.stdout) sep = kwd.get("sep", " …

Member Avatar for Gribouillis
0
167

The End.