15,175 Topics
| |
How do you write a Python program that takes DNA sequence and give number of ORFs found in the sequence? | |
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 … | |
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 … | |
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 … | |
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. … | |
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... | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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? | |
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 … | |
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] | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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. | |
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 | |
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() >>> … | |
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 … | |
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 … | |
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 … | |
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 … |
The End.