15,181 Topics

Member Avatar for
Member Avatar for floatingshed

I'm running a command line app from a Python script: [CODE]os.system(myapp)[/CODE] myapp contains the path to the app and the required parameters. It works fine but it runs at, I believe, Normal priority which makes the PC sluggish. How can I start the external process at a lower priority? Thanks.

Member Avatar for floatingshed
0
152
Member Avatar for ozzyx123

hi everyone i am very close to finishing my first program in python, but there are two things in the way. first of all the code highlighted in red reads the number of pages of pdf files in a directory. my problem is that it is in a for loop …

Member Avatar for britanicus
0
194
Member Avatar for AJkiter

Ok some of you might've seen my post from yesterday about the weekend challenge game thing i'm doing with a friend. The link to my post yesterday is [url]http://www.daniweb.com/software-development/python/threads/416633/1777493#post1777493[/url] Anyway, now im trying to make a shop type thing but im having trouble writing a script (or whatever you call …

Member Avatar for TrustyTony
0
108
Member Avatar for ozzyx123

hi everyone i am currently building a program which logs into an email, extracts information like the date, sender, subject, number of copies, and takes any attachments and puts them into a directory, than takes the number of pages of the pdf. i have already built a program which does …

Member Avatar for peter_budo
0
652
Member Avatar for Stanzilus

Hello all, I am new to python and working on a school project to import an SQL query with python and have it print out results then save them to a file location. This is what I have so far and wanted to know what I am missing or if …

0
33
Member Avatar for lfmconsummates

So this program is supposed to take a letter the user wants to replace, and store that in a dictionary. At the end, it asks the user to enter a message and it's supposed to decode it, cross-referencing the dictionary and replacing any letters within it to the newly assigned …

Member Avatar for lfmconsummates
0
186
Member Avatar for crag0

I need to write a script that will check a file and find out what type of file it is. The files I am downloading none of them have extensions and some are binary others txt and html files. I only want to work with the binary files. If anyone …

Member Avatar for TrustyTony
0
176
Member Avatar for hughesadam_87

Hey guys, I've looked over several Google results for basic explanations on [CODE]is / '=='[/CODE] However, I don't think I quite understand enough to know what is the ideal operator for this. [CODE]mylist=[1,2,3] if type(mylist) == list: print 'yes'[/CODE] or do I use [CODE] if type(mylise) is list: print 'yes'[/CODE] …

Member Avatar for Gribouillis
0
163
Member Avatar for xopenex

Hi guys, still Noob here, so i apologize for not using the correct terminology. I will be as detailed and accurate as possible! I've been using QT Designer, and been trying to figure out how to "combine" the GUI ive created with the python script I wrote before making a …

Member Avatar for HiHe
0
2K
Member Avatar for chall77

Hello, I'm new to python and have a requirement to decompress various NRV2B compressed files. I have the python functions for performing this decompression, however I am unsure how to get it working. I have tried making this a module, importing it and then feeding my compressed files as a …

Member Avatar for britanicus
0
277
Member Avatar for AJkiter

Ok so me and my friend are doing a weekend challenge... Whoever makes the best game wins. Im trying to make a game like farmville but its called mineville and its just a little different. My problem is that theres this part in the code that keeps repeating, and i …

Member Avatar for AJkiter
0
1K
Member Avatar for floatingshed

When I run my python scripts I generally run with the console open just to keep an eye on things. I have a script that calls 3 external command line apps one after the other. On one pc all output from these apps appears in the console window and is …

Member Avatar for floatingshed
0
197
Member Avatar for fafa70

hi. i am trying to use two turtles in separate windows simultaneously in python but nothing found yet. i have tried multithreadding but still the same. can somebody help me please. thanks.

Member Avatar for fafa70
0
4K
Member Avatar for puddlejumper406

I have never taken a programing class before but my instuctor wants me to write a program in python i've been looking in the book and still don't even know where to start please any help would be great here's the program she wants You are helping your friend throw …

Member Avatar for puddlejumper406
0
115
Member Avatar for moroccanplaya
Member Avatar for HiHe
0
89
Member Avatar for moroccanplaya

how would you write this function in non oop [CODE] def highlight(self, seq): if "highlight" in self.textWidget.tag_names(): self.textWidget.tag_delete("highlight") i = len(seq) idx = "1.0" while True: idx = self.textWidget.search(seq, idx, nocase=1, stopindex='end') if idx: idx2 = self.textWidget.index("%s+%dc" % (idx, i)) self.textWidget.tag_add("highlight", idx, idx2) self.textWidget.tag_config("highlight", background="yellow") idx = idx2 else: return …

Member Avatar for hughesadam_87
0
119
Member Avatar for karan_kanna

Hi , i have a dump file . i want to load it into a dictionary. i am using pickle load to load it as shown below: pkl_file = open( r'D:\work\dumpfile.dat', 'rb+') FinalTable = {} FinalTable = pickle.load(pkl_file) The problem is it is loading only one key and value from …

