1,175 Posted Topics

Member Avatar for jingda
Member Avatar for vom53
Member Avatar for vom53
0
135
Member Avatar for jingda

A college physics professor was explaining a particularly complicated concept to his class when a pre-med student interrupted him. "Why do we have to learn this stuff?" one young man blurted out. "To save lives," the professor responded before continuing the lecture. A few minutes later the student spoke up …

Member Avatar for sneekula
2
298
Member Avatar for epdmcoatings
Member Avatar for vegaseat

Sailing on Lake Michigan, cool and crisp with a minimum of floating plastic bags!

Member Avatar for jwenting
1
161
Member Avatar for WASDted
Member Avatar for Demetrius123
Member Avatar for sneekula
-4
192
Member Avatar for hisan
Member Avatar for kmilof

This Tkinter example moves a ball (circle) in a horizontal line, but you can change that to a vertical line: [code]# a Tkinter moving ball that wraps around try: # Python2 import Tkinter as tk except ImportError: # Python3 import tkinter as tk root = tk.Tk() root.title("Tkinter Moving Ball") w …

Member Avatar for predator78
0
227
Member Avatar for Ancient Dragon
Member Avatar for Lardmeister
0
176
Member Avatar for jingda
Member Avatar for Lardmeister
0
410
Member Avatar for tigerra80
Member Avatar for oalee
Member Avatar for jingda
1
139
Member Avatar for WolfShield

I remember reading the story about a fellow who sold bagels on the honor system in the coffee rooms of a corporate office building in Washington DC. The building had their top managers on the upper floor and 'worker bees' on the lower floor. He discovered that the folks on …

Member Avatar for WolfShield
0
182
Member Avatar for vishy1618

Runtime versions (in your case msvcr90.dll) of the Microsoft C compiler have to be shipped with any program that has been compiled with it. Since Python26.dll has been compiled with this version, the appropriate runtime version can be included without problems. In the matter of fact, your Python 2.6 Windows …

Member Avatar for tinchopique
0
448
Member Avatar for smith09
Member Avatar for vmanes
Member Avatar for Michael_Knight

Engraved on a gravestone: "It distresses us to return work that is not perfect"

Member Avatar for happygeek
0
1K
Member Avatar for scru

[QUOTE=paulthom12345;866525]Yeah, i get this a lot with wxPython. Something on the lines of wx.App must be created first. And IDLE will not freeze, but it will not run the code again until you restart it.[/QUOTE]Hmm, interesting, never had that happen. Can you show a small sample code where this happens? …

Member Avatar for richieking
0
235
Member Avatar for sneekula

It's time again to poll the well educated folks at DaniWeb about the possible cause of the end of humanity on earth.

Member Avatar for bumsfeld
2
935
Member Avatar for Mouche
Re: Rpg

I finally got them all to work. Kinda neat! Can hardly wait until you get some good sound with it! What does Rpg mean? Reverse Polish Game?

Member Avatar for richieking
0
512
Member Avatar for jozz3

Generally you would save the following three code files in the same directory: class Tank as [B]tank.py[/B] class Grid as [B]grid.py[/B] your main code as [B]tank_game.py[/B] then run tank_game Note that filenames for modules tank and grid are case sensitive!

Member Avatar for taskkiller
0
124
Member Avatar for serkan sendur

i,ROBOT Will Smith fights a robot conspiracy to break the "a robot can't harm a human" union rules.

Member Avatar for ronnieaka
0
1K
Member Avatar for BestJewSinceJC
Member Avatar for b_bayaraa_d
Member Avatar for ccclay

Function wget() is not part of Python. However you can extract a picture from a URL easily, as shown in this code snippet: [url]http://www.daniweb.com/code/snippet563.html[/url]

Member Avatar for JDBurnZ
1
12K
Member Avatar for The Dude

Using a huge antenna during a thunderstorm will give you free electricty, but it is somewhat dangerous.

Member Avatar for dexter737
0
148
Member Avatar for Roadphantom13

woooee, you only missed this: ararik pulled up an old thread to attach a homework question. I already told him not to double post.

Member Avatar for forsakenedzero
0
5K
Member Avatar for Laurence26

