15,175 Topics

Member Avatar for
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
138
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
280
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
Member Avatar for anilk

Hi All, I am a total newbe to python. I am using some already available code to send email from commandline using my Gmail account. For the piece of code smtp = smtplib.SMTP('smtp.gmail.com', 587) I get a error ################ Traceback (most recent call last): File "Mail.py", line 44, in <module> …

Member Avatar for Stefano Mtangoo
0
1K
Member Avatar for pocnib

I need to write a Python program which parses webpages and returns a dictionary of unique words and their frequenies. What I came up with was [CODE]#!/usr/bin/env python from HTMLParser import HTMLParser, HTMLParseError import urllib import urlparse import sys import os import MySQLdb import re class WordHarvester: def __init__(self): self.db …

Member Avatar for woooee
0
433
Member Avatar for happymadman

Hi Is there a way to check if a float is a whole number eg 10.0, 7.0 or somthing.0 I'm doing problem 5 on project eular Mayby I have the complete wrong idea here is my code: [code] numbertobetested = 0.0 loop2 = 1 while loop2 == 1: numbertobetested = …

Member Avatar for sneekula
0
98
Member Avatar for Puppetmaster

Is it possible to have a program run multiple functions at the same time? Connectionist neural network programming seems suitable for object oriented languages. But brains seem to be able to have multiple faculties working all at the same time, and in orchestra with each other. BTW I'm a complete …

Member Avatar for Prahaai
0
103
Member Avatar for kruglok

I got first part by creating it using for loop. But got stuck on while loop. Would you see what I'm doing wrong. # Calculating number of vowels using for loop count = 0 word = raw_input("Please enter a phrase: ") for letter in word: if letter in "aeiou": count …

Member Avatar for jlm699
0
17K
Member Avatar for wotthe2000

Is there any way of finding words in a 10 x 10 grid, going horizontally and vertically? For example, if i had a text file with the following in: xxxplanexx xrxxxxxxxx xexxxxxyxx xdxxxxxexx xxxxxxxlxx xxxxxxxlxx xxxxxxxoxx xxxxxxxwxx xkingxxxxx xxxxxxxxxx how would you be able to find the words red and …

Member Avatar for Murtan
0
252

The End.