Search Results

Showing results 1 to 36 of 36
Search took 0.02 seconds.
Search: Posts Made By: Lardmeister
Forum: Python Jul 5th, 2009
Replies: 4
Views: 364
Posted By Lardmeister
Assuming you are using Python2, you could do it like this:
print("Enter zero for the value you are looking for:")

s = d = t = 0

while True:

s = input("Speed (miles/hour): ")
d =...
Forum: IT Professionals' Lounge Jul 3rd, 2009
Replies: 6
Views: 714
Posted By Lardmeister
Wow, is there such a thing? Sounds interesting.
Forum: Python Jul 2nd, 2009
Replies: 12
Views: 624
Posted By Lardmeister
Thanks for the info jlm699!
Forum: Python Jul 2nd, 2009
Replies: 12
Views: 624
Posted By Lardmeister
There must be something wrong at sourceforge, right now every download request for wxpython2.8 flips into the wxPython2.7.1.2 page :)

This direct link may work:...
Forum: Python Jul 1st, 2009
Replies: 12
Solved: wxPython Error
Views: 503
Posted By Lardmeister
Forgot to mention this, but I also corrected line 10 to:

self.fileMenu.Append(ID_FILE_QUIT, '&Quit\tCtrl+Q')
Forum: Python Jul 1st, 2009
Replies: 6
Solved: A little help
Views: 275
Posted By Lardmeister
Zetlin, your code was almost there:
def test():
number = input("Number: ")
scale = range(1, number+1)
total = 0
for count in scale:
n = count * 20
print n
...
Forum: Python Jul 1st, 2009
Replies: 7
Solved: unicode riddle
Views: 352
Posted By Lardmeister
I ran this from the IDLE editor:
s = u'Rash\u00f4mon'
print s # --> Rashômon

a = u'\u00bfC\u00f3mo es usted?'
print a # --> ¿Cómo es usted?
Forum: Python Jul 1st, 2009
Replies: 5
Views: 2,117
Posted By Lardmeister
Use something like this:
s = "Function1 (text1) (text2) (text3) [text4]"

print s.count('(')
print s.count(')')
print s.count('[')
print s.count(']')
Forum: Python Jul 1st, 2009
Replies: 7
Views: 476
Posted By Lardmeister
You could use / both Windows and Unix allow that.
Forum: Python Jul 1st, 2009
Replies: 14
Views: 436
Posted By Lardmeister
Python code is actually very similar to your Perl code, just a bit more readable:
# Convert string "HelloPythonWorld" to "HELLO_PYTHON_WORLD"

s1 = "HelloPythonWorld"
s2 = ""
for index, c in...
Forum: Python Jun 30th, 2009
Replies: 12
Solved: wxPython Error
Views: 503
Posted By Lardmeister
If paulthom12345's suggestion does not fix your problem, try to bind this way:
import wx

ID_FILE_QUIT = 101

class MainFrame(wx.Frame):
def __init__(self, title):
...
Forum: Python Jun 30th, 2009
Replies: 3
Views: 1,192
Posted By Lardmeister
Try to change your print line to:
print ("The sum of "+str(a)+" and "+str(b)+" is: "+str(a+b))
or even better:
print ("The sum of %s and %s is: %s " % (a, b, (a+b)))

Now remember in Python2...
Forum: Geeks' Lounge Feb 13th, 2009
Replies: 4
Views: 646
Posted By Lardmeister
Numerology is very interesting, but sort of stupid too!
Forum: Python Sep 28th, 2008
Replies: 9
Views: 2,386
Posted By Lardmeister
Try this:

num = [1,2,3,4,5,6]
print sum(num)
Forum: Python Sep 16th, 2008
Replies: 12
Views: 3,844
Posted By Lardmeister
This will give you an error:
Traceback (most recent call last):
File "<module1>", line 23, in <module>
File "<module1>", line 21, in test
TypeError: test() takes exactly 1 argument (0 given)
Forum: Python Sep 8th, 2008
Replies: 3
Views: 971
Posted By Lardmeister
You could also make up your time string this way:
import time

time_str = time.strftime("%A %B %d %Y %H hours %M minutes and %S seconds",
time.localtime())

