15,194 Topics

Member Avatar for
Member Avatar for elbib84

hi, am trying to parse a multiple pairwise format into table for example: Query= m100529_140129_SMRT1_c0000010190006406181231110_s0_p0/32965/0_332_clipped_50:0 (282 letters) Query: 8 TTTTTGAACAGCCCCAACAACTCTTCCGCTGCCGGTTGCTGCA-TTCCAGTTGTTCCACA 66 ||||||||||||||||||||||||||||||||||||||||||| |||||||||||| ||| Sbjct: 4045830 TTTTTGAACAGCCCCAACAACTCTTCCGCTGCCGGTTGCTGCACTTCCAGTTGTTC-ACA 4045772 Query: 67 GTCCAGCTCCAGTTCAACGTCGGTTTAAATCGTCG--AGCT-GTATGAGAGATAAGCATA 123 | ||||||||||||||||||||||| |||||||| |||| |||||||||||||||| | Sbjct: 4045771 GGTCAGCTCCAGTTCAACGTCGGTTTTAATCGTCGCCAGCTGGTATGAGAGATAAGCA-A 4045713 Query= m100529_140129_SMRT1_c0000010190006406181231110_s0_p0/56521/6_684_clipped_527:0 (151 letters) Query: 1 CTTCAAAGAGGGAGAATTACGTCGATATTACCGAAGGCTGGGAGAAGGGTGAAAATACAA 60 …

Member Avatar for griswolf
0
151
Member Avatar for bwbyron

Obviously, here is the initial code for this blackjack game. and in order for me to feel confident in this game I need to have an error check to make sure that there are at least 7 cards per player. And I have to do this in the second part …

Member Avatar for woooee
0
319
Member Avatar for alokdhari

My tutor suggested me to use deep copy for copying tuples for pawn-chess game... can anyone help me out with how actually deep copy works ?? coz if i know it i can work it out in a more smoother way... n yea... m new to python !!

Member Avatar for alokdhari
0
208
Member Avatar for vegaseat

Crypting with xor allows one to write one function that can encrypt and decrypt a file. In this example a text file is used, but it could be an image file as well. Once you have created the encrypted file you simply send it through the same function again to …

Member Avatar for TrustyTony
3
7K
Member Avatar for e-papa

[CODE]file=open(words.txt) print(file)[/CODE] Please Ive been trying to use the open() function to open a txt file in python, but it keeps telling me that there is no such file or directory, where should I put the file for me to be able to import it. HINT: I use pyscripter, but …

Member Avatar for e-papa
0
179
Member Avatar for lucksoar

Hello, I was curious to know if there was some way to change a .py file to a .pbp file. I know that I can easily make an .exe file with py2exe, is there something like that for pbp?

Member Avatar for TrustyTony
0
283
Member Avatar for ihatehippies

Anyone work with UltimateListCtrl's before? I'm looking for a way to dynamically change the column headers background color.

0
108
Member Avatar for rssk

