101 Topics
In the US most TV programs are supported by advertisements commonly called ads. If you don't want to fork over hard earned money for paid TV, you simply learn to live with those ads. At times they are better then the program anyway. Later in the Chistmas season, after most … | |
I want to make a small Molecular Weight calculator. If the user for instance enters the molecular formula for dichloro-benzoic acid as "C6H3Cl2COOH", I would like to split it into a list like ['C6', 'H3', 'Cl2', 'C', 'O', 'O', 'H'] so I can then combine all the carbons, chlorines, oxygens … | |
Do you consider yourself skinny, normal or fat? Let's be as honest as possible. | |
You always read folks bragging that Linux, or Unix is so much more secure than Windows. What is your view or experience with this issue? | |
I have an HP notebook with Windows Vista. I slowly got used to the childishness of Vista, but I cannot get used to the surprise upgrades. You are in the middle of something on the internet, then all of a sudden the program shuts down, the screen goes gray, after … | |
This thread is just in time for the holidays. You make a wish like: "I wish my OS would be more secure" Then the next poster breaks it with something like this: "Your wish has been granted, but China just has added 1000 new programmers specializing in writing virus and … | |
Programmer's Day is a whimsical "holiday" on the 256th day of the year celebrated mostly by computer programmers. The reason for this is that 256 is equal to 2 to the power of 8, which is equal to the number of values that it is possible to represent in a … | |
Just a fun thread to collect cliches. So post your best cliches. I am sure you'll give 110% in your effort, and you'll leave no stone unturned while you're looking. You may just have to take the bull by the horns, and try to be as busy as a bee. | |
Since voting is such an important part of a Democracy, should it be mandatory to vote for all eligible voters to solve the alarmingly low voter turnouts? | |
Let us know your favorite Christams movie. Mine is "National Lampoon's Christmas Vacation" with Chevy Chase and Randy Quaid. Love the decorations american style and the typical holiday stress. | |
I want to see if a certain word is in a text file, how do I go about that? | |
The last time I posted a question here, I got a rather nasty response, so please just constructive stuff! I want to make a scrollable entrybox for Tkinter GUI, the scrollbar shows up and works, but text does not move. Am I missing something? [code=python] import Tkinter as tk root … | |
How can I let the Tkinter Button command do more than one function? | |
How can I best find out how many times a word appears in a text? | |
I know that you can do integer calculation in Python with astronomically large numbers. What is the precision limit when using floats? | |
I know you can get the present time this way: [code]import time now = time.asctime(time.localtime()) print now # Mon Feb 19 10:41:32 2007 [/code]How can I make sure that 'now' does not fall on our lunchtime break, let's say 11:30AM to 12:45PM? | |
How would one create a simple spreadsheet with Tkinter? | |
This could be a cooking recipe, but in my case it is a chemical recipe. Here is a typical generic chemical recipe: 23 g chemicalA is dissolved in 250 ml methanol. The solution is cooled to 0 - 5 degC and 18 ml compoundB is added dropwise over 60 minutes. … | |
Is there a way to preselect/highlight a listbox item with the Tkinter GUI toolkit at the startup of the program without clicking the mouse on it? | |
I keep reading threads here, some use the Tkinter GUI toolkit and others use the wxPython GUI toolkit. Why would one use one or the other? | |
The department's computer has Python 2.4 and on my home computer (really my dad's computer) I installed Python 2.5. Is it possible to have Python 2.4 and Python 2.5 on the same computer? | |
Since there is so much discussion on one of the threads on zipping/unzipping files and all the associated incompatibilities, is there a way to do this with Python and cut out the middleman? | |
I know that one has to be careful with mutable arguments like lists applied to function calls, so that things like this won't accidentally happen: [php]def add_item(list2): list2.append(99) return list2 list1 = [1, 2, 3] list3 = add_item(list1) print list1 # [1, 2, 3, 99] oops! print list3 # [1, … | |
I took a mixed type list and set out to find the min and max values. The results are very surprising to me: [php]mixed_list = [11, 'Dick', 12, 'Mary', 7, 'Zoe', 9, 700, 777, 'Paul', 13456789] mn = min(mixed_list) mx = max(mixed_list) print mn, type(mn) # 7 <type 'int'> print … | |
I was experimenting with the nested list example in thread: [URL]http://www.daniweb.com/techtalkforums/post246791-72.html[/URL] and was trying to search a nested list like that: [code]nested_list = [1 ,'Dick', 2, ['Mary', 7, 9, [700, 777, 'Paul']], 13] if 'Paul' in nested_list: print 'found Paul' else: print 'Paul not found' [/code]It always tells me that … | |
I want to make a Tkinter button respond to a left and right mouse click differently. How can I do this? | |
How do you best swap the key:value pair of a dictionary? | |
How can I make a Tkinter window take up all my display screen area? | |
How can I best center a Tkinter window on my display screen? | |
I like to create a database of common chemicals with Python. How would I go about that? Any help welcome! | |
This came up on Chris99's bus ticket program thread. Would like to see any simple examples on how to pass variables between classes without using global variables. | |
As you can see, I am playing around with the Tkinter GUI toolkit. How can I keep a number of widgets fixed in a location even when the user expands the window? | |
I am writing a small Python program for the use in our departments stockroom. This is what I have come up with (just starting): [php]# table of chemicals in stockroom # order --> stock number, chemical name, quantity (grams) # short version of the table table = [ ['ud-99137', 'm-chlorobenzoic … | |
Is there a way to make a Tkinter GUI window that the user can not change the size of? | |
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 … | |
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. | |
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? | |
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? | |
I keep reading about endless loops, is that something you want or do you always have to control an endless loop situation? | |
Which Graphics User Interface (GUI) would you recommend for a beginner? I have seen some examples of Tkinter, wxPython and GTK. | |
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': … | |
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. | |
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 … ![]() | |
I like to create a structure in Python, something like: [code]solvent_name boiling_point melting_point flash_point [/code]I need to search and sort this structure. How can I best do that? | |
Now I am looking for the best way to reverse the digits in an integer. For instance x = 12345 should become y = 54321. | |
What is the most efficient way to spell a string in reverse, for instance s = "banana". ![]() | |
If I have an integer like x = 12345, how do I separate that into individual integers 1, 2, 3, 4, 5? | |
With the ease of argument passing to and from functions in Python, why would anyone want to use global variables. Isn't that an open invitation for mistakes to happen? Yet, I see code in threads here that abound with globals. I am a little confused here. | |
How to I best pass multiple arguments to and from a function? | |
I have played with Python code just a little and like it so far. I am using a Windows XP machine and have downloaded Python 2.5. As recommended in the "Starting Python" thread, I am saving my test files in the directory C:\Python25\Atest\. When I bring up the IDLE editor, … |
The End.