print time_str # Monday...
Forum: Python Aug 15th, 2008
Replies: 10
Solved: extra string
Views: 1,107
Posted By Lardmeister
Oh yeah, like:
print 'racecar' == 'racecar'[::-1] # True
:)
Forum: Python May 27th, 2008
Replies: 16
Solved: ERIC Ide
Views: 3,948
Posted By Lardmeister
You might have to uninstall a partially installed version of eric before reinstalling. I would stick with an IDE that uses wxPython as its GUI toolkit, like DrPython, Boa or PythonWin.
Forum: Geeks' Lounge Apr 29th, 2008
Replies: 25
Views: 3,112
Posted By Lardmeister
My Grandpapa says: "Men really live longer than women, they just don't say much so you don't notice them."
Forum: Geeks' Lounge Apr 25th, 2008
Replies: 33
Solved: whats going on?
Views: 3,604
Posted By Lardmeister
You are probably right, there are some new cool avatars popping up lately. Some even animated like that annoying stuff on the web pages.
Forum: Geeks' Lounge Apr 25th, 2008
Replies: 33
Solved: whats going on?
Views: 3,604
Posted By Lardmeister
Wow, this dude disraeli is one heavy poster!

Why post and show everbody how unsmart you are?
Forum: Geeks' Lounge Apr 20th, 2008
Replies: 33
Solved: whats going on?
Views: 3,604
Posted By Lardmeister
Guess what, his wife found out and took him to the woodshed. Now he lives in the doghouse without a computer.
Forum: Geeks' Lounge Feb 28th, 2008
Replies: 15
Views: 1,726
Posted By Lardmeister
That might just be an impossible project! Working on Perpetual Motion surely would give you better results.
Forum: Python Feb 25th, 2008
Replies: 3
Views: 600
Posted By Lardmeister
This is something similar to what you coded. I didn't use the 'clear the screen' thingy because that would make it OS specific, and our instructor says that it is better to leave a record on the...
Forum: C# Feb 14th, 2008
Replies: 7
Solved: compiler for c#
Views: 1,073
Posted By Lardmeister
In order for this to work you have to have at least the .NET 2.0 runtime installed on your machine. SharpDevelop is just an IDE written in C#.

C# is Microsoft's baby and you are pretty well stuck...
Forum: Python Oct 22nd, 2007
Replies: 8
Views: 1,954
Posted By Lardmeister
I am primarily using C# (that's what my school uses), but enjoy looking into Python code. I am looking at the many code samples shown here, and find them so much easier to understand and read than...
Forum: Geeks' Lounge Sep 22nd, 2007
Replies: 22
Views: 2,818
Posted By Lardmeister
I really like your thinking! I just wanted to present alternatives, not force them on you! May you be successful and happy with your choices!
Forum: Geeks' Lounge Sep 22nd, 2007
Replies: 22
Views: 2,818
Posted By Lardmeister
@Duki:
My dad's a lawyer, he enjoys it and is doing very well!

BTW, he is still chuckling about naru's comment about her sharp womanly tongue!
Forum: Geeks' Lounge Sep 21st, 2007
Replies: 22
Views: 2,818
Posted By Lardmeister
My point, why would an employer keep hiring folks at such inflated pay levels, if he/she can get the same job done for $5 an hour in India? Distance wouldn't mean much on the internet.
Forum: Geeks' Lounge Sep 21st, 2007
Replies: 22
Views: 2,818
Posted By Lardmeister
Well, the day is still young. What makes you the expert and what stuff are you on? Love your avatar, looks good for Halloween!

Why do you old folks always have to insult us young folks?
Forum: Geeks' Lounge Sep 21st, 2007
Replies: 22
Views: 2,818
Posted By Lardmeister
I know this is a little late, but if you live in the US, switch to law and join the money making crowd. In your present technical field you will always be just a peon competing with low paid labor...
Forum: Python Apr 17th, 2007
Replies: 3
Solved: Scrollbar
Views: 2,122
Posted By Lardmeister
I had the same problem until I figured out that the Text widget width is in characters and the height in text lines. Makes it easier for text, but harder for overall sizing.
Forum: C Apr 7th, 2007
Replies: 10
Views: 5,737
Posted By Lardmeister
Now we have all seen that our moderators are less than perfect:
// typical example for seeded random integers in a given range

#include <stdlib.h>
#include <stdio.h>
#include <time.h> //...
Forum: C# Apr 1st, 2007
Replies: 12
Views: 6,786
Posted By Lardmeister
Nothing is 100% fool proof, it depends on the fool! I would say go with pygmalion's solution, unless "know-it-all" iamthwee produces code.
Forum: Python Mar 11th, 2007
Replies: 8
Views: 3,982
Posted By Lardmeister
I am a little confused with the 'string.split(s)' I thought it was more like s.split():
s = "Just a test string"
words = s.split()
print words
Are there different versions of Python floating...
Forum: Python Mar 8th, 2007
Replies: 6
Views: 6,958
Posted By Lardmeister
Sounds interesting, so i put it all together:
message = "just a simple test!"
key = 11
coded_message = ""
for ch in message:
code_val = ord(ch) + key
if ch.isalpha():
if...
Showing results 1 to 36 of 36

 


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

©2003 - 2009 DaniWeb® LLC