15,181 Topics
| |
Hi, I've a multi line string, which I want to delete the first 22 lines from, I then want to use re.findall (which appears to only work on strings). Is there an easier way to do it than writing the string to a file, reading in as a list, deleting … | |
I wrote a program that interactively allows you to import files directly from your HDD into another python program. When building a new program, you simply call my program, navigator, and it lets you choose a directory and it prints out a numbered list of file: file a 1 file … | |
Hi guys. I downloaded pygame and a few other modules for Python. I know that I have to put them in a certain folder to make sure Python can read them, but what is that exactly? I'm running a Mac, OS 10.6.6. I already tried putting it in the main … | |
Yes i realize this is the fibonacci sequence and i understand the math im just having trouble understanding the line in red what does it equate to in laymans terms? Thanks in advance :D [CODE] a,b=0,1 while b < 100: print b [COLOR="Red"]a,b=b,a+b[/COLOR][/CODE] | |
| Hi, I'm currently trying to do something which I thought would be relatively straightforward, but it appears not. Basically, I have a set of data that needs to be done logarithmically in a histogram, but appears the 'log=True' command in the pylab.hist() only refers to the y axis, rather than … |
Hi every one! :) Based on the example of StyledTextCtrl of the wxPython demo i managed to write a small application intended to Php code writing. Does anyone know how to set styles for Php codes? I found it's necessary to use SetLexer(stc.STC_LEX_HTML) because STC_LEX_PHP is deprecated. But i have … | |
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. |
The End.