Re: Lambda forms and scoping

2009-03-20 Thread R. David Murray
n they are called, __init__'s namespace is in whatever state it was left in when __init__ ended. In this case, that means that 'option' is pointing to the value it had at the _end_ of the for loop. Hope this helps. I find that thinking in terms of namespaces helps me understand how Python works better than any other mental model I've come across. -- R. David Murray http://www.bitdance.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Can I rely on...

2009-03-20 Thread R. David Murray
n) > else: > print("The compiled pattern is stored.") FYI this is almost exactly the approach the re module takes to caching the expressions. (The difference is re adds a type token to the front of the key.) -- R. David Murray http://www.bitdance.com -- http://mail.python.org/mailman/listinfo/python-list

file.read() doesn't read the whole file

2009-03-20 Thread R. David Murray
Sreejith K wrote: > Hi, > > >>> snapdir = './mango.txt_snaps' > >>> snap_cnt = 1 > >>> block = 0 > >>> import os > >>> os.chdir('/mnt/gfs_local') > >>> snap = open(snapdir + '/snap%s/%s' %

Concrete Factory Pattern syntax?

2009-03-19 Thread R. David Murray
ook up the capitalized version of the string (eg: 'One') in the __init__.py module's global namespace, thus picking up the class, and then calls it to create an instance, which is then returned. Then your code that uses this can do: from parser import parserFactory myparser

Re: Can I rely on...

2009-03-19 Thread R. David Murray
iteration with equality if it doesn't). But the _intent_ of __contains__ is that comparison be by equality, not object identity, so if the two are not the same something weird is going on and there'd better be a good reason for it :) In summary, 'in' is the thing to use

Tuple passed to function recognised as string

2009-03-18 Thread R. David Murray
all the comma would normally be an argument separator, so in that context you do need the parenthesis as well: test_func(val=('val1',)) -- R. David Murray http://www.bitdance.com -- http://mail.python.org/mailman/listinfo/python-list

Re: alias method definitions / syntactic sugar suggestion

2009-03-18 Thread R. David Murray
zero__') > > def __bool__(self): > > > > and even better(?) if it could depend on python version! > > > > or maybe there's another solution to the __bool__ problem above? (there's > > also next methods, can't think of anything else

read web page that requires javascript on client

2009-03-18 Thread R. David Murray
nk it was GTK bindings, even though you were dealing with just network IO. But I don't remember clearly and did not record the reference. Perhaps the person who posted that info will answer you, or you will be able to figure out from these clues. Unfortunately I'm not 100% sure it was Webkit

Disable automatic interning

2009-03-18 Thread R. David Murray
ementation detail. What use case do you have for wanting to disable it? -- R. David Murray http://www.bitdance.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Mangle function name with decorator?

2009-03-18 Thread R. David Murray
any way that is really satisfying. Someone else suggested the property model, though that is probably not as elegant as you want either. Sohow about the below. Extending it to handle multiple classes is left as an exercise for the reader :) As is extending it to handle stacking the

Re: array next pointer

2009-03-18 Thread R. David Murray
except StopIteration: break but the version using SENTINEL avoids having the interpreter do the work of generating a traceback, and is IMO slightly prettier. I'm sure there are other use cases, too, but probably not a huge number of them. Certainly not as many as using the parameter as a default. -- R. David Murray http://www.bitdance.com -- http://mail.python.org/mailman/listinfo/python-list

Re: 2to3 does not fix FileType from types Module; no replacement?

2009-03-18 Thread R. David Murray
. > > Nontheless, a warning would be helpful, possibly with some doc. Submitting an issue to the tracker with this request would probably be a good idea. Even better if you include a suggested patch. -- R. David Murray http://www.bitdance.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Mangle function name with decorator?

2009-03-18 Thread R. David Murray
mmer type, eg: @GET def foo(self): pass @POST def foo(self): pass have them type: def GET_foo(self): pass def POST_foo(self): pass It's even one less character of typing (the :) -- R. David Murray http://www.bitdance.com -- http://mail.python.org/mailman/listinfo/python-list

Re: array next pointer

