Forum: Python 4 Days Ago |
| Replies: 5 Views: 266 Well, you could do something like this:
# File_lister2.py
# create a list of all the files and sizes in a given direcory
# and optionally any of its subdirectories (Python2 & Python3)
# snee
... |
Forum: Python 4 Days Ago |
| Replies: 205 Views: 93,559 Here is a simple number project:
Prime numbers are positive integer numbers that are only divisible by itself or one. For example 2, 3, 5, 7, 11, 13, 17, are prime numbers, by convention 1 is not... |
Forum: Python 4 Days Ago |
| Replies: 7 Views: 193 You could do:
for c in "Hello World":
print c ,
In Python2 the comma puts in a space and keeps it on the same line. |
Forum: Python 5 Days Ago |
| Replies: 6 Views: 152 You are somewhat confused about functions. |
Forum: Geeks' Lounge 5 Days Ago |
| Replies: 13 Views: 1,057 Rugby could become a sport, if they ever show it on the tele in the US. |
Forum: Geeks' Lounge 5 Days Ago |
| Replies: 7 Views: 2,793 Google gives you 3,870 hits for "Binary To Denary Program", much of it Visual Basic. |
Forum: Geeks' Lounge 5 Days Ago |
| Replies: 123 Views: 7,136 "The hardest thing in the world to understand is the income tax."
~~~ Albert Einstein |
Forum: Geeks' Lounge 5 Days Ago |
| Replies: 1,358 Views: 142,504 An apple turnover and a cup of hot chocolate. |
Forum: Geeks' Lounge 5 Days Ago |
| Replies: 13 Views: 548 I went to the C++ forum, but nothing happened. :) |
Forum: Geeks' Lounge 24 Days Ago |
| Replies: 1,358 Views: 142,504 I have a handful of cherry granola cookies with my coffee. |
Forum: Python Sep 21st, 2009 |
| Replies: 9 Views: 369 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: 194 Views: 83,745 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: Python Sep 21st, 2009 |
| Replies: 4 Views: 329 As a beginner use for loops first, later on 'list comprehensions' become more natural. |
Forum: Python Sep 21st, 2009 |
| Replies: 10 Views: 352 Looks like one of the 638 web pages is not available. You should use a try/except trap for this case. |
Forum: Python Sep 21st, 2009 |
| Replies: 4 Views: 277 At first, I would adopt consistent indentations! Very important in Python. Most people use 4 spaces. |
Forum: Python Sep 21st, 2009 |
| Replies: 4 Views: 540 And don't forget to use self to turn those functions into methods for the instance, like
def moveup(self): |
Forum: Python Sep 21st, 2009 |
| Replies: 6 Views: 292 Something like that might do. I avoided the use of float() until the end to keep time-stamp and port info from turning into floats:
raw_data = """\
501 0 0.932 0.933 0.931 0.931 0.929 0.933... |
Forum: Geeks' Lounge Sep 20th, 2009 |
| Replies: 1,358 Views: 142,504 Rice Pudding with Cinnamon |
Forum: Geeks' Lounge Sep 20th, 2009 |
| Replies: 1,358 Views: 142,504 Bottom Round Steak, pink inside, with cauliflower. |
Forum: Python Sep 20th, 2009 |
| Replies: 7 Views: 340 With wxPython code you can give py2exe an XML based manifest to force it to adopt the Windows XP theme. |
Forum: Python Sep 20th, 2009 |
| Replies: 10 Views: 360 To make more sense you should have written your class this way:
class Animal:
def __init__(self, legs):
self.legs = legs
cow = Animal(4)
chicken = Animal(2)
octopus =... |
Forum: Python Sep 20th, 2009 |
| Replies: 7 Views: 353 Now I am curious, did that work for Python26? |
Forum: Python Sep 20th, 2009 |
| Replies: 5 Views: 647 Works fine on my Ubuntu machine. I copied the Python25/26 source from the webpage and saved it as cTurtle.py in my working directory. The module has a number of demos built in that look great and... |
Forum: Python Sep 20th, 2009 |
| Replies: 7 Views: 305 Nice, looks like Python3 has bit your fancy.
Sooner or later we all have to follow your example. |
Forum: Geeks' Lounge Sep 19th, 2009 |
| Replies: 58 Views: 2,905 Which Computer Language would you like to know more about, or even start to learn? |
Forum: Python Sep 19th, 2009 |
| Replies: 9 Views: 379 As you start coding larger projects with Python, remember to go in small steps, test each step, ask question here. Python can be fun!
Python is in many ways more advanced and modern than some of... |
Forum: Python Sep 19th, 2009 |
| Replies: 0 Views: 502 If you own a stopwatch, here is your chance to benchmark the various versions of Python on recursion performance. The Ackermann function gives the old computer quite a workout. |
Forum: Geeks' Lounge Sep 19th, 2009 |
| Replies: 659 Views: 72,741 Phyllobates terribilis (the Golden Poison Frog or the Golden Dart) is the most poisonous frog. A tiny fraction of a drop, 0.00000007 ounces, of its skin secretion is enough to kill a person. |
Forum: Geeks' Lounge Sep 19th, 2009 |
| Replies: 32 Views: 1,832 |
Forum: Geeks' Lounge Sep 19th, 2009 |
| Replies: 123 Views: 7,136 What does not destroy me, makes me stronger.
~~~ Friedrich Nietzsche |
Forum: Geeks' Lounge Sep 19th, 2009 |
| Replies: 123 Views: 7,136 Be careful when you fight the monsters, lest you become one.
~~~ Friedrich Nietzsche |
Forum: Geeks' Lounge Sep 19th, 2009 |
| Replies: 1,358 Views: 142,504 Two jumbo eggs sunny side up, oat-nut bread toast, and coffee. |
Forum: Python Sep 18th, 2009 |
| Replies: 9 Views: 379 # now all input strings/characters are upper case
choice = raw_input ("A, B, or C\n").upper() |
Forum: Python Sep 18th, 2009 |
| Replies: 9 Views: 379 Simply call the dispatch(choice) function with your choice as argument:
#!/usr/bin/python
def dispatch(choice):
if choice == 'A':
functionA()
elif choice == 'B':
... |
Forum: Geeks' Lounge Sep 18th, 2009 |
| Replies: 10 Views: 464 I think the last time Google bothered to visit DaniWeb was about a year ago. |
Forum: Geeks' Lounge Sep 18th, 2009 |
| Replies: 1,358 Views: 142,504 Just finished a little medley of portabella mushrooms, spinach, tomatoes on penne noodles. The spinach and tomatoes came from my folks' garden. |
Forum: Python Sep 18th, 2009 |
| Replies: 8 Views: 365 jcmeyer, could you do me a favor and test this in your code, it makes things a lot more readable, and may avoid errors like you exerienced:
cur_ex = """
INSERT INTO DatabaseName (C1, C2, C3, C4,... |
Forum: Python Sep 18th, 2009 |
| Replies: 7 Views: 318 Like gerard4143 says, you have to make the print statement part of the function, since Tf is local to the function. The other option would be to return Tf to make it available outside the function:... |
Forum: Python Sep 18th, 2009 |
| Replies: 7 Views: 505 I looked over your code and made the following observations:
To expand your widgets with the frame you need to use a sizer and not absolute positioning.
You sql command string might have errors... |
Forum: Python Sep 17th, 2009 |
| Replies: 6 Views: 267 You mean you want to graph stock values? |