[Tutor] new to threading, Queues

2013-04-17 Thread Chuck Mayers
Hi! I was having a bit of nostalgia today, and thought I'd try to write a simple, old school BBS. I found the 'paramiko' library, and I've got something I can SSH into that would have impressed my 1990's self. I found some example code of the "threading" library, and I've managed to use it to ta

[Tutor] Pygame install help

2011-03-27 Thread Chuck
rtError: DLL load failed: The specified module could not be found. >>> -- == Chuck duxc...@gmail.com ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] Pygame install error

2011-03-24 Thread Chuck
ort pygame File "C:\Python32\lib\site-packages\pygame\__init__.py", line 95, in from pygame.base import * ImportError: DLL load failed: The specified module could not be found. >>> -- == Chuck duxc...@gmail.com

Re: [Tutor] trouble with a small Tkinter example

2010-09-21 Thread Chuck Mayers
There is a not-very-obvious 'Download Code' link at the very bottom of the article. Direct link: http://en.literateprograms.org/Special:Downloadcode/Bresenham%27s_line_algorithm_%28Python%29 On Tue, Sep 21, 2010 at 4:13 PM, Emile van Sebille wrote: > It looks like they've got you assembling t

[Tutor] trouble with a small Tkinter example

2010-09-21 Thread Chuck Mayers
Hello, I'm having trouble with this small example program: http://en.literateprograms.org/Bresenham%27s_line_algorithm_%28Python%29 When I run it, I only get a blank grey window. I'm running Python 2.6 under Windows XP. If there's a problem with the code, I can't see it... it seems like it shou

Re: [Tutor] How many loops does "break" jump out of?

2007-02-23 Thread Chuck Coker
Bob, Watch your code blocks to make sure you don't change your logic inadvertently. The code starting with "if (test_2)" and continuing to the end of the snippet is inside the perpetual for loop which is inside the "if (test_1)" condition. Chuck Bob Gailer wrote:

Re: [Tutor] Optimal solution in dealing with huge databases in python

2007-01-25 Thread Chuck Coker
use it? -- == Chuck Coker, Software Developer[EMAIL PROTECTED] Tyrell Software Corporation http://www.tyrell.com Office: +1 949 458 1911 x 203Cell: +1 714 32

Re: [Tutor] Is Python the language for me?

2007-01-15 Thread Chuck Coker
you write will be code that you will write over and over. Try to keep your pieces small and generic, except, or course, where you need to do a specific step that applies to your current project only. Good luck on your project. Chuck -- ==

Re: [Tutor] Starting over with Python

2006-12-15 Thread Chuck Coker
;python" +"cryptography". (0.09 seconds) Chuck -- == Chuck Coker, Software Developer[EMAIL PROTECTED] Tyrell Software Corporation http://www.tyrell.com Office: +1 949 458 1911

[Tutor] Syntax Error? Variable Scope?

2006-11-02 Thread Chuck Coker
7:12:20 PM (thread 0): Aborting thread due to Jython exception "NameError: string" whilst creating per-thread test runner object NameError: string File "new-user-registration.py", line 356, in __init__ I've tried using

Re: [Tutor] [Edu-sig] nice()

2006-02-13 Thread Chuck Allison
l for those computing who want to show a physically meaningful value that has been rounded to the appropriate digit as counted from the most significant digit rather than from the decimal point.    Some time back I had worked on the significant digit problem and had several math calls to figure

Re: [Tutor] OT python Licences

2005-07-12 Thread Chuck Allison
at QT until I read the Windows >> license. Are there any widget libraries that would allow me to program >> for windows commercially without any license or fees ? >> What about wxWindows, for which we have wxPython? -- Best regards, Chuck __

Re: [Tutor] String to List and back?

2005-07-02 Thread Chuck Allison
; # or even a function or class method which implemented C> # the "for" loop C> # I could also build a new string directly from the C> # original with a "for" loop C> Is there a one-liner like a builtin conversion function or list C> comprehension techniq

Re: [Tutor] Interesting problem

2005-06-28 Thread Chuck Allison
I may be missing something, but isn't this what __dict__ does? Just return self.__dict__. This is an old message, so this may have mentioned already. Sorry if that's the case. I'm a little behind. Kent Johnson wrote: >Smith, Jeff wrote: > > >>Here would be the usage: >> >>myinst = MyClass() >

Re: [Tutor] Class vs. Static Methods

2005-06-22 Thread Chuck Allison
hape): pass KJ> class Line(Shape): pass KJ> p, p2, p = Point(), Point(), Point() KJ> Point.showCount() KJ> Line.showCount() KJ> l = Line() KJ> Line.showCount() KJ> ### prints KJ> Class Point has count = 3 KJ> Class Line has count = 0 KJ> Class Line has count = 1

Re: [Tutor] Class vs. Static Methods

2005-06-22 Thread Chuck Allison
This is a neat trick. But can't this also be done with a static method that accesses a static data attribute the same way? Alan G wrote: >>class Shape(object): >> _count = 0 >> >> @classmethod >> def count(cls): >>try: >> cls._count += 1 >>except AttributeError: >> cls

Re: [Tutor] Class vs. Static Methods

2005-06-21 Thread Chuck Allison
see a need for class methods (even after reading Martelli's Nutshell). I understand the syntax issues - I just don't see the need yet. Tuesday, June 21, 2005, 3:28:48 PM, you wrote: C> On Tue, 21 Jun 2005 16:52:09 -0400, Chuck Allison wrote C> (in article <[EMAIL PROTECTED]>):

[Tutor] Class vs. Static Methods

2005-06-21 Thread Chuck Allison
Sorry for the elementary question: I was wondering if someone could explain the difference to me between class and static methods. Coming from other languages, I'm used to static methods, but not "class methods". Thanks. -- Best

[Tutor] Every Other

2005-06-19 Thread Chuck Allison
Hello Tutors, What would be the most Pythonic way of printing (or extracting) every other element of a list? Thanks in advance. -- Chuck Allison ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] A newbie question about running python scripts

2005-06-15 Thread Chuck Allison
Hence, the question. === -- Chuck Allison ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Popen4 and Paths Containing Spaces

2005-06-15 Thread Chuck Allison
use forward slashes in path names is in a command prompt. It's been that way since DOS 2.0 in the 80s. I prefer using the forward slashes in file name strings since they're fairly portable. -- Best regards, Chuck ___ Tutor maill

Re: [Tutor] Python Books

2005-06-12 Thread Chuck Allison
__ TC> Tutor maillist - Tutor@python.org TC> http://mail.python.org/mailman/listinfo/tutor -- Best regards, Chuck ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Word COM interface

2005-06-09 Thread Chuck Allison
960---C000-0046}' : 'Pane', '{00020961---C000-0046}' : 'Windows', ^ SyntaxError: invalid syntax Any clue? -- Best regards, Chuck ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] File Input of "Objects"

2005-06-01 Thread Chuck Allison
;out.dat','w') >>> print >> f, 1, 2 >>> f.close() >>> s = open('out.dat').read() >>> x,y = tuple(map(eval,s.split()[:2])) >>> x,y (1, 2) This is just what came to mind w

[Tutor] Frozen Binaries

2005-05-30 Thread Chuck Allison
Hello tutor, Could someone please give me the quick lowdown on creating frozen binaries? Thanks. -- Best regards, -- Chuck Allison ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor