15,179 Topics

Member Avatar for
Member Avatar for TrustyTony
0
515
Member Avatar for hughesadam_87

Hi guys, I've downloaded 2 cached_property implementations from the internet and both did not work correctly for my programs. Does anyone here used a cached_property function that works really well and could share with me?

Member Avatar for hughesadam_87
0
242
Member Avatar for vegaseat

I am exploring some of the PySide (PyQT public) widgets like the combo box, and how colors are applied ...

2
2K
Member Avatar for birch18

I am trying to make an input output file using inFile and outFile.write and got a character buffer object error how do I fix this?

Member Avatar for M.S.
0
52
Member Avatar for vegaseat

This Python code shows you how to get a current list of currency values (Canadian Dollar = 1.00) via the internet.

Member Avatar for TrustyTony
0
478
Member Avatar for Alkajak

I'm fairly new in python. This code is supposed to create an Operand class where the function is take a string like 563b9, split it so that the integer is 563 and the base is 9 and then convert it to decimal. All I have done is split the string …

Member Avatar for woooee
0
1K
Member Avatar for MissAuditore

Hi, I have a csv-file with Date in first column, pressure in second and temperature in third (a lot of data). Small example below: 08/08/2012 09:26:01,14.334,26.379 08/08/2012 09:26:02,14.329,26.376 08/08/2012 09:26:03,14.337,26.394 08/08/2012 09:26:04,14.324,26.421 I want to extract from t1 to t2 and then calculate the elapsed time (t2>t1). My code so …

Member Avatar for vegaseat
0
857
Member Avatar for cruze098

Hi, This is my code: def update_cost(self,newcost): if self.view.curselection() == (): tkMessageBox.showerror(None,'No Item Selected') else: for key, value in self.products.mydict.iteritems(): check1=self.products.mydict[self.select_id()].get_depend() if check1==[]: v=self.products.get_item(self.select_id()) v.set_cost(int(newcost)) self.write() else: tkMessageBox.showerror(None,'Cannot Update Cost Of Compound Item') def select_id(self): index = int(self.view.curselection()[0]) item = self.view.get(index) return item.split()[0] view is just a class which inherits …

Member Avatar for vegaseat
0
383
Member Avatar for bintony.ma

I have a test.txt like this: GCOORD 5.98400000E+03 1.19901791E+01 8.29785919E+00 -1.10000002E+00 GCOORD 5.98500000E+03 1.25401793E+01 8.84785938E+00 -6.59999990E+00 GCOORD 5.98600000E+03 1.30901794E+01 9.39785957E+00 -1.21000004E+01 BNBCD 3.66000000E+02 6.00000000E+00 4.00000000E+00 4.00000000E+00 4.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 BNBCD 4.17000000E+02 6.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 BNBCD 5.16000000E+02 6.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 BNBCD 5.58000000E+02 …

Member Avatar for bintony.ma_1
0
452
Member Avatar for crag0

I am trying to get the md5 hash of a file. It seems the md5 I am getting from the script is different than the actual md5. If anyone could point me in the direction needed it would be great. for dir, dirs, file in os.walk(path) if file == (filename): …

Member Avatar for crag0
0
324
Member Avatar for techyworld

Hi, I write some data(Hello) in a file copy.txt. I read from the file copy.txt to convert the text "hello" to ASCII and then i store it in another file copy1.txt. It saves the ascii like this in the file copy1.txt: 104101108108111. Below is the ascii of each character: 104 …

Member Avatar for vegaseat
0
277
Member Avatar for fdama

Hi, I'm new to python and I am trying to write a 'Guess the number program'. I am however getting the following error message: Traceback (most recent call last): File "C:\Users\fdama\Documents\python\GuessMyNumber.py", line 8, in <module> guess = false NameError: name 'false' is not defined I don't know why I am …

Member Avatar for snippsat
0
211
Member Avatar for jacobcarrick

Hey there, I need help writing a python program that takes your input and gives it back in a pig latin type way. This is what i got so far: [code=python]running = True while running: word = raw_input("Enter word:") if word[0] in "aeiou": print word + "way" else: print word[1:] …

Member Avatar for fecaled
0
2K
Member Avatar for anishxx323

How do i write a python code so that my list of numbers can be updated within an elif cause? I start off with an empty an empty list then from there i have to ask the user how many new scores they want to add to the list then …

Member Avatar for TrustyTony
0
270
Member Avatar for nerdnapster

Hello guys, I have a program created that opens a program and execute it as well. For example: filename = raw_input('Input a valid NAPS filename -> ') execfile(filename) I put my file helloworld.naps (my file extension) And it execute smoothly. Now my question is, how to verify the user input …

