15,175 Topics

Member Avatar for
Member Avatar for jenzilla

What am I doing wrong? [URL="http://www.daniweb.com/forums/post1298887.html#post1298887"]http://www.daniweb.com/forums/post1298887.html#post1298887[/URL]

Member Avatar for vegaseat
0
54
Member Avatar for PythonNewbie2

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. …

Member Avatar for snippsat
0
2K
Member Avatar for Viasur

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 …

Member Avatar for Viasur
0
1K
Member Avatar for Aiban

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 …

Member Avatar for jgomo3
0
12K
Member Avatar for pdini

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 …

Member Avatar for pdini
0
2K
Member Avatar for dr_zoidberg1

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 …

0
97
Member Avatar for bettersaid

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 …

0
139
Member Avatar for pythonbegin

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 …

Member Avatar for pythonbegin
0
1K
Member Avatar for Kruptein

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 …

Member Avatar for Sunjay03
0
7K
Member Avatar for PythonNewbie2

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 …

Member Avatar for Beat_Slayer
0
96
Member Avatar for sandhya1202

[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 …

Member Avatar for Beat_Slayer
0
636
Member Avatar for PythonNewbie2

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 …

Member Avatar for Beat_Slayer
0
191
Member Avatar for reviloera

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

Member Avatar for woooee
0
99
Member Avatar for tmd200

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 …

0
27
Member Avatar for koveras vehcna

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 …

Member Avatar for TrustyTony
0
1K
Member Avatar for -ordi-

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.

Member Avatar for -ordi-
0
137
Member Avatar for andrewtrench

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 …

Member Avatar for andrewtrench
0
130
Member Avatar for reviloera

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

Member Avatar for vegaseat
0
84
Member Avatar for andrewtrench

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 …

Member Avatar for andrewtrench
0
247
Member Avatar for eldeingles

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.

Member Avatar for TrustyTony
0
316
Member Avatar for xheavenlyx

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 …

Member Avatar for stevephillips
0
216
Member Avatar for sebcbien

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 …

Member Avatar for sebcbien
0
399
Member Avatar for err1100

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 …

Member Avatar for jcao219
0
127
Member Avatar for personx1212

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 …

0
61
Member Avatar for ke24126

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 …

Member Avatar for bpatt22
0
4K
Member Avatar for akls578

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 == …

Member Avatar for TrustyTony
0
403
Member Avatar for cleve23

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) …

Member Avatar for vegaseat
0
148
Member Avatar for Tommymac501

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 …

Member Avatar for Beat_Slayer
0
568
Member Avatar for Stefano Mtangoo

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 …

Member Avatar for Stefano Mtangoo
0
288
Member Avatar for johnroach1985

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 …

0
121

The End.