15,181 Topics

Member Avatar for
Member Avatar for momartin

I need to run several commands more than 400 times for a mass number of files. Therefore, I'm trying to incorporate the commands in to a python script to automate the processes. Even though the commands run successfully in the the windows command prompt (I have manually tested the commands), …

Member Avatar for Gribouillis
0
1K
Member Avatar for TrustyTony

Dig up this for discussion thread request and some Googling. By little experiment found the different forms for sending message commands. Could no send in Python3 the code of program itself so only simple test "Hello". Sorry that subject is left incorrectly refering program name.

Member Avatar for JoshuaBurleson
3
2K
Member Avatar for Skrell

Newbie here! I am trying to make a simple python program that when called from the command line, would search all the .txt files in a given directory for a given string inside the files by typing something like this > python mygrep.py ":" "C:\" Also, i want to specifically …

Member Avatar for TrustyTony
0
206
Member Avatar for jfussion

hi can't figure out what's wrong with my code. I'm trying to create a frame without a titlebar but still movable. When I run it, I can't drag the frame. hope you can help as soon as possible thanks a lot! cheers! here's my code: [CODE] import wx class MyFrame(wx.Frame): …

Member Avatar for TrustyTony
0
79
Member Avatar for kaskoraja

Hello friends, I have a list similar to ['9.48E+02', '9.42E+02', '9.79E+02', '9.58E+02', '9.28E+02', '9.47E+02'].List has around 9000 elements. I need to convert this list in to file with a format similar to 9.48E+02 9.42E+02 9.79E+02 9.58E+02 9.28E+02 9.47E+02 so that i can access it in another mechanical software i.e without …

Member Avatar for kaskoraja
0
159
Member Avatar for SnackDude

Having problems with the TypeError below: [code]order_list = ['25459 ', '12381 ', '25375 '] cursor.execute("SELECT WVGID6 , WVWHID, WVITNO, WVLOCA FROM WMRSV WHERE OHORNO IN (%s)"% tuple(order_list)) TypeError: not all arguments converted during string formatting[/code] The correct SQL should look like: [CODE]SELECT WVGID6 , WVWHID, WVITNO, WVLOCA FROM WMRSV WHERE …

Member Avatar for woooee
0
193
Member Avatar for jakethepython

I am new to python and am making a program with the wxpython module and no matter what I try I get a NameError: global name 'outp' is not defined?? Can someone help? Here is the code, it is fairly complex: [CODE]import wx class jake(wx.Frame): def func1(self,event): global foo foo+="1" …

Member Avatar for woooee
0
841
Member Avatar for go_big12

I have searched without success for a way to format the text in a Tkinter OptionMenu List. Specifically, I want to use some subscripted letters. Something like: from Tkinter import * root = Tk() types = ['Kd', 'Koc'] type = StringVar() typewidget = OptionMenu(root, type, *types) typewidget.grid() I need specifically …

Member Avatar for woooee
0
470
Member Avatar for SpiritualMadMan

OK, I have a Class for a Frame that is basically 24 labels in a stack like an old terminal Screen. There are two Functions included in the Class: AddLine and Clear (Will add "Exit") I want to launch an instance of this Class in it's own Thread and Pass …

Member Avatar for SpiritualMadMan
0
158
Member Avatar for zygimantelis

I programming project "ChildrenEditor". This is editor written in python/tkinter. Here write your own mistakes is not resolved. Please help solve them.

Member Avatar for zygimantelis
0
122
Member Avatar for Danielle87

I am trying to search for a word out of these 2 Principles. But by code displays both of the principles not just one. How could I make it display [U]only[/U] the principle where the word is located. [CODE] import re patterns = [ 'work' ] text = """\ 1. …

Member Avatar for TrustyTony
0
170
Member Avatar for kur3k
0
42
Member Avatar for TrustyTony

Here is example how data can be summed to dictionary or you can use numpy.histogram to sum the data as weights of the categorized data.

Member Avatar for Stackheuw
2
2K
Member Avatar for Danielle87

SyntaxError: invalid syntax (on else) Any help? [CODE]import re words = ['cats', 'cates', 'dog', 'ship'] for l in words: m = re.search( r'cat..', l) if m: print l else: print 'none' [/CODE]

Member Avatar for Danielle87
0
77
Member Avatar for Reverend Jim

I thought I'd play around with vPython so I wrote a 3D breakout game (I used to have one on my Amiga and I haven't seen one for Windows). Everything is done except for one wee problem. I want to idle while waiting for the user to click the left …

Member Avatar for Reverend Jim
0
265
Member Avatar for ali13

Hi I thought iI would try to teach myself how to program, so sorry if this has been asked before but I could find it. What I am trying to do is limit an input to of an int to 50 or less with out the program throwing up an …

Member Avatar for ali13
0
3K
Member Avatar for Thropian

I have a script written up that takes an image and displays it. I originally intended to have the image then have parts fall away, but I am having trouble getting parts of the image to move separate. Is there a simple way to do this or am I going …

Member Avatar for Thropian
0
252
Member Avatar for JoshuaBurleson

I'm having issues with a third level Toplevel in tkinter, that is to say having a toplevel popup from another Toplevel. [CODE] self.emailbttn= Button(self, text='Email', command=self.clientchooser) def clientchooser(self): showing.withdraw() client_choose() def client_choose(): global client client=Toplevel() client.title=('Choose Email') client.geometry=('800x600') Client(client) class Client(Frame): '''Choose Email Client''' def __init__(self,master): super(Client, self).__init__(master) self.grid() self.create_widget() …

Member Avatar for TrustyTony
0
196
Member Avatar for Danielle87

I am trying to search for a word or multiple words out of the given text. How could i assign different words to each principles so if the word searched for is amongst the assigned text that particular paragraph will be triggered. Any help will be greatly appriciated. Thank you. …

Member Avatar for TrustyTony
0
141
Member Avatar for tommygee100

Hi All, I'm Trying to solve this puzzle for my script: Let's say we have 3 lists, A,B and C with the following elements 'A' = [5,3,1] 'B' = [6,5,2] 'C' = [2,0,-2] I want to go through all 27 combination sequentially, looking for a combination that is 'valid' AND …

Member Avatar for TrustyTony
0
344
Member Avatar for maddocspace

Hello there, Sorry, unfortunately python parsing is not my main activity, it does not print the last block of the statement. i should get: *elset, elset=top_s1 1, 2, 3, 4 *surface, name=top, type=element top_s1 If i add in the test2 file a line such as *surface, name=bot, type=element then it …

Member Avatar for maddocspace
0
213
Member Avatar for TrustyTony

I finally modernized this code. It is very primitive, but it is nice to have basic version, even it does a lot of mistakes. You could add features, like repetition elimination, or you can check the compete chatbot: [url]http://www.jezuk.co.uk/cgi-bin/view/software/whereskal[/url].

Member Avatar for TrustyTony
0
919
Member Avatar for JoshuaBurleson

After marking gofish up to a temporary loss I've moved back to my address book. The issue I'm currently having is that webbrowser is opening the wrong broswer. I've set my default browser to firefox (currently using windows vista), and yet the program is still opening IE, however when I …

Member Avatar for snippsat
0
3K
Member Avatar for bomko

i have this 2 custome modules and when i try to call module turtle i get an error message and i dont know what it means or better said i dont know where seems to be a problem. i think it should work just fine this is the message i …

Member Avatar for bomko
0
166
Member Avatar for imGhostofYou

Hi, I am a very new programmer, I started dabbling with python script only 2 days ago because I was on a quest to build a [URL="http://en.wikipedia.org/wiki/Roguelike"]roguelike[/URL] game, and I found a good informative tutorial on how to do this using python and an API called libtcod. So I figured …

Member Avatar for imGhostofYou
0
365
Member Avatar for SamarthWiz

Hi I am trying open a record from a shelve db I Know that it stops working at `copy = db[opened]` But why please help ASAP #*****START VARIABEL BLOCK***** #file = the database/shelf file #db = the database/shelf object #tapp = to be appended/recorded to the database #keys = a …

Member Avatar for SamarthWiz
0
303
Member Avatar for DevourOfDarknes

Hi, This is just part of a bigger program I'm writing, but at the moment I don't know how to do what I'm about to say. So first, the user enters a sentence. Now, I have a text file with sentences to match it to. So let's say the first …

Member Avatar for DevourOfDarknes
0
2K
Member Avatar for ramp08

Can someone please help me understand where I am going wrong, I am supposed to convert a string of ASCII to text: [CODE] seq=input("enter string ASCII numbers to be converted into text: ") for x in range(0, len(seq)): seq2=chr[seq[x]] print(seq2) [/CODE] Any help will be appreciated!Thanks!

Member Avatar for snippsat
0
91
Member Avatar for luofeiyu

i have written a program in tkinter to draw stock graph,there are two strange thing i can't understand the attachment is 'AAU' data file(attachment 1).when you download it ,please save it in /tmp/AAU there is a scrolled canvas in it , 1.strang long line,please see my attachment. i have see …

0
70
Member Avatar for JoshuaBurleson

I have no idea what went wrong with my most recent code, but I suspect it has something to do with the following so I'll start there. Did I do something wrong in this? [CODE]cards=['1','1','1','1','2','2','2','2','3','3','3','3','4','4','4','4','5','5','5','5','6','6','6','6','7','7','7','7','8','8','8','8','9','9','9','9','A','A','A','A','K','K','K','K','J','J','J','J','Q','Q','Q','Q'] import random random.shuffle(cards) h1=[] for card in cards[1:7]: h1.append(card) cards.remove(card)[/CODE]

Member Avatar for TrustyTony
0
226

The End.