Member Avatar for nerdnapster
0
122
Member Avatar for amit9876

hi, I am developing a FIX client using python which is then meant to be executed using the "quickfixj" server. I have done the connectivity of python client with the "quickfixj" server. my roadblock : please help me how should I write the FIX protocol messages in the python client. …

Member Avatar for TrustyTony
0
28
Member Avatar for nerdnapster

I'm creating a simple module that have a cin and cout functions. This will accept the user input and display it afterwards. Just like this: text = napster.comein("Enter a number: ") napster.getout(text) I have a problem in the function code because I'm an amateur in python programming. This is my …

Member Avatar for nerdnapster
0
116
Member Avatar for techyworld

Hii need help for writing user input in a file. The following code is writing only the last word in a file. For example if user type "hello world", it will save only "world" in the file. I want to write the whole sentence in the file. for i in …

Member Avatar for TrustyTony
0
164
Member Avatar for techyworld

Hi, I write some data to a file called original.txt in python, then i read the file original.txt ,convert watever in the file to string(str), then write it in another file called copy.txt. Now i want to read the copy.txt and output it in python itself. It does not display …

Member Avatar for techyworld
0
364
Member Avatar for cruze098

How can you use a class 1's method in another class 2. Class 2 does not inherit class 1.

Member Avatar for Gribouillis
0
154
Member Avatar for mohsin.javaid.73

Hello Everybody. I am using Python for my code. I am trying to create folders at the end of a path. My path is /xxx/xxxx/xxxx/TEMP. I want to dynamicaly create folders after this path in my program. I want something like: /xxx/xxxx/xxxx/TEMP/Folder1. /xxx/xxxx/xxxx/TEMP/Folder2. /xxx/xxxx/xxxx/TEMP/Folder3. At the moment I am using …

Member Avatar for mohsin.javaid.73
0
134
Member Avatar for krystosan

Hello, I want to know and understand how and when do we need to implement classes in our code, I have written a program in python just using functions but never feel the need of using classes, so I was thinking when we can create something without classes why do …

Member Avatar for krystosan
0
189
Member Avatar for snakesonaplane

One thing I have been struggling with is moving from developing in Python to utilize Python on the web. All my web is currently handled with php, mainly through easy to install scripts/cms's such as Drupal, Wordpress and Joomla. Why? Because it is easy and they do 95% of what …

Member Avatar for snakesonaplane
0
238
Member Avatar for fml2012

Hello, I'm new to python and would really appreciate your help. for j in range(0,13): if files.startswith(name + ' ' + str(j)): do stuff This works for j= 0-9, but for j = 10, 11, 12 etc, it just sees the first numerical digit (eg.1). I assume I don't want …

Member Avatar for TrustyTony
0
157
Member Avatar for chao.lee.927

To display system clock time in LCD format I just want to display system clock time in LCD format, also want the time to be displayed with the format of hh:mm:ss ,my code is as following ,but when I run it ,it is out of my expectaions ,so anyone can …

Member Avatar for chao.lee.927
0
392
Member Avatar for shanenin

I am just back messing around a bit with programming. I am trying to clear out the mental cobwebs. I thought any non empty string evaluates to True. but according to my code, it does not apear so word = 'abc' if word is True: print 'yes' else: print 'no' …

Member Avatar for Gribouillis
0
108
Member Avatar for krystosan

class gui(): def selCon(self): print selection def create(self): inst=gui() cmds.button(l="Connect to Selected",command='inst.selCon()') I keep getting error saying name 'inst' is not defined # dont understand when method is in the same class and when I am making a call clicking the button i get this error message

Member Avatar for vegaseat
0
281
Member Avatar for mohsin.javaid.73

Need some hints/help in a stupid little problem. I have a list of files in a listbox. I want to get a selection of files from the list, add them in a playlist and play it using VLC. But I dont know how to start that bit. Any help will …

Member Avatar for glenwill101
0
143
Member Avatar for jaynew

Hi, i was having problem with a question i encountered. It was to create a life path program using python. However, i have no idea where to start. It says first to input the data for day, month and year. then it said to convert each day/month/year to a single …

Member Avatar for jaynew
0
116
Member Avatar for stevelll

I’m looking for a programming language that will: 1. Automate desk top processes running under Windows XP, like clearing the recycle bin & clearing recently accessed documents-programs under ‘Customize Classic Start Menu’, & 2. Open a Corel Paintshop program, run that program’s procedures & options, like optimizing photos, save the …

Member Avatar for tutux
0
171

The End.