15,406 Topics

Member Avatar for
Member Avatar for Feenix45

Can someone guide me how to make menu in python please? [url]http://www.daniweb.com/forums/post693793.html#post693793[/url] This is a previous post of what sort of menu i need. Can someone just give me a start please. Cheers

Member Avatar for Bart_uam
0
2K
Member Avatar for marcux

Hi all! I have an app using pygtk and in a separate thread I have a server responding to specific calls on port 1120. Everything works fine except one thing: When I exit my app, everything shuts own properly but if I start up my app again right after (and …

Member Avatar for marcux
0
2K
Member Avatar for Jexius

Has anyone got any ideas on how to do this? Here's an example: I want to find: [url]http://img692.imageshack.us/img692/1341/asdtva.png[/url] In this: [url]http://img294.imageshack.us/img294/5714/asdp.png[/url] That's just an example, it's not the real thing ;P Any help would be greately appreciated. EDIT: Sorry, IMG tags aren't on this forum ;P

0
36
Member Avatar for Lala2010

I have written a Python program that takes information from the user at the command line, and then saves this data in a PostgreSQL database. Now I want to wrap a GUI around my program. I am just starting with wxPython and have completed a few tutorials, but still can't …

Member Avatar for vegaseat
0
129
Member Avatar for smithy40000

I am doing my major work for SDD and i am making checkers, i have searched and tried many differnt solutions but nothing has worked, i am trying to make the window size set to 800x800 and have "Checkers" as a title and 4 buttons down the bottom, i would …

Member Avatar for jimothy
-1
229
Member Avatar for hsyuen

I am new to python and I am trying to write a simple program that would cd from my home directory to another directory, run an ls command and then return to my home directory. The OS is Redhead linux 5.4. I am using python 2.4.3. I tried this first: …

Member Avatar for hsyuen
0
109
Member Avatar for SoulMazer

EDIT: Hello, I need to figure out how I would download email from a Linux-based Postfix/Dovecot mail server. Is there a library that makes this relatively simple that good documentation/examples? Thanks in advance.

Member Avatar for SoulMazer
0
89
Member Avatar for Compy

So, I'm still a beginner at python and OOP in general. But I had a question about the order of operations. Basically what I have is a module that contains a class that will reset all self variables for the object and give the object a card. The script I'm …

Member Avatar for Compy
0
147
Member Avatar for cedrikkk

I have the problem that pygame.image.save won't save a transparency channel. With one .png image, it simply doesn't save the transparency channel. With plenty of other .png images, it gives me an error when I call pygame.surfarray.pixels_alpha(newSurface). It tells me: ValueError: unsupported colormasks for alpha reference array. Anyone have experience …

0
112
Member Avatar for new_horizon

Hi All, Apologies for my naivity in advance, but I am very new to the Python programming world - with experience mainly in Basic and Matlab. I am studying my PhD and am currently trying to program using Python in the Vizard environment to create stimuli for experiments. The purpose …

Member Avatar for new_horizon
0
126
Member Avatar for davegball

Hi I have two python lists. list1 is a \n delimited web proxy log file. list2 is a list of domain names. I want to cycle through the list of domain names and for every log file entry check if the domain name exists anywhere in the log entry. If …

Member Avatar for davegball
0
176
Member Avatar for Whoever90

I need to code a program that input will be any random string and the the output will include processes, unprocessed string. EX: Input String : XYZZXXYYXYZZXYZ Unique Prefixes : ['', 'X', 'Y', 'Z', 'ZX', 'XY', 'YX', 'YZ', 'ZXY'] Encode List : [(0, 'X'), (0, 'Y'), (0, 'Z'), (3, 'X'), …

Member Avatar for Whoever90
0
188
Member Avatar for Tech B

I've been working on facial recognition and have obtained a dll that can recognize faces in an image, and gives cordinates aswell. It came with an example program written in C++ and I'm trying to port it to python. Here is the C++ code [CODE] #include "windows.h" #include "loadbmp.h" // …

Member Avatar for Tech B
0
457
Member Avatar for ChargrO

Hello, im currently working on my major work and im up to the stage where i want to implement a cascade menu into my window. i have differnt buttons on my window but i want the food options to pop down in a cascade menu and not a check menu, …

0
140
Member Avatar for __qwerty__

I need to check if a float number has decimals or not. This is what I've tried to do this far but it doesn't seem to work. What am i doing wrong, is there a better way? [CODE] n =[1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0] a = [1.5,2] b = a[0] for i in range(len(n)): …

Member Avatar for __qwerty__
0
150
Member Avatar for nevets04

Can someone give me an example using tkinter's canvas and bind fetures to make a circle that you can move by using either WASD or the arrow keys?

Member Avatar for vegaseat
0
61
Member Avatar for persianprez

I have something like 5 lists all containing different data. I have the user input into a list like so: [CODE]for i in range (0,completed): print 'Class: ', course = raw_input() course = course.upper() allcourses.append(course)[/CODE] now the list cmsc has as many courses in it as the user defined before …

Member Avatar for vegaseat
0
91
Member Avatar for Gribouillis

This snippet defines a class LebsegueSet which instances represent sets of real numbers, namely finite unions of intervals. Set theoretical, topological and measure theoretical operations are implemented in pure python. Use freely and enjoy !

1
257
Member Avatar for playonlcd

I have read some documentation about python, but no examples on how could you can extract Keys from a double dictionary. To understand better here is an example: Let's say we have the following dictionary: {'AAA': {'KEY1':'text1', 'KEY2':'text2', 'KEY3:' 'text3', 'KEY4': 'text4'}, 'BBB': {'BBB1':{'KEY1':'text1', 'KEY2':'text2', 'KEY3:' 'text3', 'KEY4': 'text4'}, 'BBB2':{'KEY1':'text1', …

Member Avatar for playonlcd
0
492
Member Avatar for playonlcd

Hi, I am a little newbie with python, more use of C++ The goal is to search a specifed filename e trought multiple directories. After finding the file, search trough it's content some description on some strings and write out the description on a xml file. So far i manage …

Member Avatar for playonlcd
0
175
Member Avatar for craigus12

Hi all, I am reading through the Non-Programmer's Tutorial and I would like to make a program with Python in which is similar to the one in the example. The difference with the program in this example is that you can only assign a number to a name, whereas in …

Member Avatar for SoulMazer
0
140
Member Avatar for SoulMazer

Hi, so I'm currently porting one of my applications (it's a media player) from Tkinter to wxPython and I am having some trouble as this is the first wx application I have attempted. I am trying to create something similar to [URL="http://i189.photobucket.com/albums/z266/Capn_Soul/DesiredLook.jpg"]this[/URL]. However, I can't figure out the wxPython code …

Member Avatar for SoulMazer
0
171
Member Avatar for slmsatish

hi guys i am a beginner to python. Just now completed a few sets of lessons and i'm trying out the exercises given at the end of each chapter. I have learned till the stage of basics in defining a function. But still i am confused. [code] ##This program runs …

Member Avatar for snippsat
0
198
Member Avatar for mahela007

is it possible, for example, to make the text that appears as output on the command line appear in a certain colour using python?

Member Avatar for Tech B
0
1K
Member Avatar for sparkus

arrgh. I've been messing around with displaying a serial feed in PyGTK. For some reason whenever I thread the little bugger the GUI hangs. YES, I've read the PyGTK FAQ (most of my code came from it) Any help would be really appreciated! [CODE] import threading, thread import gobject, gtk, …

Member Avatar for sparkus
0
205
Member Avatar for Tech B

I have had python2.6 for a while and have un0installed and re-installed it several times. Now when I right click on some source code the option to open with the IDLE is gone. I have tried "open with" but that doesn't work either. I'm on Windows 7 Home.

Member Avatar for Tech B
0
190
Member Avatar for soUPERMan

I need help to compare letters between two words, the first word letters should be used to compare the letters in the second word... I have an idea that i could use the for loop but im not quite sure how. Please help!

Member Avatar for soUPERMan
0
4K
Member Avatar for AntonioLinux

[COLOR="Green"]#face1.py[/COLOR] [code] from face import Face from graphics import * from button import Button def main (): win = GraphWin ("Faces",500,500) win.setBackground ("yellow") f1= Face (win, Point (250,250), 70) #f2= f1.smile(win,Point(250,250), 70) #f3= f1.frown(win,Point(250,250), 70) rollButton = Button (win, Point (400, 250), 55, 30, "Grim") rollButton2 = Button (win, Point …

Member Avatar for vegaseat
0
611
Member Avatar for johnnybgoode
Member Avatar for vegaseat
0
767
Member Avatar for DifficultUsrnme

Hello people, I'm completely new to Python, and I mean new. I've had some experience with programming in Java and C++. Although, the truth remains that I haven't had any experiments with GUI. But that I will do.... Also, now the time for the doubts, 1.Is Python entirely OOP? 2.If, …

Member Avatar for DifficultUsrnme
0
167
Member Avatar for needpythonhelp

let's say i have a list of things, like: [bread, cookies, cake, chocolate, bread] how can I make loop that will, in each iteration, create a variable with the name of the item in the list? basically, i want to be able to count the times each item appears in …

Member Avatar for snippsat
0
168
Member Avatar for jabbadabba

Here is my code atm [CODE]room_num = raw_input("Enter your room number: ") text_file = open("c:/roombookings.txt", "r") whole_thing = text_file.readline() if room_num in whole_thing: print "Room number found here is the information:" else : print "Room number not found." single_line = whole_thing.split('\n') for single_line in text_file.readlines(): if room_num in single_line: print …

Member Avatar for rueth
0
835
Member Avatar for denero1

Please enter a integer for knick-knacking (pyhton question)? if the number is 1, with his thumb if the number is 2, with his shoe if the number is 3, with his knee if the number is 4, at his door this is what i have -_- [code] def main(): again …

Member Avatar for Tech B
0
75
Member Avatar for camigirl4k3

Now...when done. the output should look like this: >>> main() Welcome to the game of BULLS and COWS. The objective in this game is for you to guess a 4-digit number The computer responds with how close your guess is to the target BULLS = # common digits with exact …

Member Avatar for Tech B
0
364
Member Avatar for kedarm

Hi! I am trying to convert my c/c++ code into a python module. The code captures an image which it then runs some algorithms upon. For a start, I am trying to write a code that just captures an image. I am using opencv for the image capture (in the …

0
103
Member Avatar for spesseh

Hi all. This is probably quite a newbish question, but i have a input for a number. From the entered number, i want to extract the first digit in the number. So if the typed in number is 43, i want to extract the 4, but not the 3. In …

Member Avatar for spesseh
0
9K
Member Avatar for eva yang

Hi, I don't know the difference between class variables and instance variables. Can anybody give me an example? Thank you so much:)

Member Avatar for eva yang
0
146
Member Avatar for [O3]
Member Avatar for vegaseat
0
138
Member Avatar for snfitz

Hi, I'm trying to make a program that prompts for input a certain number of times, like say the user inputs 5, it will prompt for other input five times. I get the number from the user, but how do I make a for loop that uses that variable instead …

Member Avatar for snippsat
0
243
Member Avatar for Naresh Bonagiri

Hi, I am very very new to python and in my application I have to create an XML file. Please any one help on this issue Regards, Naresh

Member Avatar for Stefano Mtangoo
0
261
Member Avatar for idreu2go4it

Boy, am I really confused about this!!! I have an assignment that is wanting me to create a python statement that will produce f(x) for: f(x) = 2xcubed - 8xsquared + x +16. Then, using the same function, write a python program that will find the extrema (both high and …

Member Avatar for vegaseat
0
409
Member Avatar for kedarm

Hi! I'm trying to build a Python extension with C/C++. I'm following the steps given in the documentation [URL="http://docs.python.org/extending/extending.html"]here[/URL]. I've followed the steps mentioned and written my first code. However, I have no clue on how to compile the project! I do not know how to create the .pyd file …

Member Avatar for kedarm
0
5K
Member Avatar for cerralife

I have to write a spell-check program for school and I have 2 specific quick problems: the first is that I'm trying to write a function that takes 2 adjacent letters of a word and switches them then returns the new word... it goes on to the next to letters …

Member Avatar for Gribouillis
0
182
Member Avatar for Purnima12

[CODE] #! /usr/bin/env python import random possible = [2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 30, 34, 50, 100] size = int(raw_input('Please enter the size of the die you would like: ')) if size not in possible: print """ Please check the Wikipedia Dice …

Member Avatar for snippsat
0
605
Member Avatar for hondros

Okay, so I have about 6 GB of music on my iPod. I don't want to go through and copy everysingle file and rename it manually, so I am making a python script to do it for me. I would just like to have some feedback on my code, make …

Member Avatar for hondros
0
555
Member Avatar for hondros

This simple script will copy all music files that were not purchased from the iTunes store to a directory of your choosing. It requires the ID3 module (Created by some person, from somewhere, I forget where, but I DID NOT make this module). The syntax is as follows: [code] ipoddir …

0
480
Member Avatar for Lygris

Hey, how's it going? I decided to pick up Python for the heck of it and have been having some trouble creating this Card Deck class. All this class is supposed to do is initialize a deck, and then draw a card at total random: [code] import random class CardDeck(): …

Member Avatar for Krstevski
0
343
Member Avatar for Begjinner

Hi, Sorry if this is asked before, but I'm having trouble figuring this out (tried already for a couple of hours). This is what is going on: Kids make a test with 50 question. These test are checked manually on paper and afterwards need to be put into a website. …

Member Avatar for Tech B
0
121
Member Avatar for Tech B

If you don't know what a quine is, it is a program or script that's only purpose or function is to print out its own source code. I was wondering would this be considered a quine? [CODE] f = open("quine.py","r"); print f.read() [/CODE] quine.py is the script that this code …

Member Avatar for Tech B
0
175
Member Avatar for persianprez

So for example, in the dictionary, the letter 'A' has a value of .8237 What I wan't to do is replace every letter with the value with .8237 to D in the string (not the dictionary) I've tried this without success and It's obvious why it wouldn't work: [CODE]if sorted(dictionary.values())>=.01: …

Member Avatar for Tech B
0
170

The End.