15,175 Topics
| |
What am I doing wrong? [URL="http://www.daniweb.com/forums/post1298887.html#post1298887"]http://www.daniweb.com/forums/post1298887.html#post1298887[/URL] | |
Hey guys, I'm parsing some XML using minidom and whenever a comment has a "--" within it, I get an ExpatError. For example, a file may be like this: [CODE] <Label> Hello!</Label> <!-- The above label says Hello. -- It is clear, no? Let's try spicing it up a bit. … | |
Hello all. First I have to let you know that Im a total newbie trying to understand Python using the book 'A byte of Python'. I'm following everything on that book and is been kind of fun until OOP (object orient programing). Im getting an error in most of the … | |
Hi With every piece of code i download to check out, i often find with python 3.1/Windows Vista that the code will start with from Tkinter import * but i need to change it to from tkinter import * as it seems to be case sensative, i tried renameing the … | |
Hi all, I developed a GUI application using PyQt which comport a QGraphicsView. In this QGraphicsView I have a QGraphicsScene with a lot of items (more than 10'000): polygons, rectangles, texts, etc. How can I save it as an image like it appears on the screen (.png for example)? I … | |
Hi everyone, i’m new to this board, and i’m having a bit of trouble plotting lines inside of a function, perhaps someone knows what i’m doing wrong! I’m trying to plot an X where the points have been clicked, this is all for a wider picture that is going to … | |
hello! i've been trying to create an automated task which it should: 1. open Print 2. choose Printer 3. change Paper Size ( i want to print my doc in all paper size) but i find my code too long and oh i dont know, and i want to simplify … | |
Hi all How can I create a csv file with header. I have a text file with several number of blocks staring from "//" and ending a block with "//". I have attached a sample file. I want to use first column of this text as a header of csv … | |
I'm fetching a list with all files/folders on a ftp-server, I want to put a [F] before a folder, and leave files like they are, but I can't find a way to check if it's a file or a dir... I already tried: [code=python]from ftplib import FTP import os ftp … | |
Hi guys, I want to add a custom footer to all of my word documents like "This document was written by PythonNewbie". Let's say all of the reports are in a single directory. Here's some code that I have which can do through and find files... Now I need a … | |
[QUOTE]Actually i would like to do steaming,stopword removal,word count and punctuation marks removal from my text data i found code for this in DaniWeb[/QUOTE] [CODE]import string def RemovePunc(): line = [] i = 0 text_input = "" total_text_input = "" #This part removes the punctuation and converts input text to … | |
Let's say I have my own installer for a product that uses a lot of other components. One piece of my product is a python script. However, most of my end-users don't have python installed already. Is there any way I can include the python installer as part of my … | |
Guys I need help am using fedora 13 KDE desktop I want to install Qscintilla and its pyqt4 wrapper when a run [CODE]qmake qscintilla.pro [/CODE] I get an error message.........(bash: qmake command not found) thanxs | |
Hi, I have a question about the color options in matplotlib. First, some calculations are done, which results in a nested list, which contains for each variable (A,B,C etc.) the values at particular time points. I can plot this like, which gives a nice figure, where every variable has it's … | |
Hello everyone, I am currently working on text processing with Python and I want to parse a .txt file into its sentences as a whole. I tried to create some regular expressions but I failed to do so. I only managed to come up with a regex that splits each … | |
Hei, [CODE]list = [line.split() for line in open(file) if line is not None][/CODE] and output: [CODE][linux@localhost ~]$ [[], ['text'], ['text', 'text', 'text', 'text'], ['text', 'text', 'text', 'text']][/CODE] How to remove none types [] or something. | |
I have a perplexing problem which may turn out have a simple solution (hopes!). I am writing a little GUI to allow a user to enter information which will get built into an XML file which is linked to flash-based graphic. One of the fields I have is a Tkinter … | |
I have started programming in python . I want to know the best GUI binding to use .pyqt and wxpython which one is the best and easy to learn and install on federa 13 | |
Hi. I'm fiddling around with Python and MySql. I keep getting an error with this little script to try and read the rows in a table. The error is: TypeError: unsupported operand type(s) for +: 'int' and 'tuple' Here is the code snippet. Any help would be hugely appreciated [CODE]import … | |
Would like to be able to replace every [I]nth[/I] word in a text file with a blank space. I'm sure python is so capable. | |
Before I ask the question I realize that selection of a programming language depends on the context of a problem at hand. Related to this I would like to know (if anyone) how many of you use which language for programming microcontrollers, embedded systems and even generally on PC. Here … | |
Hi, I've got some trouble opening files saved by The Gimp in BMP 16bits 565. I've test some various bmp they all work except those saved from The Gimp and I really don't know why the format might be different from the one found there:[URL="http://wvnvaxa.wvnet.edu/vmswww/bmp.html"]http://wvnvaxa.wvnet.edu/vmswww/bmp.html[/URL] Bleu.bmp and Mire.bmp are some … | |
| Hello all - I've been coding in Python for a couple of months now, and I recently ran across the following piece of code (where x is a set or list): [CODE]f = lambda x: [[y for j, y in enumerate(x) if (i >> j) & 1] for i in … |
hi, i want to be able to intercept IE connections and get the URL before the contents are downloaded, either when clicking on a link or entering the address directly in the Addressbar, i found some examples on the web and made some changes but still some things are not … | |
hi, i'm writing a poker game project and encountered some problem while i try to sort the cards in hand. so far, i have a deck of 52 cards, each of the player is assigned for 3 cards. the questions, I don't know how to sort the cards in the … | |
Hi, I've been stuck on trying to sort a hand and while I've tried to do a bubble sort, it doesn't seem to work. Here's my code: [code]def rankValue(card): #Converts card value to integer (rank) if card.value == "Ten": return 10 elif card.value == "Jack": return 11 elif card.value == … | |
How do i set the size of my listbox to be the same as my split window? I tried to use sizer but because this is my first time using it and it did not work.please help. THANKS [CODE] class bucky(wx.Frame): def __init__(self,parent,id): wx.Frame.__init__(self,parent,id,'Frame aka window') #panel=wx.Panel(self) self.sp = wx.SplitterWindow(self) … | |
I am having a problem firing off a DOS app. To run a SQL 'SSIS' package, you use the following syntax: C:>dtexec /f "PACKAGENAME.dtsx", the quotes are required. I have tried os.system, os.execlp, os.execl and none of them seem to work. os.system causes an error with 'dtexec' saying the package … | |
I have been Out of real pythoning for a while. My favorite Toolkit is wxpython but It have a huge size due to monolithic nature. So even with simple app, it swells! I was looking if I can have any size difference with Other GUI toolkit, PyGTK! Hope someone will … | |
Hi. I am trying to create some sort of image library/gallery do hickey. Using Glade 3 and Python. I have created a general window. And now I want to add the image object as much as there are image files in a folder. The flow chart will be something like … |
The End.