15,181 Topics

Member Avatar for
Member Avatar for No Sam

Hi. I'm a retired computer programmer learning Python to use with my graduate studies in cognitive science and artificial intelligence. Specifically I am looking for the application of Python in Natural Language Processing, per the Natural Language Tool Kit, per [url]http://www.nltk.org/download[/url] I'll be taking a course in Natural Language Processing …

0
22
Member Avatar for MSV22

Hi I am new to this forum so please excuse me if am not following the etiquette. I am a beginner in wxpython. For a project I need to create a color palette. Please check and tell me what I am doing wrong. Any help,suggestion,code snippet is welcome. [code] import …

Member Avatar for MSV22
0
457
Member Avatar for lewashby

Does anyone know where I can find some sort of UML (unified modeling language) tool for python? I think it might help me understand OOP a little better, but I don't really know, I just read about UML and that's all I know. Thanks.

Member Avatar for ShadyTyrant
0
86
Member Avatar for mahela007

I've been trying to read up about how tkinter (or more accurately Tk) works on windows AND linux. Here's what I've understood so far. Tk is a predefined set of widgets. That is stuff like text boxes, check boxes, drop down lists etc. Tkinter is just a way of translating …

Member Avatar for vegaseat
0
1K
Member Avatar for Kruptein

I have the following code: but for some reason it just won't work if I touch the i the query self works, cause if I just do .Append(str(i)) without the split strip it returns all the tables.. [code=python] def mysql_table(self): self.list_box_3.Set([]) try: self.cursor.execute("SHOW TABLES;") self.query = self.cursor.fetchall() except: self.log("error") for …

Member Avatar for Kruptein
0
85
Member Avatar for Democles

I have been contemplating on what would be best, when it comes to learning. What I mean by that is, I have a certain job. The goal in that job is to learn python, because the job uses python django and a few other languages to complete websites. I do …

Member Avatar for slate
0
280
Member Avatar for need help!

My mission is to reproduce the "print screen" button. Must be in memory(no saving the file...). [CODE] import PIL import ImageWin as IW import ImageGrab import win32clipboard, win32con img=ImageGrab.grab() img=IW.Dib(img) win32clipboard.OpenClipboard() win32clipboard.SetClipboardData(win32con.CF_BITMAP, img) win32clipboard.CloseClipboard() [/CODE] [COLOR="Red"] raises TypeError: expected a readable buffer object! [/COLOR] I tried using the tostring method.

0
70
Member Avatar for kvard

Hello, I've stumbled upon question I can't solve on my own. What I need is to write a program in python that would perform selection sort, but here's trick - it has to be recursive. So, for example I have l = [3,2,1] after using sort(l), l = [1,2,3] I've …

Member Avatar for vegaseat
0
433
Member Avatar for Garee

So for one of my university projects we have been assigned a problem to complete. I have the code working fine for the example output provided however I just need some help regarding a few errors that need fixing with different inputs. I am not asking for you to do …

Member Avatar for masterofpuppets
0
140
Member Avatar for npn_

Hello, I've been downloading my news for offline use with this script: wget -r --no-parent -Q4096m -U Mozilla A.stm -erobots=off [url]http://news.bbc.co.uk/2/hi/business/default.stm[/url]' But it dumps it into one folder, and the titles are numbered. Is there any regular expression or other command I can use to seperate them into folders by …

Member Avatar for slate
0
120
Member Avatar for mn_kthompson

For those of you that are familiar with wx... I'm just dipping my toe into the world of wxPython and I've been trying to put together a very simple Wizard app. Right now I have code that is working properly, but I'd like to know how I can change the …

Member Avatar for mn_kthompson
0
138
Member Avatar for MRWIGGLES

