15,181 Topics
| |
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), … | |
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. | |
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 … | |
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): … | |
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 … | |
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 … | |
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" … | |
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 … | |
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 … | |
I programming project "ChildrenEditor". This is editor written in python/tkinter. Here write your own mistakes is not resolved. Please help solve them. | |
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. … | |
| |
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. | |
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] | |
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 … | |
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 … | |
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 … | |
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() … | |
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. … | |
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 … | |
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 … | |
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]. | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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! | |
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 … | |
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] |
The End.