You major problem is that __init__() uses double underlines prefix and postfix. Also, remember that the module name and its file name are case sensitive! Here is an example: [code=python]# save module as tank.py (file name is case sensitive!) class Tank (object): def __init__(self, name): self.name = name self.alive = …

Member Avatar for umbuty
0
172
Member Avatar for zandiago
Member Avatar for Aiban

With the advent of Python3 Tkinter has turned into a package called tkinter. I usually add a try/except to pick the right import: [code=python]# a simple Tkinter number guessing game # shows how to create a window, an entry, a label, a button, # a button mouse click response, and …

Member Avatar for jgomo3
0
12K
Member Avatar for babug

You can also calculate pi with this simple mathematical formula: [B]4*.atan(1)[/B] :)

Member Avatar for Sriman_Laxmi
0
1K
Member Avatar for jephthah
Member Avatar for terence193

Child: "Mom, why do you have strands of grey hair mixed in with your dark hair?" Mother: "Every time you disobey, I get one strand of grey hair. If you want me to stay pretty, you better obey." Child after some thinking: "Mom, why is Grandma's hair all grey?"

Member Avatar for vegaseat
0
885
Member Avatar for Aia
Member Avatar for sureronald
9
625
Member Avatar for jrthom444

You could use id(): [code=python]word = "example" print id(word) # eg. 41369728 [/code]Let me warn you, Python really used the globals dictionary to match variable name with content.

Member Avatar for jcao219
0
220
Member Avatar for vmanes
Member Avatar for sneekula
Member Avatar for TrustyTony
0
6K
Member Avatar for katmai539

I would imagine that Dallas and Arlington Home Inspectors listen to the sound of all those Dollar bills the are cheating their unsuspecting customers out of. Seriously, I find that classical music is best for any good programming language.

Member Avatar for Bench
1
251
Member Avatar for Ancient Dragon

I do like Miss Palin, she has single- handedly done more damage to the Republican ticket than anyone could imagine in their wildest dreams. Good work Sarah! Keep it up!

Member Avatar for johnnybgood
0
450
Member Avatar for sneekula

In the Netherlands many schools have adopted graves of Allied servicemen killed in action during WW2, keeping those graves in excellent condition.

Member Avatar for Biker920
0
86
Member Avatar for keshav magge

It acts like container.catalog_object has been used as the variable name for a string somewhere in your code. [code=python]books = container.getBookTitleToCatalog() for book in books: params=urlencode({'code':book.id}) container.catalog_object(book, '/APP_New/app-home/app-information/Publications/showBookDetails?%s'%params) [/code]

Member Avatar for vegaseat
0
1K
Member Avatar for funfullson

To confuse variable [B]Foo.__privatebar[/B] with [B]Foo._Foo__privatebar[/B] would be a hard thing to do. As you can see, Python uses [B]name mangling[/B] to protect a private variable.

Member Avatar for jcao219
0
265
Member Avatar for pythonnewbie10

Your code seems to work well, except your grade assignments are a little strange to me. Here would be a slightly different approach to some of your code: [code]""" assume these are the contents of file student.txt Fred, Nurke, 16, 17, 22 Jack, Sprat, 12, 13, 19 """ # create …

Member Avatar for TrustyTony
0
113
Member Avatar for atsuko

[QUOTE=pherro;1231244]how can I develop a program in PASCAL that counts the number of words in a paragraph[/QUOTE]Pascal is a very old style language. I don't think it would come even close to Python's modern syntax and features. You could try the Delphi/Python forum at DaniWeb. The closest thing you could …

Member Avatar for TrustyTony
0
706
Member Avatar for ITgirl2010

I would create a class Order with the following methods: new_order update_order show_orders

Member Avatar for sneekula
0
102
Member Avatar for thejinx0r

You can use a dialog window in conjunction with a main window. Here is a wxPython example: [code]# a wxPython general frame with a dialog window # the dialog shows full size even it the frame is minimized import wx import wx.calendar as cal class MyCalendar(wx.Dialog): """create a simple dialog …

Member Avatar for thejinx0r
0
134
Member Avatar for macca21
Member Avatar for snippsat
0
297
Member Avatar for BestJewSinceJC

Don't worry, Goldman has enough money to prevail in the political arena!

Member Avatar for sneekula
1
119
Member Avatar for swerty4

The End.