Member Avatar for Gribouillis
0
209
Member Avatar for aj9393

I'm am trying to make just a simple text-based adventure game, inspired greatly by Zork. Basically all it is is an IF statement for many possible input so the player isn't constrained to inputting their text in a certain format. Then each section is it's own module so when the …

Member Avatar for woooee
0
363
Member Avatar for chopper25

So im stuck writing a function and was hoping someone would be nice enough to help. My objective is to look at a list of grades such as: [CODE][23 , 64 ,74 , 53 , 55[/CODE] And return a list with the number of grades in each percentage range I.E. …

Member Avatar for woooee
0
591
Member Avatar for hughesadam_87

Hey guys, In prepping for a job interview, I'm trying to eliminate some bad habits and this trivial problem has me realizing how hard that is :'(. The problem: Print a 12 x 12 multiplication table. This is easy.... [CODE]outstring='' for i in range(1,13): for j in range(1,13): outstring +='\t'+str(i*j) …

Member Avatar for hughesadam_87
0
120
Member Avatar for floatingshed

I have a list: [CODE][a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p][/CODE] I would like 4 lists: [CODE][a, e, i, m] [b, f, j, n] [c, g, k, o] [d, h, l, p][/CODE] How would I go about this? Thanks.

Member Avatar for hughesadam_87
0
154
Member Avatar for hughesadam_87

I've followed a tutorial where a Person class was used to illustrate the difference between class and instance variables. Something like: [CODE] class Person(object): population=0 def __init__(self, name): self.name=name Person.population += 1 print 'current population', Person.population Sally=Person('sally') Joe=Person('joe') [/CODE] This example really illustrated the difference between class and instance variables …

Member Avatar for hughesadam_87
0
144
Member Avatar for iraj.jelo

hi friends . i have a sqlite program. i need get stuff data from QLineEdit and add to model & tableView . but i dont know what should I do :( plz help me

Member Avatar for TrustyTony
0
175
Member Avatar for TrustyTony

Sometimes, before optimizing your code, you may end up to have very slow running code in list comprehension statement. Because you have not yet tested the code fully, it easy to loose patience and just interrupt the code. If you are making function, you can insert print statements for verification. …

Member Avatar for Gribouillis
1
1K
Member Avatar for Whiztech

The objective is to have the user guess the letters of a word which has to be the name of an object that can be seen. The user is presented with an array of 26 buttons corresponding to the 26 letters of the alphabet. Additionally the user is presented with …

0
74
Member Avatar for iraj.jelo

Hi friends, I want create a image Button by hovering mouse event as a pushbutton,how i to do?

Member Avatar for iraj.jelo
0
121
Member Avatar for boiishuvo

I am trying to make a python that can remove any occurences of any word in stopwords from the wordlist, but I don't know what is exactly wrong with this program. Any suggestions? [code]STOPWORDS = ['a','able','about','across','after','all','almost','also','am','among', 'an','and','any','are','as','at','be','because','been','but','by','can', 'cannot','could','dear','did','do','does','either','else','ever','every', 'for','from','get','got','had','has','have','he','her','hers','him','his', 'how','however','i','if','in','into','is','it','its','just','least','let', 'like','likely','may','me','might','most','must','my','neither','no','nor', 'not','of','off','often','on','only','or','other','our','own','rather','said', 'say','says','she','should','since','so','some','than','that','the','their', 'them','then','there','these','they','this','tis','to','too','twas','us', 'wants','was','we','were','what','when','where','which','while','who', 'whom','why','will','with','would','yet','you','your'] def remove_stop_words(wordlist, stopwords=STOPWORDS): wordlist …

Member Avatar for HiHe
0
819
Member Avatar for 909kidd

Hello, I and doing a ball bounce project for Vpython and I am trying run the program I wrote. I keep getting an invalid syntax error, but I am unable to find any. Please help. [CODE]from visual import* wallA = box(pos=vector(0,6,0), size=vector(12.1,0.2,12.1), color=color.red) wallB = box(pos=vector(0,-6,0), size=vector(12.1,0.2,12.1), color=color.green) wallC = …

Member Avatar for HiHe
0
176
Member Avatar for floatingshed

I have selected several files with the open multiple files dialog: [CODE][[u'C:\\Documents and Settings\\Administrator\\My Documents\\My Pictures\\chord.jpg'], [u'C:\\Documents and Settings\\Administrator\\My Documents\\My Pictures\\toad1.jpeg', u'C:\\Documents and Settings\\Administrator\\My Documents\\My Pictures\\21369.jpg', u'C:\\Documents and Settings\\Administrator\\My Documents\\My Pictures\\g2.jpg']][/CODE] I want to display the selected files in a nice user-friendly way. Just the filenames, each on a separate …

Member Avatar for floatingshed
0
72
Member Avatar for ozzyx123

hi everyone i am very new to programming and really need some advice. i am currently building a program and one of the things i need is to be able to count the number of pages in pdf files in a directory. i found a script online which is suppose …

0
177

The End.