hi all... i want to upload a file using ftp path1 = "D:\Python\test" host = sys.argv[1] def main(): try: f = ftplib.FTP(host) except (socket.error ,socket.gaierror),e: logging.info("Error: cannot reach '%s',%s" % (host,e)) return logging.info("***connected to host '%s'***" % host) try: f.login(user="root",passwd="aims") except ftplib.error_perm: logging.info("Error :cannot login ") f.quit() return logging.info("***logged in …

Member Avatar for richieking
0
542
Member Avatar for spe_eddy

I can't work out why when i try to print the list(listProb....s) it prints the empty list, i'm not setting them to the empty list after this code or anything, and when i print the normDistProb's on their own it prints fine): [CODE]for i in range(0,12): listProbFog.append(normDistProb(dayValues[i], fogAve[i], fogVar[i])) listProbSnow.append(normDistPr...ob(dayValues[i], …

Member Avatar for TrustyTony
0
182
Member Avatar for Echo_2011

Hello All Thanks for such a informative web site. I'm a newbie to python and using python 2.6 for few weeks with no problem. I love notepad++ and trying to hook it up with python2.6 as explain in here but I can't. In notepadd++ at Run menu I get to …

Member Avatar for e-papa
0
1K
Member Avatar for Atistus

I am quite new to Python programming, just started about a week ago, and was just designing a simple menu for a simple guessing game. I have browsed Google and other websites trying to find snippets of code that may help me but my searches haven't turned up anything. I've …

Member Avatar for Atistus
0
175
Member Avatar for ThePythonNoob

It will carry on if the input is X but not O!! block of code concerning this matter [code] print("\nWould you like be X's or O's ? <O/X>:") human=["",""] while not (("X") or ("O")) in human[0]: human[0]=input("") [/code] whole code: [code] print("Welcome to the greatest intelletual challenge of all time: …

Member Avatar for ThePythonNoob
0
101
Member Avatar for shawntheking

Create a game where the computer picks a random word and the player has to guess that word. The computer tells the player how many letters are in the word. Then the player gets five chances to ask whether or not a specific letter is in that word. The computer …

Member Avatar for TrustyTony
0
118
Member Avatar for MASTERofMINDS

Hi, I want to get a link from a webpage say h++p://www.daniweb.com. This page might be aspx. Then I want to extract a particular url from this and I have to open that url with some parameters. What should I use for this for doing this in python?? Just need …

Member Avatar for snippsat
0
140
Member Avatar for markmcwiggins

I am working on a psycopg2 application for a customer. I first used: SELECT * from table which worked fine with 'cursor.fetchone()'. But due to some technical details between the customer's database and the database on my company's side where I could not depend on the order of the fields, …

Member Avatar for markmcwiggins
0
164
Member Avatar for Shansal

Hi, I created successfully an .exe file for my python code. As a .py file, it works like a charm. But when I try to run it from the exe version, I get error as follows: [CODE] Traceback (most recent call last): File "CreateAS.pyw", line 14, in <module> File "pulp\__init__.pyc", …

0
52
Member Avatar for lucksoar

I know that many people have programed for the Ipod, and have used a lot of different languages, but I can't figure out how to use python to make apps. I understand that I need an interpreter, but I don't know where to find one. Also, how do I import …

Member Avatar for lucksoar
0
254
Member Avatar for Thropian

I was wondering if there is a way to make a transparent image for Tkinter. I was wanting to layer some images at random so I wouldn't know the background to use... at first I was using .GIF but I heard .PNG worked for transparency but I couldn't get .PNG …

Member Avatar for Thropian
0
27K
Member Avatar for Thropian

I'm trying to make the old box game (if you are unfamiliar with it you can play it here: [url]http://www.tcastle.com/games/dots/dots.html[/url] I've seen it go by many different names though) and I was wondering if there was a way to get the pictures on buttons to change easily this is the …

Member Avatar for Thropian
0
125
Member Avatar for ThePythonNoob

I cant figure out how to make a input lock that if the user types in a letter and not a number between 0 and 1000 that it will keep on asking for a number until it gets it. Thanks for any help.

Member Avatar for bumsfeld
0
171
Member Avatar for doomas10

Hello, i have the following query. I have a txt file with data like this: [CODE]1 observational study 1.1 cohort study 1.1.1 retrospective cohort study 1.1.2 prospective cohort study 1.2 cross-sectional study[/CODE] And another file with data like this: [CODE]cross-sectional survey 12345.txt retrospective study 2345.txt ...[/CODE] I want to do …

Member Avatar for TrustyTony
0
228
Member Avatar for manofhouse

The program is suppose to create and account but if the passwords do not match after the 3rd iteration it's suppose to output that its been too many tries and end the program... I can't seem to figure this out any help would be greatly appreciated. [CODE]while 3: print ("Welcome …

Member Avatar for manofhouse
0
175
Member Avatar for spe_eddy

I am wanting to refer to a number of items from the end of a list, but can't get the syntax right, [CODE]previousDays = 5 pDaysRange = (31-previousDays,32)[/CODE] previousDays is the variable I can change, there are 31 days in the month so i'm trying to take the last 5 …

Member Avatar for spe_eddy
0
144
Member Avatar for blacknred

I'm trying to do some simple parsing as example: [code]import csv import os,sys spamWriter = csv.writer(open('eggs.csv', 'wb'), delimiter=' ',quoting=csv.QUOTE_MINIMAL) string = "cat /home/myfile.txt |grep -m 1 "my game" " string2=os.system(string) spamWriter.writerow([string2]) [/code] [quote]home]# python excel2.py File "excel2.py", line 4 string = "cat /home/myfile.txt |grep -m 1 "my game" "[/quote] ^ …

Member Avatar for TrustyTony
0
163
Member Avatar for scyonto

Hey guys, before I begin, I'd like to specify that this is for a personal project that I am playing with, and not for work or school or anything of that ilk. In Python, I am trying to define a function that will search a .txt file containing a large …

Member Avatar for TrustyTony
0
114
Member Avatar for blacknred

Hi, I'm intend to do the following -do a calculation ; record the value with timestamp to excel (csv format will do) -repeat above step; append a new row to csv with newly calculated value and timestamp. ... ... continue in endless loop. Could someone give me some pointers on …

Member Avatar for richieking
0
82
Member Avatar for leeggodfrey

Hello All, I have a very simple search cursor that is selecting from a table a list of names in order to query a database. It was working fine until I encountered a name with an apostraphe in it. O'Brien for instance. The search cursor is very basic. [CODE] inCur …

Member Avatar for leeggodfrey
0
170
Member Avatar for WolfShield

Hello, I've just recently found out about Python scripting and I am interested in programming an auto login script. However, when looking around, I haven't found any Python web scripting tutorials or guides. If someone could either explain to me how it works, or point me towards a good tutorial …

Member Avatar for WolfShield
0
511
Member Avatar for spe_eddy

Sorry - I know this isn't strictly Python, and i'm more asking for a formula than code! Usually Excel functions show how they are calculated but i can't find anything on this one! So given a set of data, predict what the next value will be based on the previous …

Member Avatar for spe_eddy
0
475
Member Avatar for meensatwork

Hello, Iam using matplotlib to create a scatter plot and i have trouble in converting to exe. The error iam getting is [CODE]Traceback (most recent call last): File "portopti.py", line 8, in <module> File "matplotlib\pyplot.pyc", line 95, in <module> File "matplotlib\backends\__init__.pyc", line 25, in pylab_setup ImportError: No module named backend_tkagg[/CODE] …

Member Avatar for meensatwork
0
530

The End.