2009-03-17 Thread R. David Murray
I love the new sentinel argument for the next function in python3!) > > next() doesn't have a sentinel argument. It's iter() which does, and that's in > 2.x also. But it does have a 'default' argument, and you can pass that a sentinel, so it amounts to the same thing ;) -- R. David Murray http://www.bitdance.com -- http://mail.python.org/mailman/listinfo/python-list

Re: download x bytes at a time over network

2009-03-17 Thread R. David Murray
Jean-Paul Calderone wrote: > On Tue, 17 Mar 2009 15:17:56 + (UTC), "R. David Murray" > wrote: > >Jean-Paul Calderone wrote: > >> On Tue, 17 Mar 2009 12:15:23 +0530, Saurabh wrote: > >> >> This isn't exactly how things work.  The server *

Re: Keyword same in right hand side of assignments (rev)

2009-03-17 Thread R. David Murray
Arg, my apologies, I posted my replies to the wrong group :( -- R. David Murray http://www.bitdance.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Keyword same in right hand side of assignments (rev)

2009-03-17 Thread R. David Murray
still think that the cost of a new keyword is probably too high a > price to pay, but I like the idea. Yeah, you have to make a really, _really_ compelling case to get a new keyword added. Something you can't do any other way, or at least not without an awful lot of hassle. -- R. David Murray http://www.bitdance.com -- http://mail.python.org/mailman/listinfo/python-list

Keyword same in right hand side of assignments (rev)

2009-03-17 Thread R. David Murray
inmutable+1; inmutable*=unused; del unused" > > There seems to be no really simple expression for the above extensions, > and I take that as an indication > that the proposed feature could be quite useful. For the first one, we have: lst[:0] = [5, 6] And unless I'm misun

Re: urllib2 (py2.6) vs urllib.request (py3)

2009-03-17 Thread R. David Murray
mattia wrote: > Il Tue, 17 Mar 2009 10:55:21 +0000, R. David Murray ha scritto: > > > mattia wrote: > >> Hi all, can you tell me why the module urllib.request (py3) add extra > >> characters (b'fef\r\n and \r\n0\r\n\r\n') in a simple example like the >

Re: download x bytes at a time over network

2009-03-17 Thread R. David Murray
with 46229 bytes ? Or is it something else ? > > That's just a bug in urllib in Python 3.0. What makes you say that's a bug? Did I miss something? (Which is entirely possible!) -- R. David Murray http://www.bitdance.com -- http://mail.python.org/mailman/listinfo/python-list

Re: download x bytes at a time over network

2009-03-17 Thread R. David Murray
equest > >>> url = "http://feeds2.feedburner.com/jquery/"; > >>> handler = urllib.request.urlopen(url) > >>> data = handler.read(1000) > >>> print("""Content :\n%s \n%s \n%s""" % ('=' * 100, data, '=' * 100)) &

urllib2 (py2.6) vs urllib.request (py3)

2009-03-17 Thread R. David Murray
mattia wrote: > Hi all, can you tell me why the module urllib.request (py3) add extra > characters (b'fef\r\n and \r\n0\r\n\r\n') in a simple example like the > following and urllib2 (py2.6) correctly not? > > py2.6 > >>> import urllib2 > >>> f

Re: error writing str to binary stream - fails in Python 3.0.1, works in 2.x

2009-03-16 Thread R. David Murray
str converted over to binary bytes to > write to bmp file. (I reformatted your message slightly to make the code block stand out more.) A byte array is an array of bytes, and it understands integers as input. Check out the PEP (the official docs leave some things out): http://www.p

error writing str to binary stream - fails in Python 3.0.1, works in 2.x

2009-03-16 Thread R. David Murray
to work with binary byte streams, you want to use the 'bytes' type. Bytes contstants are written with a leading 'b', so the code snipped above would become self.out.write(b'BM') -- R. David Murray http://www.bitdance.com -- http://mail.python.org/mailman/listinfo/python-list

setattr() on "object" instance

2009-03-16 Thread R. David Murray
o.x > 1000 > > I notice that the first example's instance doesn't have a __dict__. > Is the second way the idiom? The lack of a __dict__ is why you can't set the attribute. I've occasionally wanted to use instances of object as holders of arbitrar

Re: print - bug or feature - concatenated format strings in a print statement

2009-03-16 Thread R. David Murray
n the other hand, it is one of the, well, bugs, that is avoided by the 'format' method in 3.x. -- R. David Murray http://www.bitdance.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Style question - defining immutable class data members

2009-03-15 Thread R. David Murray
ke sense to me to do it that way. It does allow you to use class variables as default values for instance variables, as long as you are careful when using mutable objects. But you could argue that it should behave in a way analogous to local/global. It would be interesting to see that argument

Re: Style question - defining immutable class data members

2009-03-15 Thread R. David Murray
M R A Barnett wrote: > Aaron Brady wrote: > [snip] > > However, in my (opined) interpretation, 'list.append(...) is an in- > > place operation' is a factual error. In-place operations -also- > > rebind their 'argument' (FLOBW for lack of better words).

Re: Style question - defining immutable class data members

2009-03-15 Thread M R A Barnett
Aaron Brady wrote: [snip] However, in my (opined) interpretation, 'list.append(...) is an in- place operation' is a factual error. In-place operations -also- rebind their 'argument' (FLOBW for lack of better words). 'append' is a by-side-effect operation. However colloquially it's mostly accur

Is this type of forward referencing possible?

2009-03-15 Thread R. David Murray
7;B' does not yet have any value in either the local namespace of class A or the global namespace of the module. To figure out how to write code like this that does what you want, you need to understand how Python namespaces work. A search on 'python namespace' should get you goo

Re: What happened to NASA at Python? :(

2009-03-12 Thread r
On Mar 12, 3:31 am, Michele Simionato wrote: > That's pretty much impossible. I am sure NASA uses all programming > languages in existence, > plus probably many internal ones we never heard of. True but... >>> all([NASA.does_endorse(lang) for lang in NASA['languages']]) False As the code sugge

Re: A Dangling Tk Entry

2009-03-12 Thread r
On Mar 11, 1:09 am, Marc 'BlackJack' Rintsch wrote: > Then he did it consequently wrong.  `frame_delay` is always `None` here > so the ``return`` is useless. > > You asked what this code means and now you don't like the answer that > it's somewhat useless code!? > > Ciao, >         Marc 'BlackJac

Re: What happened to NASA at Python? :(

2009-03-11 Thread r
On Mar 11, 10:09 pm, s...@pobox.com wrote: > In fact, graphics were added for several organizations.  I believe they will > be chosen randomly.  NASA is still there. > > --http://mail.python.org/mailman/listinfo/python-list Whew! Thats good news, i thought we had lost their support. -- http://mail

What happened to NASA at Python? :(

2009-03-11 Thread r
The Python home page no longer sports a promotion from NASA. What happened, did we lose NASA. Where did they go? -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is lambda allowed as a key in a dict?

2009-03-11 Thread r
On Mar 11, 4:32 pm, Terry Reedy wrote: > Similarly, if one is populating a LARGE structure with duplicate values, > it may be worthwhile to cache values that are not cached by the interpreter. Thanks Terry, Actually i had no idea how Python handled strings(immutables) internally but after conside

Re: Why is lambda allowed as a key in a dict?

2009-03-11 Thread r
On Mar 11, 3:40 pm, Craig Allen wrote: > On Mar 10, 1:39 pm, Paul Rubin wrote: > > > Craig Allen writes: > > > it raises an interesting question about why doesn't it.  I can think > > > of practical answers to that, obviously, but in principle, if a > > > function c

Re: Is python worth learning as a second language?

2009-03-10 Thread r
On Mar 10, 6:46 pm, Craig Allen wrote: > Honestly, I've become more of a Python fan than I am really > comfortable with... it can't be as good as I think. > > -craig Don't fight it, just go with it man... just go with it! *wink* -- http://mail.python.org/mailman/listinfo/python-list

Re: Set & Frozenset?

2009-03-10 Thread R. David Murray
.timeit('for res in myset: break', 'myset=range(100)') > 0.3293300797699 > > I'd never expect that for-loop assignment is even faster than a > precreated iter object (the second test)... but I don't think this > for-looping variable leaking behavior is guaranteed, isn't it? My guess would be that what's controlling the timing here is name lookup. Three in the first example, two in the second, and one in the third. -- R. David Murray http://www.bitdance.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Is python worth learning as a second language?

2009-03-10 Thread r
On Mar 9, 6:37 pm, Wolfgang Rohdewald wrote: > On Montag, 9. März 2009, r wrote: > > Long answer: > >  'Ye%s' %'s'*1000 > > simplified long answer: > 'Yes' * 1000 ♦ Sure that works too but sounds like your stu..stu..studdering. > or did

Re: A Dangling Tk Entry

2009-03-10 Thread r
On Mar 10, 10:52 am, "W. eWatson" wrote: [snip: biting the hand that feeds] This is not the first time you have come to c.l.py with "hat in hand" seeking help and then scoffed at suggestions made by well respected posters. I should have known you would just do the same again. I don't know what yo

Re: A Dangling Tk Entry

2009-03-10 Thread r
Alright try this code. The only thing that i left out was inheriting from Frame, but since i cannot see your entire progam i did not want to do that for fear of breaking some other code. You had a lot of useless code in there and more code that was just a spaghetti mess. If you want to return a dic

Re: A Dangling Tk Entry

2009-03-10 Thread r
OK, here is a slightly cleaned up version of this horrible code. I did not change too much at one time for fear of confusing you. The main problem is you did not explicitly grid the entry like i told you earlier, and why you are using eval is beyond any measure of sanity... from Tkinter import * i

Re: A Dangling Tk Entry

2009-03-09 Thread r
Walter, Why don't you just explain in simple English exactly what you would like to do. You posts have jumped from "why this" to "why that" and none of your jumping around makes much sense. Typically you want to concentrate on one problem at a time and move in a linear fashion not hop around aimle

Re: Is python worth learning as a second language?

2009-03-09 Thread r
On Mar 9, 5:43 am, ZikO wrote: Is python worth learning as a second language? Short answer: Yes Long answer: 'Ye%s' %'s'*1000 -- http://mail.python.org/mailman/listinfo/python-list

Re: Packaging Survey

2009-03-09 Thread R. David Murray
sort of mechanism for a site to say "I'm not claiming anything about my identity, I'm just providing you an https channel over which to talk to me securely". I fault the designers of https for this oversight. -- R. David Murray http://www.bitdance.com -- http://mail.python.org/mailman/listinfo/python-list

Re: A Dangling Tk Entry

2009-03-08 Thread r
On Mar 8, 9:34 pm, "W. eWatson" wrote: > Radiboutton(master, textvariable = ... > Radiobutton(msster, textvariable = ... > Checkbox(master, text=... > entry = Entry(master, width=10, ... > entry.insert(0,self.slowdown)    # testing a default methodology > Label( master, text="Max... > Entry(maste

Re: Ban Xah Lee

2009-03-08 Thread r
On Mar 8, 1:24 pm, Steven D'Aprano wrote: > r wrote: > > This is to all usenet readers who think they own c.l.py! > > [snip abusive, anti-social rant] > > Well, after kill-filing this kiddie for a few months, I thought I'd give him > a chance. By pure luck I

Re: Ban Xah Lee

2009-03-08 Thread r
On Mar 7, 5:52 pm, Xah Lee wrote: > HARASSMENT BY JOHN BOKMA > > I was harassed by a newsgroup poster John Bokma (a regular of > comp.lang.perl.misc) to have my web hosting service provider kick me > off. This happened in 2006. I know the feeling. I have this super geek with nothing but time on

Re: Ban Xah Lee

2009-03-08 Thread r
On Mar 8, 7:50 am, "D'Arcy J.M. Cain" wrote: > So you are going to repeat his postings in their entirety so that those > that block him will see them anyway, right?  Wrong.  We'll just block > your posts too. > > *plonk* This is to all usenet readers who think they own c.l.py!

Re: Themed TK (tk Tile) at last?!

2009-03-07 Thread r
Hip, Hip, Hooray! -- http://mail.python.org/mailman/listinfo/python-list

Re: should i move on to python3

2009-03-07 Thread R. David Murray
roblems of the new io package), I think the only reason not to move to python3 will be any dependency one might have on 3rd party packages that haven't themselves made the switch yet. Of course, that will be a big issue for some time to come for many people. -- R. David Murray http://www.bitdance.com -- http://mail.python.org/mailman/listinfo/python-list

Re: A Simple Tkinter Control Program--Slight Problem

2009-03-04 Thread r
On Mar 4, 12:09 pm, "W. eWatson" wrote: > Here's what I think the author meant in discussing a control variable sample > program. > > from Tkinter import * > > v=Tk.StringVar() [snip] If you do a "from Tkinter import *" then here is the proper line... v =

Re: What does self.grid() do?

2009-03-04 Thread r
PS: Check here http://effbot.org/tkinterbook/ There are three geometry managers "pack", "place", and "grid". Be sure to learn the pros and cons of all three. -- http://mail.python.org/mailman/listinfo/python-list

Re: What does self.grid() do?

2009-03-04 Thread r
> What exactly is meant by "widgets that layout themselves"- what is the > right way to do this? He means you can't control it at creation time, you would have to call w.pack_configure() if you did not like the default options. There are times however when you DO want a widget to pack itself.. fr

OTish: convince the team to drop VBScript

2009-02-28 Thread Christian R.
Hello, Brand new to this list, I've not found a quick way to search the archives, and this is not a technical question. I've just been hired at a digital signage company. They use VBScript for simple-to-medium scripting. I've abandoned it about 8 years ago. I want to convince the manager and the

Re: Python 3D CAD -- need collaborators, or just brave souls :)

2009-02-24 Thread r
On Feb 20, 3:09 pm, Dotan Cohen wrote: > > Even 3DS or Maya is easier to learn that Blender. > > Notepad is easier to learn that VI. Not a good program does simple make. And not a good program does complex make either Yoda. Assembly language is very powerful and allows full control down to the p

Re: Python 3D CAD -- need collaborators, or just brave souls :)

2009-02-19 Thread r
On Feb 19, 2:29 am, Lie wrote: > On Feb 18, 8:02 pm, r wrote: > Blender's UI is designed for effective and efficient 3D workflow, not > for low learning curve. And that will be it's downfall! I know what what Blenders UI is designed for. However not too many people get relig

Re: Python 3D CAD -- need collaborators, or just brave souls :)

2009-02-18 Thread r
Yes i want linux, windows, and mac support. I think you are good for a few years though :). Getting something up and working is the easy part. Adding all the features that are required to compete with something the likes of SolidWorks or ACAD takes time. One way or another i am going to build thi

Re: Python 3D CAD -- need collaborators, or just brave souls :)

2009-02-18 Thread r
Hello Josh, Blender is a lost cause. It is a powerful app but the UI is horrible. Even the Blender folks admit only a complete rewrite could solve the major flaws that plague the design. So maybe i could salvage some code but for what i have in mind, Blender will look like a piece of software from

Re: ANN: SuPy - Script Sketchup with Python

2009-02-14 Thread r
Great work Greg, you are a Python zen master! -- http://mail.python.org/mailman/listinfo/python-list

Re: A little bit else I would like to discuss

2009-02-12 Thread r
On Feb 12, 2:04 pm, azrael wrote: > Sometimes I really get confused when looking out for a modul for some > kind of need. Sometimes I get frightened when I get the resaults. 8 > wraper for this, 7 wrapers for that, 10 modules for anything. Between > them are maybe some kind of small differences, b

Re: Thank you, Tkinter. (easy to use)

2009-02-11 Thread r
Hello, Tkinter is a great GUI toolkit, for what it lacks in prettiness it more than makes up for in simple and quick GUI building. I think this is the main reason Tkinter continues to be Python's built-in GUI toolkit. It is a great place to start for those with no GUI experience. Sure it will neve

Re: Using TK and the canvas.

2009-02-10 Thread r
On Feb 10, 1:27 pm, Kalibr wrote: [snip] > Now I know all I have to do is set the SkillInfos parent to a canvas, > but how would I arrange and draw the lines? Thanks all :) You should really check out wxPython, there is support for just this type of thing. of course you could do this with Tkinter

Re: Best 3d graphics kit for CAD program???

2009-02-09 Thread r
OpenCascade looks promising. I had look at this before a while back and forgot about it. For now i am taking the OpenGL plunge and I will see where that takes me...? Thanks Duane -- http://mail.python.org/mailman/listinfo/python-list

Re: Best 3d graphics kit for CAD program???

2009-02-09 Thread r
On Feb 9, 1:33 pm, Stef Mientki wrote: > Maya ? > Blender ? > I forgot: > pySoy > Intensity Thanks Stef, I actually got OpenGL to install(finally) and now i am thinking ? maybe? i should just go with OpenGL using the wxglcanvas. I have been also "messing" around with Bender but i think i want a

Re: getting values from a text file (newby)

2009-02-01 Thread r
On Feb 1, 11:50 am, Steve Holden wrote: > And then, to conert the last field to numbers? ... Are you asking me Steve? Well i did not want to short-circuit the OP's learning process by spoon-feeding him the entire answer. I thought i would give him a push in the right direction and observe the out

Re: getting values from a text file (newby)

2009-02-01 Thread r
Try the csv module py> import csv py> reader = csv.reader(open(csvfile, "rb")) py> for row in reader: print row ['1', 'house', '2,5 '] ['2', 'table', '6,7 '] ['3', 'chair', '-4,5 '] -- http://mail.python.org/mailman/listinfo/python-list

Re: what IDE is the best to write python?

2009-02-01 Thread r
On Feb 1, 1:42 am, "mcheun...@hotmail.com" wrote: > Hi all >    what IDE is the best to write python? That's like asking boxers or briefs, everybody thinks their choice is the best. I like freedom if that gives you a hint. :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Embedding numpy works once, but not twice??

2009-01-31 Thread r
> Embedding numpy works once, but not twice?? That's what she said! -- http://mail.python.org/mailman/listinfo/python-list

Re: Does the Python community really follow the philospy of "Community Matters?"

2009-01-31 Thread r
On Jan 31, 7:24 pm, John Machin wrote: > A most munificent malapropism! Sherman's goat must be serene with > entropy!! Who say's George Bush did't have anything to offer :). He was the decider after all. -- http://mail.python.org/mailman/listinfo/python-list

Re: receive and react to MIDI input

2009-01-31 Thread r
Sorry i gave you the wrong module, try PMIDI for python 2.5 (win32.exe): http://sourceforge.net/project/showfiles.php?group_id=65529&package_id=106729 Also try this page near the bottom under "MIDI Mania" for more http://wiki.python.org/moin/PythonInMusic -- http://mail.python.org/mailman/listinfo

Re: Does the Python community really follow the philospy of "Community Matters?"

2009-01-31 Thread r
On Jan 30, 4:36 pm, Steve Holden wrote: [snip] > It's mostly a matter of teaching by example. I'd like to think I usually > set a good example, but I've certainly been known to get crabby from time > to time Steve you are defiantly the better of two evils around here :D -- http://mail.python.org/

Re: Does the Python community really follow the philospy of "Community Matters?"

2009-01-30 Thread r
On Jan 30, 2:26 am, John Machin wrote: [snip] > This doesn't appear to match the description. Perhaps the PSU has > subverted my comp)(*&^...@! > NO CARRIER Oops -- Good catch John, Even perfect people like myself make mistakes :). Here is the aforementioned thread where a Python user was chastis

Re: Does the Python community really follow the philospy of "Community Matters?"

2009-01-29 Thread r
On Jan 29, 11:53 pm, James Mills wrote: > On Fri, Jan 30, 2009 at 3:38 PM, r wrote: > > This observation leads me to two scientific and common sense synopsis. > > Either nobody here gives a rats pa'toote about Python, and/or they are > > all just a bunch of gutless wo

Re: Does the Python community really follow the philospy of "Community Matters?"

2009-01-29 Thread r
On Jan 29, 6:21 pm, r wrote: > Also if anyone dares to mention that Python is a great language or > better in this reguard or that, they get jumped and beat to death by > their "so-called" brothers. This observation leads me to two scientific and common sense synopsis. Either

Re: search speed

2009-01-29 Thread r
On Jan 29, 5:51 pm, anders wrote: > if file.findInFile("LF01"): > Is there any library like this ?? > Best Regards > Anders Yea, it's called a for loop! for line in file: if "string" in line: do_this() -- http://mail.python.org/mailman/listinfo/python-list

Re: Does the Python community really follow the philospy of "Community Matters?"

2009-01-29 Thread r
On Jan 29, 9:01 pm, alex23 wrote: > Seriously, how -old- are you? Twelve? Thirteen? Ah, my good friend alex23. Somehow -- when i was writing this post -- i knew you would drop in and i swear i do not have any ESP abilities -- somehow i just knew. While your here why don't we take a walk down mem

Does the Python community really follow the philospy of "Community Matters?"

2009-01-29 Thread r
I been around the list for a while and rubbed sholders with some pythonistas(some you would not beleieve if i told you) and i just don't see a community spirit here. Where are the community projects supporting Python? -- besides the core devlopment. Seem s that nobody is interested unless their pa

Re: receive and react to MIDI input

2009-01-29 Thread r
On Jan 29, 1:33 pm, elsjaako wrote: There is a Python MIDI module, i think it is pyMIDI, have you checked it out? -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get atexit hooks to run in the presence of execv?

2009-01-29 Thread R. Bernstein
Mark Wooding writes: > ro...@panix.com (R. Bernstein) writes: > >> Recently, I added remote debugging via TCP sockets. (Well, also FIFO's >> as well but closing sockets before restarting is what's of concern.) >> >> I noticed that execv in Python 2.5.2 doe

Re: Tkinter w.pack()?

2009-01-28 Thread r
On Jan 28, 10:57 pm, "W. eWatson" wrote: > The word pack doesn't exist on the NMT pdf. Maybe there's a newer one? Only the grid manager is discussed at NMT. I just like how at NMT the widget attributes are in a table and then a list the widget methods follows below that -- much better navigation.

Re: Tkinter w.pack()?

2009-01-28 Thread r
To expand on this there exists three geometry mangers [grid, pack, place]. I personally use pack() the most, grid() almost never, and place -- well never. But each one has it's strengths and weaknesses. w.grid() http://effbot.org/tkinterbook/grid.htm w.place() http://effbot.org/tkinterbook/place.

Re: Tkinter w.pack()?

2009-01-28 Thread r
On Jan 28, 10:12 pm, "W. eWatson" wrote: > Where in the world is a description of pack() for Tkinter widgets? Is it > some sort of general method for all widgets? I'm looking in a few docs that > use it without ever saying where it is described. For one, >

How to get atexit hooks to run in the presence of execv?

2009-01-28 Thread R. Bernstein
As a hobby I've been (re)writing a debugger. One of the commands, "restart", works by calling an execv(). You may need to do this when the program you are debugging is threaded or when one needs to ensure that all program state is reinitialized. Recently, I added remote debugging via TCP sockets.

Re: What is intvar? [Python Docs]

2009-01-28 Thread r
On Jan 26, 11:15 am, "W. eWatson" wrote: > I might be repeating myself here, but If anyone has pdf experience, and > could provide page numbers and maybe a TOC for some of Lundh's > contributions, that would be helpful. Did you try this one? http://effbot.org/tkinterbook/tkinter-index.htm here i

Re: Drawing and Displaying an Image with PIL

2009-01-27 Thread r
Change this line: draw.line((0,0),(20,140), fill=128) To This: draw.line((0,0, 20,140), fill=128) And you should be good to go. Like you said, if you need to combine 2 tuples you can do: (1,2)+(3,4) -- http://mail.python.org/mailman/listinfo/python-list

Re: Drawing and Displaying an Image with PIL

2009-01-27 Thread r
On Jan 27, 9:15 pm, "W. eWatson" wrote: > Here's my program: > > # fun and games > import Image, ImageDraw > > im = Image.open("wagon.tif") # it exists in the same Win XP > # folder as the program > draw = ImageDraw.Draw(im) > draw.line((0, 0) + im.size, fill=128) > draw.line((0,0),(20,140), fill=

Spam making a comeback??

2009-01-27 Thread r
Seems like the level of spam is increasing in the last week, and today has been bad. How are the spambytes coming along? -- http://mail.python.org/mailman/listinfo/python-list

IDLE 3000 (suggested improvements)

2009-01-27 Thread r
Proposal: OK, so the python language has officially moved into the next level. I look at IDLE and think, hmm great IDE but it could really use a spit shining. So here is a very simple script showing my ideas to improve IDLE. Reason for change: The text widget and the prompt(>>>) should be separate

Re: Why this code is working?

2009-01-25 Thread r
Actually Alex, i have not stopped working on getting Python into SU in one form or another since that crazy post of mine almost 3 moths ago. I have many people in the SU community asking me almost daily when i will get finished. I have a lot of work to do at this point but i will keep fighting beca

Re: What is intvar?

2009-01-25 Thread r
W. eWatson, I contacted the author of New Mexico Techs "Introduction to Tkinter" a couple of weeks ago. He is going to update the reference material with a few missing widgets and some info on Photo and Bitmap classes. I really love the NMT layout and use it quite often. Fredricks Tkinterbook is m

Re: Why this code is working?

2009-01-25 Thread r
On Jan 23, 10:02 pm, alex23 wrote: [snip] > How's that Python bridge to SketchUp coming > along? It's been months already, surely you've invested as much effort > into learning Python as you have in talking about it? Thanks for asking Alex23, The ball is rolling on the Python SketchUp integration

Re: *.python.org broken?

2009-01-24 Thread r
On Jan 24, 7:06 pm, tgvaug...@gmail.com wrote: > Hi all, > > Is anybody else having trouble accessing sites (including www, docs, > wiki) in the python.org tree, or is it just me? (Or just .au?) > > Cheers, > > Tim No problem here??? -- http://mail.python.org/mailman/listinfo/python-list

Re: Why this code is working?

2009-01-23 Thread r
Yes promoting freedom, claiming that freedom is a good thing, and not being afraid to open my mouth about it, fight for it, free others from their bonds, makes me free. No presumption was made about the OP, the only "meaning" in my message was to free the OP from his self imposed bonds while using

Re: Suggested improvements for IDLE (non-official)

2009-01-23 Thread r
On Jan 16, 1:55 am, Terry Reedy wrote: > > Maybe I'm misunderstanding something here, but "About Idle" in Python > > 2.6.1 (win32) says "Tk version: 8.5" As to Tk, i was referring to Themes. I may have the versions mixed up but the newest TK supports themes and i would love to get that support i

Re: Find all available Tkinter cursor names?

2009-01-23 Thread r
On Jan 23, 9:18 am, Kevin Walzer wrote: > http://wiki.tcl.tk/8674might offer some help in this regard. > Kevin Walzer > Code by Kevinhttp://www.codebykevin.com Many Thanks Kevin, this may help! -- http://mail.python.org/mailman/listinfo/python-list

Re: What is intvar?

2009-01-22 Thread r
here is a good explanation of control vars: http://infohost.nmt.edu/tcc/help/pubs/tkinter/control-variables.html Here are 3 great Tkinter refernces in order: http://infohost.nmt.edu/tcc/help/pubs/tkinter/ http://effbot.org/tkinterbook/ http://www.pythonware.com/library/tkinter/introduction/ -- htt

Re: Find all available Tkinter cursor names?

2009-01-22 Thread r
Thanks Kevin, These are exactly the ones i already knew about. I was hoping there where more, shucks!. I wonder how i could go about making my own cursors and adding them to Tkinter? Have any ideas? -- http://mail.python.org/mailman/listinfo/python-list

Find all available Tkinter cursor names?

2009-01-22 Thread r
Anybody know how to find all the available Tkinter cursor icon names, or where the icons are stored? like "paintbrush" "pencil" etc... -- http://mail.python.org/mailman/listinfo/python-list

Cannot contact Python webmaster!

2009-01-21 Thread r
Does anybody know how to get in touch with the www.python.org website maintainers? i sent mail to webmas...@python.org but it just bounces back. Is anybody even there? :) -- http://mail.python.org/mailman/listinfo/python-list

<    2   3   4   5   6   7   8   9   10   11   >