15,185 Topics

Member Avatar for
Member Avatar for G_S

Hello, I am making a file comparing program, and I want it to display line numbers permanently, like any normal text editor does. Is it possible to do this with tkinter? thanks

Member Avatar for G_S
0
2K
Member Avatar for niehaoma
Member Avatar for niehaoma
0
103
Member Avatar for Sagar14

Hi, I'm at present working on extracting data from various online news sites, and then analyzing it. The code is given below. But when I'm writing this last code, the following error is coming: >>> import newsfeatures >>> allw,artw,artt= newsfeatures.getarticlewords( ) >>> wordmatrix,wordvec= newsfeatures.makematrix(allw,artw) Error: Traceback (most recent call last): …

Member Avatar for Sagar14
0
145
Member Avatar for theguy126

I tried renaming my .py file to .pyw. But compiling with py2exe does not make a difference. I tried using root.withdraw() but all it does is freeze the application, prevent the initial canvas from popping up, and fail to remove the command prompt window anyways. Does anyone have a solution? …

Member Avatar for vegaseat
0
1K
Member Avatar for nsutton

I'm a fairly advance Python programmer. I'm am making a text based RPG which is easy for my skill but I've been wanting to learn XML for my C# project especially. My RPG is HEAVILY inspired by fallout 3. I love the dialogue options and I want to write an …

0
120
Member Avatar for lstensland

I have a twill script that I am trying to use to get the html code from a web page and output to a text file. The problem I have is that all the code does not show up in my text file. The actual parts I need are left …

Member Avatar for TrustyTony
0
351
Member Avatar for Muhammad Anas

Hello Friends, I am an absolutely beginner in the world of computer programming. I started my voyage in this world yesterday by starting learning Python. I am reading an e-book on python [URL="http://openbookproject.net/thinkcs/python/english2e/"]here[/URL]. That book has been written with examples from Linux platform. So, I felt this problem while going …

Member Avatar for snippsat
0
433
Member Avatar for Syphilis

What's Up? OK, So I'm designing a nice new shiny UI for my Python script, Now when one of my buttons gets clicked I want it to perform some of my own defined tasks, So I need to define my own 'Slot' if I'm correct? But I can't figure out …

Member Avatar for vegaseat
0
63
Member Avatar for lewashby

[CODE]import sqlite3 def find_details(id2find): db = sqlite3.connect("surfersDB.sdb") # grap surfer data from database db.row_factory = sqlite3.Row cursor = db.cursor() cursor.execute("select * from surfers") rows = cursor.fetchall()[/CODE] In the code snippet above from "Head First Programming", the syntax for the database code is poorly explained. Is row_factory a call, method, or …

Member Avatar for lewashby
0
136
Member Avatar for ErlendHL

