15,181 Topics
| |
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 … | |
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 … | |
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. | |
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 … | |
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 … | |
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 … | |
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. | |
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 … | |
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 … | |
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 … | |
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 … | |
Can anyone tell me how to get what keys are pressed in VPython? | |
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 … | |
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 … | |
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 … | |
[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 … | |
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 … | |
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 … | |
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 … | |
| 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? |
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: … | |
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 … | |
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 … | |
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 … | |
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 … | |
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> … | |
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 … | |
Hi guys! I 'm new in python and i don't how can I capture resize event on root, can anybody help me? | |
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 … | |
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", " … |
The End.