15,175 Topics

Member Avatar for
Member Avatar for peguin1089

How do you write a Python program that takes DNA sequence and give number of ORFs found in the sequence?

Member Avatar for hughesadam_87
0
159
Member Avatar for doomas10

Hello all, just a quick question! I was wondering how can you pace lines together in python. In my case i have a file like this: [CODE]<word> <word> <number>.txt <word> <word> <number>.txt <word> <word> <word> <number>.txt <word> <word><word><word> <number>.txt <word> <word> <number>.txt <word> <number>.txt <word> <word> <number>.txt [/CODE] Does anyone …

Member Avatar for doomas10
0
208
Member Avatar for Archenemie

I've tried every way I can possibly see to try and convert the value from the numctrl to a decimal but the problem lies with the retrieved value being a float. I cant covert the float to a string first because it looses the trailing 0 in values such as …

Member Avatar for zentraders
0
293
Member Avatar for madval88

I have saved a 2D matrix in a numpy file (.npy) in python. Is there a way I can access the same from C++ and possibly read in the values in a stl vector? [URL="http://www.scipy.org/C++_Extensions_that_use_NumPy_arrays"]This [/URL] is vaguely relevant. But here you make the call from python. I want to …

Member Avatar for madval88
0
755
Member Avatar for And1

I am fairly new to python and am trying to create a table for work. At the moment I use a paper based system with 11 columns. I wanted to see if I could replicate my table in python 3.1.1 The column names are: 1. RMA number 2. Customer 3. …

Member Avatar for vegaseat
0
14K
Member Avatar for maddy5326

Is there any way by which one could pass a HTML form variables to a python script? Is there any library for it?? Any help would be appreciated...

Member Avatar for maddy5326
0
78
Member Avatar for tombliboo

Hi python fans, hope someone can help me with this. I have a text file the result of another program which looks like: 2,6,3,5,0 4,0,2,5,2 5,7,9,1,0 4,6,8,2,5 2,7,9,1,6 This may vary in size but will always be square i.e. 5x5, 9x9 etc so the code needs to accomodate this, the …

Member Avatar for snippsat
0
192
Member Avatar for Vertana

I'm trying to turn my PyQt4 into a .exe in order to give it my end users. I'm so-so familiar with cx-freeze and I know how to use Innosetup. My problem is that when run from the command line my Qt application uses the icon correctly. After I freeze the …

0
170
Member Avatar for mwaidyanatha

Hi, I want to get installed Xen kernels & initrds in my computer using a python code. When I do a ls /boot I get the following results. config-2.6.26-2-686 config-2.6.26-2-xen-686 grub initrd.img-2.6.26-2-686 initrd.img-2.6.26-2-686.bak initrd.img-2.6.26-2-xen-686 initrd.img-2.6.26-2-xen-686.bak System.map-2.6.26-2-686 System.map-2.6.26-2-xen-686 vmlinuz-2.6.26-2-686 vmlinuz-2.6.26-2-xen-686 xen-3.2-1-i386.gz and what I want is "vmlinuz-2.6.26-2-xen-686" & "initrd.img-2.6.26-2-xen-686". We can …

Member Avatar for Gribouillis
0
275
Member Avatar for flebber

I started writing a python script to rename files. I wanted it to be able to rename multiple files in a given directory. I started off trying to use rename but then found other options Can't quite get it to happen. Hope my code is understandable, can anyone assist in …

Member Avatar for snippsat
0
2K
Member Avatar for Archenemie

I basically need to make the repeat button work. I've tried several approaches but i've hit a brick wall and there doesn't seem to be a function I can find to get the values of the selected item and repeat them. self.listctrl.GetItemString() will only get the string from item in …

Member Avatar for Archenemie
0
214
Member Avatar for snippetGirl

im a newbie here in python and in this forum site. im using python 2.7.1. and im making a simple calculator that can trap if the second input is zero in division 0peration.. is it possible to call def to def within the if-else statement where ?? because im trying …

Member Avatar for Archenemie
0
119
Member Avatar for Archenemie

I'm trying to find a way to make a wx.Frame stay on top of my other windows until I call hide(). I do not mind if it stays on top of all windows or just the windows called by my program. I think I need to set a style on …

Member Avatar for Archenemie
0
177
Member Avatar for buhoasa

hey guys.....i need for a part of my homework in python...to change the text in color. for each letter a specific color will be assigned, in this way, the text that will be typed in will be turned into the specific color. can anybody help me?

Member Avatar for Gribouillis
0
248
Member Avatar for WSCman44

I am new to programming and trying create a program that will be able to input students test scores. After this another prompt will ask you for the students name who received that score. When finished inputting, the program should tell me the highest score and lowest score, along with …

Member Avatar for Archenemie
0
146
Member Avatar for Archenemie

I would like my wx.TextCtrl box to only accept numbers, preferably to only 2 decimal places. Where should i start? should i use an input mask or are there styles too control this kind of input? [CODE]value = wx.TextCtrl(parent)[/CODE]

Member Avatar for Archenemie
0
4K
Member Avatar for raschko

Delving into modelview programming became complicated after seeing few explanations of the structure involving an editable model; Perusing through forums, source and documentation is only leading me so far. My issue currently is trying to edit a tableview header (subclass) entry using a custom delegate. I've seen implementations using an …

0
56
Member Avatar for maniac00

Hi guys i need help with one thing in Python... I've got something like [code] number=001 example = "picture%d" % number print example ---> But it prints picture1 not picture 001.... [/code] and i need it as integer not as string because i want to use --->[code]number=number + 2 for …

Member Avatar for Gribouillis
0
119
Member Avatar for paul.hahn

Hi, I'm newbie on Jython and on this forum as well. I need to create a GUI with Swing. My original code is based on Tkinter (see below, code adapted from Tony Veijalainen's [URL="http://www.daniweb.com/code/snippet283859.html"]Tkinter Info Grid by loops and tuples[/URL]). The main point is the use of mainloop() allowing the …

Member Avatar for paul.hahn
0
178
Member Avatar for ijessiichan

Okay. I am creating a program for school and I am a beginner to python. Here is my code: [CODE] intro = input("Want to play a game of number guess? ") while intro == 'yes': print("\nOkay. Just guess the number I am thinking of from 1 to 10.) if intro …

Member Avatar for woooee
0
188
Member Avatar for stefh

Hi there, my name is Stéphane, i'm french and a beginner with Python... I've registered on a french forum about Python to ask a question regarding an issue i have with a code, but it seems the members of this forum are not active. I paste the message i posted …

Member Avatar for stefh
0
649
Member Avatar for Vertana

I've been racking my brain over this for a few days now. I'm attempting to write a program in Python 3.1 / PyQt 4.7.5 that will open a Powerpoint, go through every shape on every slide, determine if it is a picture and then save that picture to the specified …

Member Avatar for Vertana
0
1K
Member Avatar for Urban48

hello! I'm developing a software to monitor communication to different locations. the principle is simple: send ping every second and display the results in real time (ms delay, packet loss etc) It's also important to mention that I'm running the software from Linux, so in order to ping from my …

0
112
Member Avatar for Gribouillis

This snippet defines a function [icode]a2bits[/icode] which converts a characters string to a string of 0's and 1's showing its bitwise representation.

Member Avatar for Gribouillis
0
2K
Member Avatar for Thropian

I have a string such as [CODE]"this is a really long string that is completely pointless. But hey who cares![/CODE] and I was wondering if there was a way to cut the first X characters off and return the res of the string

Member Avatar for TrustyTony
0
116
Member Avatar for Krstevski

Hello friends, I have a small problem with creating XML documents. After creating the XML when I try to get a XML document as string using .toxml() or .toprettyxml() functions i got escaped string. [CODE=python] >>> from xml.dom.minidom import Document >>> html = '<a href="http://www.google.com/">Google</a>' >>> doc = Document() >>> …

Member Avatar for Gribouillis
0
444
Member Avatar for Greyhelm

I am trying to understand using an SQLite database in Python and can grasp running queries, but would like to understand how to populate Python variables from SQLite fields. Here is my sample Python code: [CODE]import sqlite3 id = 0 name = "" occupation = "" location = "" connection …

Member Avatar for richieking
0
4K
Member Avatar for neroth

A bit of background: I've been working on a python script to do some calculations on a land use model. Basically, I take amount of space developed in the future and pull out a table that has the amount of space by geographic area within the larger area. I load …

Member Avatar for neroth
0
308
Member Avatar for BirdaoGwra

Hi, Right now I have this. And I could not understand how to sort it out: [CODE]def onView(self): img = wx.EmptyImage(240,240) filepath = self.filedlg.GetPath() img = wx.Image(filepath, wx.BITMAP_TYPE_ANY) img = img.Scale(240,240) picture = ogl.BitmapShape() picture.SetBitmap(wx.BitmapFromImage(img)) self.canvas.AddShape(picture)[/CODE] I want to load an image with fileDialog into a wx ogl canvas. Thanks …

Member Avatar for BirdaoGwra
0
120
Member Avatar for acehigher

Hello, I think this is a pretty simple problem but I just don't know where to start. I have a text file: 1 00:00:34,000 --> 00:00:36,135 Thank you, Detective. 2 00:00:42,714 --> 00:00:45,794 - Any change? - Nothing since you left. 3 00:00:52,988 --> 00:00:55,585 She seems to be looking …

Member Avatar for Gribouillis
0
102

The End.