14,949 Topics

Member Avatar for
Member Avatar for gianniszaf

Hi there, I have the following string which is tab seperated [code]dasj dhsahdwe dhasdhajks ewqhehwq dsajkdhas edward das dsaw das daswf fjdk ewf jken dsajkw dskdw hklt ewq vn1 daskcn daskw[/code] How can I format it in python in order to make each column to have the width of the …

Member Avatar for vegaseat
0
551
Member Avatar for Zetlin

Ok so for the last couple of days I have been struggling with file handling. Here is my problem I create a new file and write some text into it. Then I open it again to add more text to it but somehow the new text is being written in …

Member Avatar for Zetlin
0
247
Member Avatar for Jonx

So after some scrambling around trying to find a good beginner programming language, i have found python, and with my ultimate goal being game development, also pygame. I have just started learning some basics, and I was going through a tutorial when i ran into an error that im not …

Member Avatar for vegaseat
0
2K
Member Avatar for kes_ee

What is the difference between these two methods; [CODE=python]# Solution 1 list1 = ['a', 'b', 'c', 'd'] temp_list1 = list1 for i in range(len(list1)): temp_list1[i] = "1" print list1; # ['1', '1', '1', '1'] print temp_list1; # ['1', '1', '1', '1'] # Solution 2 list2 = ['a', 'b', 'c', 'd'] …

Member Avatar for vegaseat
0
127
Member Avatar for siddhant3s

[U][B]Guidelines to OPs:[/B][/U] [U]Before you start a thread:[/U] Starting a thread is a critical task. It is so because it demands time and attention of other forum members. A thread should only be started when you have done enough drill to find your answer else where. You should always be …

2
468
Member Avatar for rockyman12

Can anyone give me a qick review about Python Why its good ? Why its not ? What is the most suitable type of project for it ?? (application) And so one Thanks for your help

Member Avatar for Ene Uran
0
122
Member Avatar for joe82

Hello everyone, My file has text like: gnl|dbSNP|rs13484118 gi|62750812|ref|NC_005111.2|NC_005111 95 20 1 0 68 87 31017559 31017578 4.4 32.3 gnl|dbSNP|rs13484118 gi|62750812|ref|NC_005111.2|NC_005111 91.67 24 2 0 63 86 35247737 35247714 4.4 32.3 gnl|dbSNP|rs13484118 gi|62750812|ref|NC_005111.2|NC_005111 91.67 24 2 0 64 87 40549054 40549031 4.4 32.3 gnl|dbSNP|rs13484118 gi|62750812|ref|NC_005111.2|NC_005111 92 24 2 0 63 …

Member Avatar for joe82
0
4K
Member Avatar for mikejamesuk

[url]http://www.i-programmer.info/tinyURL.php?id=189[/url] Is a review and discussion of using Python as a first language. mikej

0
49
Member Avatar for sebcbien

Hello, I'm currently working on a little soft to plot some data from CSV files. I've got two problems. The first one is on CSV opening in procFile method. When I try to open a file with a path which own "é" characters for example, it raises an error. I've …

Member Avatar for sebcbien
0
141
Member Avatar for Mclovin

Hi! I'm creating metadata to a bunch of files and have problems figuring out how to do this. The python script should be able to create one xml document for each file in the directory. The problem is not to walk through the files but to create additional metadata to …

0
43
Member Avatar for justmonkey23

I am trying to write a program that will help me with Gold Rush...This is a game on moola.com. Gold Rush is the most popular game available for players to wager their winnings on. It involves a series of six blind bids on gold nuggets with various point values. The …

Member Avatar for jem777
0
190
Member Avatar for asim.mittal

Hey I use both windows vista and Ubuntu (mostly) for developing small py scripts. I wanted to know if there were any libraries or modules available to get information about system resources like : - Source of power (ac or battery) - how much battery time is left - Is …

Member Avatar for xav.vijay
0
105
Member Avatar for masterofpuppets

hii everybody, I have a weird problem with a program for solving sudoku puzzles. I am representing the puzzle as a list of lists of lists containing all the possibillities for a single square and my problem is that when I try to remove a single appearance of a number …

Member Avatar for masterofpuppets
0
115
Member Avatar for joe82

Hello everyone, my file1.txt have sequences as given below: >1|62798264|[COLOR="Red"]rs8174605[/COLOR]|T/C||dbSNP|T/C AAGAGGAGAAAGCAAAGTTGCAAAAGGTGAAAGAGAAAGAAGAGCTAGAGAAGGGCAGGA AGGAGCAGAGTAAGCAGAGGGAGCCTCAGAAGAGACCGGA_GAGGAGGTGTTGGTGCTCA >1|100159271|ENSRNOSNP145|T/A||ENSEMBL:celera|T/A TCTTATAATTAGTCATTGTGATAACTGCTACAAACAAAGTCACAGGATCTTGTGAGAGAA >1|19033646|[COLOR="Red"]rs8173848[/COLOR]|C/T||dbSNP|C/T TTGCAAAAAAAAAAAAAAAAAAAAAAAGCCAGAATCCAGCATAAGTCAAGGAAATCCACT >1|149643853|[COLOR="Red"]rs8173465[/COLOR]|G/T||dbSNP|G/T AACAGAGACAGCTGTGATGTACCCCATGAGCTGGAAAGAGCAGCCCAGCGGTGTCCCAGC >1|101456015|ENSRNOSNP1318|G/C||ENSEMBL:celera|G/C AACTCTTAGAAGTTAGAACCTGGGGTGGAGAGATGGCTTGGTGGTTGAGAGCATTGACTG I want result file which do not have sequences with "rs"number e.g rs8177678, these are colored red in each sequence. so my output file should have 2 sequences: >1|100159271|ENSRNOSNP145|T/A||ENSEMBL:celera|T/A TCTTATAATTAGTCATTGTGATAACTGCTACAAACAAAGTCACAGGATCTTGTGAGAGAA …

