Forum: Python 21 Days Ago |
| Replies: 127 Views: 46,803 Just testing wxPython's wx.TextCtrl widget used as an edit field for input and output of text based data:
# testing wxPython's
# wx.TextCtrl(parent, id, value, pos, size, style)
# a widget used... |
Forum: Geeks' Lounge 29 Days Ago |
| Replies: 1,390 Views: 149,208 An apple turnover and a cup of hot chocolate. |
Forum: Geeks' Lounge 29 Days Ago |
| Replies: 13 Views: 690 I went to the C++ forum, but nothing happened. :) |
Forum: Python Sep 21st, 2009 |
| Replies: 9 Views: 391 I made an attempt on user friendly data entry with just such a simple temperature converter program, see:
http://www.daniweb.com/forums/post992595.html#post992595 |
Forum: Python Sep 21st, 2009 |
| Replies: 195 Views: 86,214 The ultimate user friendly Temperature Converter program. If you put an 'F' or 'f' on the end of the temperature you enter it will give you Celsius. Otherwise it simply assumes you entered a... |
Forum: Geeks' Lounge Sep 19th, 2009 |
| Replies: 58 Views: 3,133 Which Computer Language would you like to know more about, or even start to learn? |
Forum: Python Sep 17th, 2009 |
| Replies: 127 Views: 46,803 Just a quick example on how to use the wx.grid.PyGridTableBase with wxPython's wx.grid.Grid. Provides a simple way to create, load and use a spreadsheet like grid:
# exploring wxPython's... |
Forum: Python Sep 15th, 2009 |
| Replies: 78 Views: 14,653 Yes Gloria, Tkinter has a combo box, but it's called an option menu. Here is an example:
# using Tkinter's Optionmenu() as a combobox
try:
# Python2
import Tkinter as tk
except... |
Forum: Python Sep 13th, 2009 |
| Replies: 3 Views: 681 You have to read up on the slicing operator in the Python Manual.
Generally you can slice a sequence with [start: end: step]
By default start=0, end=len(seq), step=1
step=-1 goes from the end to... |
Forum: Python Aug 31st, 2009 |
| Replies: 4 Views: 287 Courier is the most common font to space all character equal. |
Forum: Python Aug 21st, 2009 |
| Replies: 2 Views: 287 Take a quick look at:
http://www.daniweb.com/forums/showpost.php?p=954810&postcount=53 |
Forum: Python Aug 21st, 2009 |
| Replies: 78 Views: 14,653 Just a basic text editor written with the Tkinter GUI toolkit:
# a very simple Tkinter editor
# shows you how to create a menu and
# use the file dialog to read and write files of text data
#... |
Forum: Python Aug 19th, 2009 |
| Replies: 78 Views: 14,653 The Tkinter drawing canvas can be fun. Here are two short programs that can be used by an artist for creative things:
# draw a circle with center (x, y) and fixed radius at
# each mouse (x, y)... |
Forum: Python Aug 19th, 2009 |
| Replies: 78 Views: 14,653 If you have young children at home, or are yourself a young child at heart, there is a delightful Python module called frog, that does turtle like drawings and more:
# frog is a somewhat advanced... |
Forum: Python Aug 18th, 2009 |
| Replies: 6 Views: 321 How about a blank icon as a spacer? Or maybe just a label with a few spaces? |
Forum: Python Aug 14th, 2009 |
| Replies: 78 Views: 14,653 Here is a basic template of a window, 2 buttons and a label using the pygtk toolkit:
# a very basic pygtk window template
# with two buttons and one label
# snee
import pygtk... |
Forum: Python Aug 13th, 2009 |
| Replies: 78 Views: 14,653 Here is an example of a scrolled Tkinter canvas to display a series of drawn objects or pictures:
# example of a Tkinter scrolled canvas class
# snee
try:
# for Python2
import Tkinter... |
Forum: Python Aug 11th, 2009 |
| Replies: 3 Views: 273 Set up a formatted string before you send it to the Textbox. Here is an example:
# example to set up a table formatted string
import math
# set up the format strings (use - for left... |
Forum: Python Aug 8th, 2009 |
| Replies: 3 Views: 264 In Python most everything is an objects, so you are using OOP from the start.
If you talking about the use of classes, then basically you have another tool to organize larger programs.
You can... |
Forum: Python Aug 1st, 2009 |
| Replies: 78 Views: 14,653 For those of you who want experience vegaseat's sweet Tinter tkk example at:
http://www.daniweb.com/forums/post921416-25.html
on your Linux machines, in my case Ubuntu (Python 3.1 is not in the... |
Forum: Python Aug 1st, 2009 |
| Replies: 78 Views: 14,653 Some options with a basic Tkinter window:
# set position and size of a Tkinter window
try:
# for Python2
import Tkinter as tk
except ImportError:
# for Python3
import tkinter... |
Forum: Python Jul 25th, 2009 |
| Replies: 78 Views: 14,653 Since Pygame does not have a file dialog, we can use Tkinter's file dialog and withdrawing the root so it doesn't clash with Pygame's eventloop:
# experiments with module pygame
# free from:... |
Forum: Geeks' Lounge Jun 29th, 2009 |
| Replies: 9 Views: 626 Probably one of those many pop up ads, or the ghost of Dani Web. |
Forum: Python Jun 22nd, 2009 |
| Replies: 195 Views: 86,214 In the English language you can add a suffix to a number, so for instance first becomes 1st, second 2nd, third 3rd, fourth 4th and so on. Here is a little Python program that does it for you, and... |
Forum: Python Jun 20th, 2009 |
| Replies: 78 Views: 14,653 An example how to use an image as a background. In order to make added text transparent, use the Tkinter canvas:
# use a Tkinter canvas for a background image
# add transparent text and other... |
Forum: Geeks' Lounge Jun 19th, 2009 |
| Replies: 26 Views: 1,349 I like nutella, a chocolaty hazelnut spread, sort of like a much improved peanut butter. |
Forum: Geeks' Lounge Jun 17th, 2009 |
| Replies: 1,553 Views: 202,696 All animals are equal, but some are tastier. |
Forum: Python Jun 17th, 2009 |
| Replies: 9 Views: 930 Beauty and henceforth ugly is in the eye of the beholder!
Actually, the QT_Designer is pretty good and gives XML code that can be converted to a seemingly complex looking Python code. |
Forum: Geeks' Lounge Jun 6th, 2009 |
| Replies: 20 Views: 947 |
Forum: Geeks' Lounge Jun 1st, 2009 |
| Replies: 23 Views: 1,280 The Bible is full of rules to live by, not secret code!
If someone claims to have discovered secret code, then it is only to pull ignorant folks nose for financial gain or influence peddling. |
Forum: Geeks' Lounge May 20th, 2009 |
| Replies: 80 Views: 8,348 A man is smoking a cigarette and blowing smoke rings into the air. His girlfriend becomes irritated with the smoke and says, “Can’t you see the warning on the cigarette pack? Smoking is hazardous to... |
Forum: Python May 19th, 2009 |
| Replies: 9 Views: 514 The easiest way is to use a wx.RadioBox:
import wx
class MyFrame(wx.Frame):
def __init__(self, parent=None):
wx.Frame.__init__(self, parent, wx.ID_ANY, size=(300, 160))
#... |
Forum: Python May 15th, 2009 |
| Replies: 78 Views: 14,653 The nice thing about using a GUI toolkit is that you have a large number of widgets available to supply the data input. Here is a Tkinter Temperature Converter example using radio buttons to select... |
Forum: Python May 13th, 2009 |
| Replies: 12 Views: 822 The easiest way is to create a dictionary where the key is the (x,y) location tuple and the value is the (r,g,b) color tuple of the pixel:
#!/usr/bin/env python
# image data analysis using PIL,... |
Forum: Python May 13th, 2009 |
| Replies: 78 Views: 14,653 Tkinter has the reputation to look kind of homely on Windows computers. Actually, on my Ubuntu/Linux computer it doesn't look bad at all. Here is a typical listbox example using the Tkinter GUI... |
Forum: Python May 10th, 2009 |
| Replies: 78 Views: 14,653 Here is a comparison of some common Python GUI toolkits. These were created on my Ubuntu/Linux machine, because I could never get PyGTK to go on my Windows Vista machine. I followed the... |
Forum: Geeks' Lounge May 6th, 2009 |
| Replies: 54 Views: 4,566 Sooner or later some engineers will manage to create a smart robot. Smart enough to consider humans as a pest. |
Forum: Geeks' Lounge May 5th, 2009 |
| Replies: 54 Views: 4,566 It's time again to poll the well educated folks at DaniWeb about the possible cause of the end of humanity on earth. |
Forum: Geeks' Lounge Apr 19th, 2009 |
| Replies: 14 Views: 1,424 Computers are definitely female, here are the male reasons:
1) Most men who have one don't understand them.
2) Amongst themselves they talk in an incomprehensible language at high speed.
3) You... |
Forum: Geeks' Lounge Apr 19th, 2009 |
| Replies: 2 Views: 268 If they ask for money up front, then it is most likely a ripoff! |