15,181 Topics

Member Avatar for
Member Avatar for sneekula

I have a directory with many subdirectories. Each subdirectory contains a small number of image files (.jpg). I would like to accumulate all these image files in a Tkinter listbox, sort them and be able to select blocks of files and send them to another listbox. Ultimately I would like …

Member Avatar for Ene Uran
0
3K
Member Avatar for hafe4k

Need some help in python. How do i make the user choose wheter or not to pick it up? (i can do picking up an item from a list): [quote]objectsCarried = [] inventory = ['bat'] lengthOfInventory =len(inventory) print 'The room holds:' for item in range(lengthOfInventory): print item, inventory[item] numberChosen = …

0
60
Member Avatar for mattyd

I am a programmer but have just recently ventured into the realm of graphics programming using Python; what I have learned so far is fascinating. It is so thrilling to see a coded design appear on the screen in full color. But, I find, making an image appear is one …

Member Avatar for mattyd
0
133
Member Avatar for shappell

I am trying to convert and sucessfully run my pettycash program in throughthe eclipse IDE in Java. First Ill show where Im at I am lost afterhere then ill show the petty cash program. I am not sure if I am on the right track and dont understand how to …

Member Avatar for vegaseat
0
105
Member Avatar for mattyd

Is it possible to use files such as GIF files as a value in a Python Dict; that is, is it possible to use GIF files in a Dict and access them directly, rendering them to the screen via Tkinter. I have a group of GIF files I plan to …

Member Avatar for vegaseat
0
124
Member Avatar for danizzil14

Ok, so I'm gonna work on a program, and I want to enable a gui for it. I have a few questions though... Question: Are there any out there that wont need a class structure? (I;ve never gotten them, and I'm working on them right now...) Question: How about easily …

Member Avatar for Ene Uran
0
207
Member Avatar for qwester

Hello, I am working on a project that involves modifying a pygame game of space invaders. I have been trying to change the game into a space shooter. I am currently having difficulty right now with changing the levels. If my character does not destroy all the enemies in the …

Member Avatar for qwester
0
44
Member Avatar for dunderhead

Hello, I am having a problem showing a popup menu in my wxpython script on fedora 5 (fc5); this problem does not occur on xp. I am using wxPython-2.6.3.2-1.fc5, unicode version. I need to add an item to a popup menu after the user selects a file using wx.FileDialog, and …

Member Avatar for vegaseat
0
452
Member Avatar for laffer

Hello everyone, I'm new to python, but I do have some c and c++ experience, although not extensive. I was looking through the challenges for new people that is stickied at the top of the forum, and was going to work on the * box challenge. I'm going to have …

Member Avatar for laffer
0
195
Member Avatar for jrcagle

Hi all, We just hit functions, and I assigned my students to write ten short functions to do things like convert Fahr. to Cels., etc. My "brilliant" :rolleyes: plan was to create a test suite and have them import their file and run the tests. Because the filename wasn't absolutely …

Member Avatar for vegaseat
0
110
Member Avatar for sneekula

I have a data file with chemical names (one name per line) and want to load that into a Tkinter GUI listbox and then be able to select it by clicking on the line. Need some help.

Member Avatar for vegaseat
0
2K
Member Avatar for 7even

I have the following sample code: [CODE]]import wx class TestFrame(wx.Frame): def __init__(self): wx.Frame.__init__(self, None, title="tree example", size=(600,30)) self.tree = wx.TreeCtrl(self) root = self.tree.AddRoot("Example") items = [ "test1", "test2", "test3",] self.AddTreeNodes(root, items) self.Bind(wx.EVT_TREE_ITEM_EXPANDED, self.OnItemExpanded, self.tree) self.Bind(wx.EVT_TREE_ITEM_COLLAPSED, self.OnItemCollapsed, self.tree) self.Bind(wx.EVT_TREE_SEL_CHANGED, self.OnSelChanged, self.tree) self.Bind(wx.EVT_TREE_ITEM_ACTIVATED, self.OnActivated, self.tree) self.tree.Expand(root) def AddTreeNodes(self, parentItem, items): for item …

Member Avatar for vegaseat
0
612
Member Avatar for sneekula

I am experimenting (playing around) with the Python Tkinter Gui, and wondered if there is a way to play a sound like from a .wav or .au file?

Member Avatar for sneekula
0
5K
Member Avatar for MarkWalker84

Hi, So it seems my self-teaching experience isnt going as well as i hoped. Every time i think im starting to understand something new pops up that halts me in my tracks :-) lol Was wondering if someone could just give me a quick pointer in the right direction of …

Member Avatar for vegaseat
0
93
Member Avatar for sliver_752

Hi i am making a simle gui using wxpython and here is the script [code] import wx class bide(wx.Frame): def __init__(self): wx.Frame.__init__(self, None, -1, "just a test", pos=(0, 0), size=wx.DisplaySize()) panel = wx.Panel(self, -1) statusBar = self.CreateStatusBar() toolbar = self.CreateToolBar() #toolbar.AddSimpleTool(wx.NewId(), images.getNewBitmap(),"New", "Long help for 'New'") toolbar.Realize() menuBar = wx.MenuBar() …

Member Avatar for sliver_752
0
103
Member Avatar for sneekula

I know that Pyhon compiles source code to a Byte Code before the interpreter works on it. What does this Byte Code look/behave like?

Member Avatar for vegaseat
0
144
Member Avatar for sneekula

I keep reading about endless loops, is that something you want or do you always have to control an endless loop situation?

Member Avatar for bumsfeld
0
129
Member Avatar for katharnakh

Hi all, Platform: winxp Version: Python 2.3 I have a task of reading files in a folder and creating an one excel file with sheets, one sheet per file, with sheet named as filename. I am facing problem in handling special characters. I am using XLRD and XLW package to …

Member Avatar for bumsfeld
0
150
Member Avatar for sneekula

Which Graphics User Interface (GUI) would you recommend for a beginner? I have seen some examples of Tkinter, wxPython and GTK.

Member Avatar for vegaseat
0
432
Member Avatar for sneekula

I have a color data file that gives the color name and its RGB values, for instance like this: [CODE] red RGB(255,0,0) green RGB(0,128,0) blue RGB(0,0,255) brown RGB(165,42,42) gold RGB(255,215,0) maroon RGB(128,0,0) [/CODE]I like to create a color dictionary from this file that looks like this: [CODE] {'red': (255,0,0), 'green': …

Member Avatar for sneekula
0
186
Member Avatar for Matt Tacular

Here is my code: [php]# search for a file, and show all files found in that file's directory # delete them if wanted import os import pickle def file_find(folder): """search for a filename fname starting in folder""" for root, dirs, files in os.walk(folder): for file in files: # make search …

Member Avatar for sneekula
0
155
Member Avatar for MarkWalker84

Hi everyone. Im having some real head-ache inducing issues with my code. I want to update a statictext label to display the value of a slider bar. Simple enough? Here is my code... [CODE=python]Speed_Slider_Panel = wx.Panel(Automatic_Control_Panel) Speed_Slider = wx.Slider(Speed_Slider_Panel, ID_SPEED_SLIDER, 0, 0, 10, style = wx.HORIZONTAL | wx.SL_AUTOTICKS) Speed_Slider.SetTickFreq(1, 1) …

Member Avatar for vegaseat
0
324
Member Avatar for sneekula

When do you use a for loop and when to use a while loop. Are there other loop types in Python? Some of the slicing examples almost look like loops.

Member Avatar for fireworks-style
0
186
Member Avatar for Mouche

Another program. This one has you guess 5 letters and then gives you the word you're trying to guess as masked by -'s and has the letters you've guessed filled in. Ex: Say the word is "computer." If you guess "r," "s," "e," "a," and "m." It would say: [CODE] …

Member Avatar for vegaseat
0
10K
Member Avatar for mushroom_jar

I want to use valiable of linux system' bash by used python but I cannot do ti. when I use bash shell I can do : [COLOR=red]>echo $BASH_VERSION[/COLOR] [COLOR=#ff0000] >3.1.17(2)-release [/COLOR][COLOR=black]I want to use BASH_VERSION by use python.[/COLOR] Please answer for me THANKS.

Member Avatar for bumsfeld
0
48
Member Avatar for Mouche

So, I'm trying to make a program that works with Newton's method. I want the program to take in two formulas and a guess and then follow this pattern. This is the pseudocode/python (I kinda did both): [code] [B]def[/B] newtonIterationFunction(x) [B]return[/B] x - (function1) / (function2) get function1 get function2 …

Member Avatar for Mouche
0
210
Member Avatar for MarkWalker84

Hi everyone. Would really just like someone to take a look at what ive done and tell me how many horrible faux-pas ive made :-) I'm trying to teach myself the language as im going along which is making it hard to conform to any standards. I know there are …

Member Avatar for bumsfeld
0
115
Member Avatar for sneekula

I have a file of sentences similar to this: [CODE] Tom ate his Apple. Frank shoveled Snow. Henry drove a Truck. [/CODE]I would like to prosess each sentence so it only retains the capital letter in the first word, every other word in the senetnce should be lower case. The …

Member Avatar for Mouche
0
120
Member Avatar for Mouche

So my idea for this program was to take data from a file and compiling it into a schedule type thing.... Comments? Again...for learning purposes, I'd love to see suggestions for content, efficiency, and techniques. [php] # Get data from schedules.txt import string f = open("schedules.txt","r") schedule_rawdata = f.readlines() f.close() …

Member Avatar for Mouche
0
187
Member Avatar for pachjo

I am trying to get to grips with treeviews in pygtk/gtk and am stuck on setting the alignment of the columns. No matter what I try I cannot change the alignment[IMG]http://ubuntuforums.org/images/smilies/eusa_wall.gif[/IMG] Here is the code I found on the web which I am using to change different lines to see …

Member Avatar for pachjo
0
182

The End.