Member Avatar for joe82
-1
176
Member Avatar for joe82

hello everyone, my file has many long lines witth 12 ccolumns like: gnl|dbS|13484118 gi|62750812 100 16 .......around 12 columns gnl|dbS|13484888 gi|62750812 95 20 ....... gnl|dbS|22484118 gi|62750812 92 20 .......... I want to grab the lines where values of column 3 lies between 90 - 99.9 in the file and store …

Member Avatar for joe82
0
117
Member Avatar for kes_ee

Can this be done in Python?.. which is done in perl. [CODE=perl]open(TEST,">test.txt"); *STDOUT = *TEST; print "print somting..."; print "print somting..."; *STDOUT = *FHSAVE;[/CODE]All the print statement between the lines "*STDOUT = *FHSAVE;" will be written in to test.txt. Is there any way to do this in python. Thanks.

Member Avatar for Ene Uran
0
134
Member Avatar for sadix

Hi, I have my own widgets ( simple one) and want to put them in one file and call them from second file. This is like easygui but with pyqt4. My problem - when I call my widget from second file nothing happens. This is file with widgets (example). [code …

Member Avatar for Ene Uran
0
692
Member Avatar for Zetlin

Ok so I was working on file handling, nothing special just making new (.txt) files and putting some text in it. That works fine the problem is that when I try to read the file from within python nothing comes up and when I try to open the file once …

Member Avatar for Zetlin
0
323
Member Avatar for leegeorg07

due to someone elses post about a keylogger, i wanted to use the program: [code=python] # get the character of a key pressed (no return key needed) # works only in the command window and with Windows OS # msvcrt.dll is the MS C library containing most standard C functions …

Member Avatar for shadwickman
0
174
Member Avatar for dads

Hello I've writing a application that is consists of a wxpython notebook and each page is a form to fill in, parcel query form, holiday form, product query form etc. Then there would be a button on each page to press that would create a simple text file that'd be …

Member Avatar for Stefano Mtangoo
0
87
Member Avatar for funfullson

I am sorry if it is simple or repetitive but I have problem with this. I make a play : I have python 2.6 or 3.0 a program in my c partition its name is test.py I want to compile it and it have to works in linux and windows. …

Member Avatar for shadwickman
0
110
Member Avatar for wanne

Sorry.. I am new to this forum. I tried to find solution from older threads but couldn't. Here I am starting a new thread. My doubt is that suppose i want to do one looping process to assign values, how I have to do. For example: Having one list like …

Member Avatar for woooee
0
96
Member Avatar for kes_ee

Hi All, I need one more help in string manipulation.. I am having a line as follows: [QUOTE] variable (x1|y1|z1)(x2||z2)(x3|y3|z3)[/QUOTE] From this I need to take values and store in lists like [QUOTE] xList = [x1, x2, x3] yList = [y1, 0, y3] zList = [z1, z2, z3][/QUOTE] Please help …

Member Avatar for shadwickman
0
127
Member Avatar for abbiejoy21

I have the following code working perfectly for basic authentication with http. I'm going to be changing the site, however, to https. Can anyone point me in the right direction here? [CODE] import urllib2 from matplotlib.dates import strpdate2num from matplotlib.mlab import load from pylab import figure, show import urllib theurl …

0
43
Member Avatar for freddiecool

Hi, could anyone help me updating my pictures and texts. The first picture and text is okay but then the next just gets added in the same textarea instead of "refreshing the page" and adding the next "page" with a pic and text. I also get this error message. screen.delete(0.0, …

Member Avatar for freddiecool
0
169
Member Avatar for Your_mum

Hi attempting to make an address book program but hit a snag- I have: A class to give various attributes(phone numbers etc)to an instance which then puts it all into a doc string which can be added to a dictionary- but I want a function that will ask the user …

Member Avatar for leegeorg07
0
356
Member Avatar for tomtetlaw

When I run this code: [code=python] import wx ID_FILE_QUIT = 101 class MainFrame(wx.Frame): def __init__(self, title): wx.Frame.__init__(self, None, wx.ID_ANY, title=title) self.menuBar = wx.MenuBar() self.fileMenu = wx.Menu() self.fileMenu.Append(1, '&Quit\tCtrl+Q') self.Bind(wx.EVT_MENU, self.Close(), id=ID_FILE_QUIT) self.menuBar.Append(self.fileMenu, '&File') self.SetMenuBar(self.menuBar) self.Show() app = wx.App() frame = MainFrame('Ya Mum') app.MainLoop() [/code] I get some error about expecting …

Member Avatar for lllllIllIlllI
0
129
Member Avatar for nclouse

Hello, I have a certain way i want to do something but im not sure where to start, or if python can even do it. what i want is a way to display the current action during a large data conversion program.... I want it to look like an GUI …

Member Avatar for shadwickman
0
101
Member Avatar for Your_mum

Right, so I looked at some python tutorials about interfacing with internet, but every time a use a code such as: [code] import urllib pagetext = urllib.urlopen("http://www.python.org.html").read() print pagetext [/code] It just comes up with a load of error messages. how can i sort this

Member Avatar for vegaseat
0
125
Member Avatar for johndoe444

Hi, I have this code: list = ['12 angry men', 'Rash &# xf4;mon'] [CODE]def func(list): ... for e in list: ... e = re.sub(' ?&# x([0-9a-f]*);',r'\x\1',e) ... print type(e) ... e = unicode(e,'iso-8859-1') ... print type(e) ... print e[/CODE] I get this output: [CODE] 12 angry men Rash\xf4mon[/CODE] whereas I …

Member Avatar for The_Kernel
0
164

The End.