15,194 Topics

Member Avatar for
Member Avatar for HiHe

Does anyone have a code example for using the mouse wheel with the Tkinter GUI toolkit handy?

Member Avatar for vegaseat
0
122
Member Avatar for rasizzle

I have a series of rules that I want to be able to execute without having to manually edit the code. I'd like to give my rule conditions at the beginning and have the program run it. This way, I can test every single rule combination in a for loop …

Member Avatar for willygstyle
0
288
Member Avatar for soUPERMan

How do you make a function repeat itself using a while statement. Here's the function: [CODE] # the function accepts any positive integer parameter and returns the sum of # the squares of its digits. def zap(intNum): total = 0 while intNum != 0: last = intNum % 10 total …

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

I used [URL="http://www.parallax.com/Store/Education/KitsandBoards/tabid/182/CategoryID/67/List/0/SortField/0/Level/a/ProductID/313/Default.aspx"]Parallax's Basic Stamp Homework Board[/URL] and an [URL="http://www.radioshack.com/product/index.jsp?productId=2909788"]accelerometer[/URL] to use as a mouse. It works better than I thought it would. [URL="http://sourceforge.net/projects/pyserial/"]PySerial[/URL] is used to grab the debugged values from the stamp. The circuit is compiled of two push buttons, 2 LEDs to tell when a button is …

0
274
Member Avatar for emma.parsons

I am new to programming in Python and I am just wondering if I could have some help. I am trying to write a program which creates diary entries for events and I am currently trying to convert the raw_input from the user into a date (yyyy/mm/dd) and time (24hr …

Member Avatar for hondros
0
225
Member Avatar for JaxConer

Hello. First of all i'm compete newbie in the python. And second i was wondering for some time what does the value 'i" do in python or is it a value at all? I'm sorry if i'm pre-posting a question that have been answered already. This is the example : …

Member Avatar for vegaseat
0
131
Member Avatar for calccrypto

can anyone tell me what i did wrong with the decryption part of this code? ive been looking at it for some time now (while working on other related stuff), and i cant seem to find the problem with it. its getting really retarded, on my part [B]and this is …

Member Avatar for calccrypto
0
157
Member Avatar for G33KKitty

hey guys i was wondering if anyone knew of any tutorials on how to get Python to read and open a XML text file? any help would be much appreciated as i cant seem to find anythign!!! kitty

0
47
Member Avatar for pythonpro

Hi, I have installed Python2.6 and wxPython. I wish to use wxPython together with Matplotlib to generate times series graphs. I am unable to install Matplotlib it always throws the following error "Python 2.6 required, but not found in registry". Please help me

Member Avatar for vegaseat
0
88
Member Avatar for xav.vijay

Hi Is there a way to hide the python source code from being copied or hacked? I am planning to write and distribute some python code to my team, but I would prefer not to reveal the code. Is it possible in Linux? In windows I wud probably create an …

Member Avatar for Stefano Mtangoo
0
1K
Member Avatar for Tech B

Is there a way to grab values from a basic stamp with python? I just bought a Accelerometer and want to read the values with python.

Member Avatar for Tech B
0
329
Member Avatar for Whoever90

Hi, I try to convert a tuple into binary number but I keep getting the error like"ord() expected string of length 1 but tuple found" Can anyone help me in this?

Member Avatar for bumsfeld
0
78
Member Avatar for idreu2go4it

Oh do I need some serious help! lol. I'm working on a phone book in python. For some reason when I select the option, enter....say....the last name, even though it's on the file that my program is reading it tells me that it's not there. Can somebody please look at …

Member Avatar for snippsat
0
279
Member Avatar for web_test

I was wondering if anyone helps me in the following case..? There're two prgs A.py and B.py A.py has two classes class x class y and class y has some print statements. I want to import 'class x' to B.py and using the following statement in B.py from A.py import …

Member Avatar for tzushky
0
112
Member Avatar for MichelleCrews

hi ... im trying to write a function that tells you if the time you called is a correct military time .... heres what i have so far [CODE]def valid_mil_time(mtime): if mtime <= 2359 : print ("true") else: print ("false")[/CODE] but if i was to call it, it looks like …

Member Avatar for snippsat
0
531
Member Avatar for kstmchick

I have been attempting to write a program that takes an input from a button class and a graphics class that creates a gui for a game called three button monte. So far I've been able to get it to sort of work. The point is to have the "game" …

Member Avatar for vegaseat
0
416
Member Avatar for tzushky

Hi all, This is not a post about simply recvering user input with raw_input() and then using eval(), nor for input() use . I remember having used this once, but can't get a hold of the old code so I turn to you for fresh ideas. I am planning to …

Member Avatar for Gribouillis
0
371
Member Avatar for pythonNerd159

hey guys, girls, others. i have a pop down widget and one of the options in the pop down screen is "Exit" which means quit. I want to know the code for clicking that "Exit" option and then it Quiting the whole program. here is my code for the pop …

Member Avatar for bvdet
0
121
Member Avatar for ChargrO

I was wondering if anyone knows some siimple code to start me off on making a cascade window?? my current code from my reference book is to confusing for me [CODE] from Tkinter import * class TestMenu: def __init__(self, master): self.master = master self.menubar = Menu(self.master) self.casmenu = Menu(self.menubar) self.casmenu.choices …

Member Avatar for woooee
-1
138
Member Avatar for Andy_Ballard

Hello, I would like to import and call a c++ library from python. The library is the freely available (c++) LAMMPS Molecular dynamics code, and on the website, the following advice is given: "[one can]...build LAMMPS as a library. Once this is done, you can interface with LAMMPS either via …

Member Avatar for Andy_Ballard
0
3K
Member Avatar for AnnetteM

Hello, I am in the process of importing and reading data, reshaping the data, adding a header file on top (of the new data array or matrix), and writing a new file. I do this in a loop for many files. I'm using python 2.5 since that is the version …

Member Avatar for AnnetteM
0
186
Member Avatar for shyami

Hello there, I wrote a code for reading xml datas from one url, the code is working fine, but if data contains "-" it throw error message. Here is my code [CODE] h = httplib2.Http('.cache') response, content = h.request(dataurl) data = content.decode('utf-8') elem = etree.fromstring(data) [/CODE] i am getting error …

Member Avatar for Stefano Mtangoo
0
83
Member Avatar for Lolalola

Hi, i creates this program: [CODE=python] import wmi c = wmi.WMI() for i in c.Win32_Processor (): cputype = i.Name print cputype for i in c.Win32_ComputerSystem(): mem = int(i.TotalPhysicalMemory) print mem/1000000, "mb" [/CODE] I make exe file with py2exe. When i run program, i see this error: [CODE] D:\py\dist>cpu.exe Traceback (most …

Member Avatar for Lolalola
0
175
Member Avatar for shyami

Hi, I am working with pylon framework, just i want to redirect a user to my another php script, if session expired. The below one is redirecting to another controller. i need to redirect to another php script. redirect_to(controller='test', action='index', _code=303) Any idea? Thanks -Shyami

Member Avatar for shyami
0
122
Member Avatar for gringofandingo

Please help me finish my project. I am a novice and completely new to python and hopelessly lost. I hope somebody will be able to help me. Here is my problem, I am working on a project for class and I am stuck. My program is supposed to be simple, …

Member Avatar for redyugi
0
133
Member Avatar for Tops

How do i make the grid on Turtle Canvas in python visible? Canvas size is 800 by 600

0
55
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
35
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
128

The End.