Hi. I make a new array, p: [CODE]p=[[x]+[0]*(y)]*z[/CODE] then if x=1, y=2 and z=3, the array is: [CODE][[1, 0, 0], [1, 0, 0], [1, 0, 0]][/CODE] But now, the problem steps in. If I now say that p[0][0]=2, then the array is: [CODE][[2, 0, 0], [2, 0, 0], [2, 0, …

Member Avatar for ErlendHL
0
91
Member Avatar for leiger

This is code I've taken from another website, and adapted to work with the JFileChooser. I got it working so that someone could select a java file with the chooser, and I'd send a "java -jar FILENAME" to the console and the app would launch. However as soon as I …

Member Avatar for Gribouillis
0
643
Member Avatar for TrustyTony
Member Avatar for TrustyTony
1
2K
Member Avatar for ppp88

which software i need to install to run a code started as follows: [CODE]from appuifw import * from e32 import *[/CODE] can anyone help me?

Member Avatar for TrustyTony
0
74
Member Avatar for leiger

Python works fine in the console, but I'm having problems using python in a Java program. In case someone here has any ideas, I'm posting a link back to my original post (please reply there and not here): [url]http://www.daniweb.com/forums/post1246152.html#post1246152[/url] Thanks!

Member Avatar for leiger
0
151
Member Avatar for lewashby

[CODE]def find_details(id2find): surfers_f = open("surfing_data.csv") for eash_line in surfers_f: s = {} (s["id"], s["country"], s["average"], s["board"], s["age"]) = eash_line.split(";") if id2find == int(s["id"]): surfers_f.close() return(s) return({}) lookup_id = int(input("Enter the id of the surfer: ")) surfer = find_details(lookup_id) if surfer: print("ID: " + surfer["id"]) print("Name: " + surfer["name"]) print("Country: " …

Member Avatar for TrustyTony
1
248
Member Avatar for jv_05

Excuse, I need to work with data bases. In a little research I made, I found that python has a library call sqlite3 but I don't find information of how I use it. So if anyone can explain it to me I'll be so thankful. PD: I need this because …

Member Avatar for vegaseat
0
360
Member Avatar for alphaOri

I'm using python and I want to be able to create an object of a base class and have it initialize the object using the __init__ of a subclass. I use a function defined outside of the classes to determine which subclass' __init__ method should be called. I found a …

Member Avatar for alphaOri
0
151
Member Avatar for shaqywacky7

Hello everyone, I've just started using the pypcap and dpkt modules and tried the code on google code for pypcap and I get nothing. Heres the code I used: [code] import dpkt, pcap pc = pcap.pcap() pc.setfilter('icmp') for ts, pkt in pc: print `dpkt.ethernet.Ethernet(pkt)` [/code] I think this is suposed …

Member Avatar for shaqywacky7
0
254
Member Avatar for prashanth s j

Hi all, Currently I execute multiple scripts in the following format: os.system(./script1) os.system(./script2) os.system(./script3) But now I need to modify the code in such a way that script1, script2 etc return a success code(0) or failure code(1). But os.system can not return these values. What I need to do so …

Member Avatar for prashanth s j
0
202
Member Avatar for ArtemisFowl

I've been working through the book Python Programming In Context and everything runs fine except cImage. I went to the website to download it, but so far I haven't found a version for Python 3.1.2. I can use the cImage.py file they give on the website, but in order to …

Member Avatar for vegaseat
0
536
Member Avatar for niehaoma

I have been playing around with Python, numPy, SciPy, and matplotlib for a few weeks now. I was wondering how easy (assuming it is possible) to utilize a waveform file (example: .lpf or similar scope-captured waveform file), and re-plot that waveform using matplotlib, etc. Anyone have experience doing this? I …

Member Avatar for niehaoma
0
71
Member Avatar for kelokely

I have a list of files of similar format. I want to extract all lines form each file that are containing exact character for example I need to extract only lines with TPO and saving to another file also I need to extract only lines with HOH and saving to …

Member Avatar for baki100
0
116
Member Avatar for vlady

Hello, I make an exercise from a book : Think Python: How to Think Like a Computer Scientist by Allen B. Downey, Version 1.1.22, random words exercise 7. I made a script like this (see below) but how can I make list (named book) just once and since then after …

Member Avatar for TrustyTony
0
158
Member Avatar for SoulMazer

Hi, so I'm having quite the difficulty here. Let me start by explaining the architecture of my scripts. My "Listener.py" is a script that uses asyncore in order to listen for connections and receive commands from them. If it receives the text "play" from a connection, it calls another script, …

Member Avatar for SoulMazer
0
273
Member Avatar for Gargen

im just curious im currently learning all major programming languages that are usefull to me and i am wondering what is python useful for in a realistic sense

Member Avatar for Orion2k
0
526
Member Avatar for kurtiskain

Hi everybody! I am currently working on a low level console/text based python phonebook. I have a working program and i can add and search entries just fine, but what I want to know is...can I remove entries? I am using the OS package...so i 'import os' at the beginning, …

Member Avatar for griswolf
0
134
Member Avatar for ihatehippies

I wrote this function to compare two strings and find their similarity. It returns the percent of their letters in common in place. ie "hello" and "yellow" share the "ello" (8 of 11 characters) and thus are 72.72 % similar. I feel like there is a better way to write …

Member Avatar for TrustyTony
0
2K
Member Avatar for Syphilis

What's Up? I can't seem to post this in the PyQt section (No post new thread button) Anyway I've started using PyQT to design a UI for my python script, I've googled around for ages and racked by brain, But to no avail, Nothing I've found is specificy tailored to …

Member Avatar for vello
0
116
Member Avatar for i-teq

Whilst having 20+yrs in IT I'm brand new to Python programming... I'm trying to reference an object in a different class as a lookup... I have a class which describes items and their prices I have a class which describes a currency code and a conversion rate I'm trying to …

Member Avatar for i-teq
0
4K
Member Avatar for photoyid

Is there a way to determine which shift key is pressed? I am writing a program that shows an image and I want the user to say which side of the screen it is showing up on.... I thought of using the mousekeys but realized that not all computers have …

Member Avatar for TrustyTony
0
848

The End.