15,194 Topics

Member Avatar for
Member Avatar for Krstevski

Hello friends, I have created simple rss reader class, but the class contains many loops and didn't work correctly and if anyone wants to help me with code, example, tutorial etc... I would be very grateful. The code of the class you can see on the following link: [url]http://pastebin.com/F7zQdhAW[/url] Thanks...

0
68
Member Avatar for Robbert

Hi I need some help with sizers. I just can not get my head around it and i cant find much on the net about what i am trying to achieve. I am not even sure if i need a grid sizer or two box sizers. This is what i …

Member Avatar for Robbert
0
88
Member Avatar for JonKho

Dear all, My window layout looks like this.. [img]http://i41.tinypic.com/hu27ax.jpg[/img] First, the dialog box that consists of listbox would appear to ask for user input. After the user input has been given, It will display in the next windows.. I have been trying to intergate the two coding together. However I …

Member Avatar for JonKho
0
223
Member Avatar for shusshoku

I'm using python for a project and was curious if anyone knew whether it was possible to open up jpg files in a GraphWin window. Also, the image software I'm using with it is PIL, if that helps.

Member Avatar for bumsfeld
0
74
Member Avatar for pubudugokarella

I'm new to here.so i posted it on the code thread pls go through it and help me [url]http://www.daniweb.com/code/snippet271890.html[/url]

0
81
Member Avatar for bumsfeld

[code]#Blast workbench using biopython from Bio.Blast import NCBIWWW ##result_handle = NCBIWWW.qblast("blastn", "nr", "8332116") fasta_string = "AATTCAGTGGCAAAAAAAAAACTCAAATTTTAGGGAAGGCCCTAATATTATCAAATAATTAGAGGGGGGG" result_handle = NCBIWWW.qblast("blastn", "nt", fasta_string) save_file = open("my_blast.xml", "w") save_file.write(result_handle.read()) save_file.close() result_handle.close() result_handle = open("my_blast.xml") from Bio.Blast import NCBIXML for record in NCBIXML.parse(open("my_blast.xml")) : #We want to ignore any queries with no search results: …

0
332
Member Avatar for ultimatebuster

Is python web programming anything like php? Is there simple examples like submitting a form to perform a calculator functions etc?

Member Avatar for snippsat
0
117
Member Avatar for pyprog

I want to remove all the 1's from the sublists so l becomes [[2], [2], [2]] but have trouble keeping track of indices. Can someone help out? [CODE]l = [[1, 2, 1],[1, 1, 2],[2, 1, 1]] i = 0 for element in l: while i < len(element): if element[i] == …

Member Avatar for vegaseat
0
143
Member Avatar for Axel_Carvalho

Hello. I need some help. I have a function [icode]my_function(a, b, c, d)[/icode] which takes string parameters and output them in different combinations. It works well in IDLE, but I would like to output the result into a file. Such code [code=python]file = open("out_file.txt", 'w') file.write(my_function(a, b, c, d)) [/code] …

Member Avatar for Axel_Carvalho
0
131
Member Avatar for pubudugokarella

I'm a bio informatics student who is leaning programming.With the help of this site and other blogs I made this one so far.I need to create a interface which give a text box to enter sequence and a start button and a window that display results.I went through Wx tutorials …

-3
36
Member Avatar for jozz3

Just a quick one- I'm writing code that asks the user for a filename and checks that it exists. If it does it has to print the file's contents, if not print a message. [CODE]import os fileName = raw_input("Enter the name of the file: ") if os.path.exists(fileName) == True: fileName.read() …

Member Avatar for Gribouillis
0
141
Member Avatar for dunwitch

I'm trying to get a SQLite3 DB to populate a wx.ListCrtl. I can get it to print to stdout/stderr without any problem. I just can't seem to figure out how to display the data in the DataWindow/DataList? I'm still learning programing/python so any advice would be appreciated. After two days …

Member Avatar for Stefano Mtangoo
0
830
Member Avatar for soUPERMan

I have this code: [CODE]class Member: def __init__(self, name, typeOM, fee, yearJoin): self.name = name self.typeOM = typeOM self.fee = float(fee) self.yearJoin = yearJoin # Reader Methods def getName(self): return self.name def getTypeOM(self): return self.typeOM def getFee(self): return self.fee def getYearJoin(self): return self.yearJoin def getMemberTypeString(self): if self.typeOM == 'P' or …

Member Avatar for soUPERMan
0
114
Member Avatar for kingmu

Hi, I have serial data that can come in at irregular intervals from a hand held barcode scanner. The scanner continuously looks for a barcode (no button or trigger is ever pressed) and when the scanner captures a valid barcode it sends the code to the PC over serial. What …

Member Avatar for kingmu
0
719
Member Avatar for toll_booth

I'm trying to code the game of Minesweeper. I haven't put in graphics just yet, only text labels on the buttons. Here is my create_widgets method: [code] def create_widgets(self): #Create the grid. self.square = [] self.isAMine = [] for i in range(self.y): row = [] mineRow = [] for j …

