15,181 Topics
| |
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 … | |
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 … | |
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 … | |
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 … | |
| 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 … |
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 … | |
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 … | |
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. | |
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 … | |
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 … | |
| 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 … |
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 … | |
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. … | |
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 … | |
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 … | |
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 … | |
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, … | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
i've made a little animation using python and the pygame module, I'm just wondering if it's possible to turn that into a screensaver? is there a format i have to save it to? If anyone knows i would be grateful for the solution thanks, a1eio | |
I'm brand new to python (and programming) and trying to write a script that will download a .csv from the Internet and then allow me to plot data from the .csv. I already have the plot working, and I can grab the file locally, but I can't figure out how … | |
Dear friends, I have this code which attempts to get the last modified date of an http resource: [CODE]request = urllib2.Request('http://www.imdb.com') >>> opener = urllib2.build_opener() >>> request.headers {} >>> first = opener.open(request) >>> first.headers.dict {'transfer-encoding': 'chunked', 'set-cookie': 'session-id=209.251.138.146.1246519635845007; path=/; domain=.imdb.com, uu=bN4RO5T1YWqLBgRAupwcdgCRSyzj0j26pvJ+qYPCXqmT117Zs9L+/LfGO4zGx50bwJFtjNPSXuqj8g4pgDJ+meCRbaoGcS2aoNZb7PiBbbqjkm66I/I+qSAyfpnj8l7qA/I+qTAyfpngkW2KBnEtmqDXe20AkW26oLFtuqC3KyrjwW26o5IOuZOyLtnAgc0ZsLFtuqCRbergwR2Ko=;expires=Thu, 30 Dec 2037 00:00:00 GMT;path=/;domain=.imdb.com, cs=xOA2Pyx3xsSbt7wMU8ZOhAbGfbqgkW2NmIHl2qPyXuoj8j6pMDJ+meCRbYoGES2aoJFb/feFHbqjsg7/p9HNySCRWyxAGW26oKdbraCRbbqgsW26oJFt+uDBHYqg==;expires=Fri, 03 Jul 2009 … | |
How to acheive this in Python? [QUOTE]Converting the string "HelloPythonWorld" to "HELLO_PYTHON_WORLD"[/QUOTE] | |
Hi, This is the existing code: [CODE]for c in chartNames: chartUrl = baseChartUrl+c hd = extractChart(chartUrl) writeChart(hd,c) for key in hd: if key in chart: chart[key].append(c) else: chart[key] = [c] [/CODE] when i wanted to insert a line before [CODE]chartUrl = baseChartUrl+c[/CODE] by putting the cursor to the end of … | |
Hi everyone it's been almost a year since I gave up programing in python so I have forgotten a lot of things, so just bare with me. Ok so I was playing around with python and ended up with this little program. [code=python] def test(): number = input("Number: ") scale … | |
I am having a text file contaning the following: "int Function1 (int arg1, "0|1", char * arg2); int Function2 (int arg1, " ", char * prt1); ..." I need to open this file, split the each word and store it as global variable. I did this in Perl but now … | |
Hi, i wrote the socket script in python, Here both server and client running in under same machine. operating system is ubuntu 8.10 desktop version. [B]tcp server[/B] [CODE] 1 #!/usr/bin/env python 2 3 import socket 4 import sys 5 6 server_socket = socket.socket(socket.AF_INET,socket.SOCK_STREAM) 7 server_socket.bind(("", 5000)) 8 server_socket.listen(5) 9 while … |
The End.