Writing my own turtle class (I understand that Python has it's own turtle class, but this is for an assignment) with an imported graphics.py to draw a koch snowflake and c-curve. What I have came up with so far are all the functions I need. I just need some assistance …

Member Avatar for Lardmeister
1
145
Member Avatar for paulgerard11

have code snippet.any ideas? for clust in clusters: #for each name in a list of names i have outNM = "fam" + str(count) + ".mcl.fas" #a series of files i want written to outFL = open(outNM, 'a') for c in clust: #for each letter in my list of names that …

Member Avatar for jlm699
0
90
Member Avatar for coffeebox

I know it seems that everyone is writing a 'backup' program these days. I started working on this a couple weeks ago and now my dream just keeps growing. I have written a script that uses rsync to backup selected files and folders in my home directory to an external …

Member Avatar for ov3rcl0ck
0
204
Member Avatar for hondros

Okay, here's my issue. I want to take a message a user enters, and then take it and convert it to a number, the standard a-z = 1-26, with space equaling 0. I haven't put in any punctuation yet. Anyways, I think I needed a loop, and I made this …

Member Avatar for jlm699
0
148
Member Avatar for Kruptein

I have 2 frames in my wxpython program, MyFrame and OptionFrame if I start my program it shows MyFrame, and if I end it, the frame disappears and the program stops. If I start my program and choose to show the option frame, it will show it, but if I …

Member Avatar for jlm699
0
100
Member Avatar for Gribouillis

This snippet defines a function [b]chmod[/b] which uses symbolic strings to represent the mode (eg [b]u+rwx[/b]) like the shell command 'chmod'.

0
499
Member Avatar for EvaDo

I want to add a bunch of tags similar to *BTAU1293812 to the end of a bunch of strings (eg ">ASIOHDA87982374:r:23423:2342: 2342 known" i have : count = 0 ....then i open the file and the handle for line in fi: if line[0]==">": handle.write(line +"*" + "BTAU1293812" +str(count) + "\n") …

Member Avatar for vegaseat
0
97
Member Avatar for Tech B

I am currently a student in computer Information Technology and I would like to ask those of you who are experienced working in this field. I didn't really know what forum to post this, so I am posting in Python because I love the language and have posted here before. …

Member Avatar for Tech B
0
89
Member Avatar for pmav99

Hi everyone. I have a problem with a GUI application i have written with wxPython when i run it under windows. The strange thing is that the code runs exactly as expected in Linux... What the code does: It calculates the area of bars of reinforcement and it checks if …

0
70
Member Avatar for kaydub123

I have a hmwk assignment that i'm stuck on....It calls for a while loop so I need to basically repeat this 4 times but I cannot for the life of me figure it out....any help would be great I narrow the code down so it works when I input the …

Member Avatar for masterofpuppets
0
736
Member Avatar for ahspats

i want to write a simple app which does nothing else except that you can drag an image in a window(simply clicking somewhere on the screen and moving mouse while holding the left button down). The problem is that my image moves only once and only a little bit and …

Member Avatar for masterofpuppets
0
378
Member Avatar for lewashby

In the following program, how does the value of [COLOR="Red"]crit_name[/COLOR], end up in the [COLOR="Red"]self.name = name[/COLOR] value? Is it because it's passed to that class and name is the only value in the [COLOR="Red"]__init__[/COLOR] parameter that has no default value? Thanks. [CODE]# Critter Caretaker # A virtual pet to …

Member Avatar for masterofpuppets
0
122
Member Avatar for MRWIGGLES

Hi, I am trying to write a snippet of code that checks if the user entered a valid color from an imported file called graphics.py. [code] # Get a valid color value from the user. color = raw_input("Enter a color: ")[/code] graphics.py contains a huge list of built in color …

Member Avatar for woooee
0
138
Member Avatar for Yeen

I've got a bit of a problem. I've got a test tomorrow in python programming, and I've been learning the language using 3.1. The computers we're taking the test on all have 2.6 installed. They're Linux (not very familiar with Unix). Obviously this is troublesome. I don't want to spend …

Member Avatar for Yeen
0
152
Member Avatar for hondros

Hi there My Algebra 2 class just started matrices, and I don't want to go out and pay $100 for a graphing calculator, just for the matrices, when I can code one myself. So... this is my code, and I can do it without classes, but I decided to make …

Member Avatar for hondros
0
118
Member Avatar for Elvedon

I have written two scripts in python. When I run the two scripts as individual programs they run correctly. But when the second script is run as a module within the first by importing it, an image file is not recognised. I have tried calling the full pathwayof the image …

Member Avatar for vegaseat
0
150
Member Avatar for Vector_Joe

Hi, I've been using Komodo Edit for my Python the past few weeks. I wanted to be able to use the F5 key like in idle. So I did a keybinding to F5 with this command: [CODE]%(python) %F[/CODE] That works well. Then I wanted to be able to hit F4 …

Member Avatar for jlm699
0
160
Member Avatar for lrh9

I'm wondering if it's possible to change the border color of a tkinter entry widget border. I don't think it is, because no such option exists in relevant documentation. You can change the width, but that just results in the whitespace being recessed - creating a raised 3d border. If …

Member Avatar for Ene Uran
0
12K
Member Avatar for tonywacu

hello, i'm a great beginner in Python. But now my problem is that i have to model the growth of plant development using L-system.... but where to start this?? please, i need your advices otherwise i m lost.... please. i hope to hear from your very soon....thx

Member Avatar for Gribouillis
0
35

The End.