Member Avatar for toll_booth
0
173
Member Avatar for dilbert_here00

Hi all, I am trying to open an excel file which is in the same folder as my python script. The script is able to open the file first time, & after that it just throws the following exception: pywintypes.com_error: (-2147352567, 'Exception occurred.', (0, u'Microsoft Office Excel', u"'test .xls' could …

0
73
Member Avatar for chazut

Hello all and thanks in advance for any help you can provide. I'm new to programming in Python and am looking to put todays date parameter passed into a URL string...how would I go about accomplishing this. This is some code I've sort of been messing around with: [start code] …

Member Avatar for chazut
0
6K
Member Avatar for ultimatebuster

[CODE] def dotask(): print "Task done..." def returnvalue(): return "Awesome" cmd = raw_input("Your command: ") eval(cmd + "()") [/CODE] I know that you can't use eval to assign a value to a variable. but is it the best way to have user input be performing a function? For example: I …

Member Avatar for Gribouillis
0
82
Member Avatar for varuab

Greetings, I just want to know how to split a string using values of dictionary: dic = {'': '000', ' ': '011', 'e': '1111', 'g': '10', 'h': '010', 'o': '00', 'p': '1101', 's': '1110', 'r': '1100'} word = '1000011100001110001101010111111001110000' for items in dic.values(): [INDENT]word.split(items)[/INDENT] .... and when i do this …

Member Avatar for woooee
0
155
Member Avatar for vrk6

Hi everyone, I am getting a error when using Xampp with mod_python addon and another python script 1. First I entered a string in a html form and passed it to pyform.py 2.Now in pyform.py, I imported the entire simpledb.py module. 3.Simpledb.py module fetches data from mysql server. Everything till …

0
37
Member Avatar for johnnyd1986

I absolutely can't figure this problem out, can anyone please help? Write a program that asks for a phrase and then calculates and displays the number of vowels in the phrase, twice. The first time, your program should calculate the number of vowels in the phrase using a for loop. …

Member Avatar for Mouche
0
149
Member Avatar for ultimatebuster

Here is 2 classes: [CODE] class Test(object): def __init__(self, var1=123): self.var1 = var1 class Test2(Test): # ... [/CODE] As you can see, Test2 is an instance of Test, which has var1. var1's default value is 123. How can I change the var1 in Test2 without __init__ again? Or better yet, …

Member Avatar for bumsfeld
0
99
Member Avatar for vegaseat

A demo of the Tkinter listbox widget that shows you how to create the listbox, make it scrollable, position it within a grid, load it with data from a file, select a line of data with the mouse and display it. Also, sort the lines, add a line, delete a …

Member Avatar for Tcll
3
15K
Member Avatar for aot

I've realized that it would be very helpful to me to SET the mouse cursor to a particular location. Having done the usual internet searches, I can't seem to find anything on how to do it. Any ideas? (So I'm still set on converting to wx, but the project I've …

Member Avatar for Gribouillis
0
4K
Member Avatar for JonKho

Dear all, Currently I am able to print out the saved values from sqlite3 database. However, I figuring out to put individual values into different text boxes.. Just like this... [img]http://i39.tinypic.com/9jnfbn.jpg[/img] Using my little experience on Java, I am thinking to use arraylist(if there is for python) and retrieve the …

Member Avatar for JonKho
0
74
Member Avatar for Purnima12

[CODE]#WEAVING A RUG WITH PYTHON #################################################################################### ## END STRINGS## for rows in range(1): for cols in range(36): print('~', end='') print('\n') ## SEAM ## for rows in range(1): for cols in range(12): print('- -', end='') print() ## DUAL ROW DESIGN ## for rows in range(2): for cols in range(36): print('*', end='') …

Member Avatar for Purnima12
0
197
Member Avatar for SgtMe

Hi again. I want to have a file for one of my python programs, that looks something like this: [CODE]<WINDOW> #Window size 640 480 <WINDOW TITLE> App Platform Test <ICON> icon.png[/CODE] I have a function that reads each line of, and uses the data to make a window. What happens …

Member Avatar for snippsat
0
16K
Member Avatar for jozz3

I have created a number guessing game that writes and reads scores from a text file. When a section of code was added to sort and right-align the scores from lowest to highest, a problem was encountered. This is my code: [CODE] import random print "Welcome to the Great CP1200 …

Member Avatar for jozz3
0
112
Member Avatar for pyprog

[CODE]list1 = [[],[],[]] list2 = [[1,2,3],[4,5,6],[7,8,9]] i = 0 j = 0 k = 0 while i < len(list1): list1[i].append(list2[j][k]) i += 1 k += 1[/CODE] I want my output for list1 to be [[1,4,7],[2,5,8],[3,6,9]]. The problem is I don't know how to advance through the lists in list2. Can …

Member Avatar for arunbg
0
162
Member Avatar for jozz3

Hello In my program I have a text file that I read from and write to. However, I would like to display the contents of the text file in an alligned and sorted manner. The contents currently read- name, score name, score Would I have to convert this information into …

Member Avatar for jozz3
0
2K

The End.