Search Results

Showing results 1 to 40 of 1000
Search took 0.10 seconds.
Search: Posts Made By: sneekula
Forum: Python 4 Days Ago
Replies: 5
Views: 266
Posted By sneekula
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
Posted By sneekula
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
Solved: simple question
Views: 193
Posted By sneekula
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
Solved: Using Functions
Views: 152
Posted By sneekula
You are somewhat confused about functions.
Forum: Geeks' Lounge 5 Days Ago
Replies: 13
Views: 1,057
Posted By sneekula
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
Posted By sneekula
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
Posted By sneekula
"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
Posted By sneekula
An apple turnover and a cup of hot chocolate.
Forum: Geeks' Lounge 5 Days Ago
Replies: 13
Views: 548
Posted By sneekula
I went to the C++ forum, but nothing happened. :)
Forum: Geeks' Lounge 24 Days Ago
Replies: 1,358
Views: 142,504
Posted By sneekula
I have a handful of cherry granola cookies with my coffee.
Forum: Python Sep 21st, 2009
Replies: 9
Views: 369
Posted By sneekula
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
Read Me: Starting Python
Views: 83,745
Posted By sneekula
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
Posted By sneekula
As a beginner use for loops first, later on 'list comprehensions' become more natural.
Forum: Python Sep 21st, 2009
Replies: 10
Views: 352
Posted By sneekula
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
Posted By sneekula
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
Posted By sneekula
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
Posted By sneekula
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
Posted By sneekula
Rice Pudding with Cinnamon
Forum: Geeks' Lounge Sep 20th, 2009
Replies: 1,358
Views: 142,504
Posted By sneekula
Bottom Round Steak, pink inside, with cauliflower.
Forum: Python Sep 20th, 2009
Replies: 7
Views: 340
Posted By sneekula
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
Posted By sneekula
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
Posted By sneekula
Now I am curious, did that work for Python26?
Forum: Python Sep 20th, 2009
Replies: 5
Views: 647
Posted By sneekula
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
Posted By sneekula
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
Posted By sneekula
Which Computer Language would you like to know more about, or even start to learn?
Forum: Python Sep 19th, 2009
Replies: 9
Views: 379
Posted By sneekula
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
Code Snippet: Recursion Benchmark
Views: 502
Posted By sneekula
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
Posted By sneekula
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
Posted By sneekula
Plato
> Is <
Boring
Forum: Geeks' Lounge Sep 19th, 2009
Replies: 123
Views: 7,136
Posted By sneekula
What does not destroy me, makes me stronger.
~~~ Friedrich Nietzsche
Forum: Geeks' Lounge Sep 19th, 2009
Replies: 123
Views: 7,136
Posted By sneekula
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
Posted By sneekula
Two jumbo eggs sunny side up, oat-nut bread toast, and coffee.
Forum: Python Sep 18th, 2009
Replies: 9
Views: 379
Posted By sneekula
# 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
Posted By sneekula
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
Posted By sneekula
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
Posted By sneekula
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
Posted By sneekula
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
Posted By sneekula
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
Posted By sneekula
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
Posted By sneekula
You mean you want to graph stock values?
Showing results 1 to 40 of 1000

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC