Design advice for unit test asserters

2005-04-21 Thread Gary
or more natural way to solve this problem. Thanks, Gary -- http://mail.python.org/mailman/listinfo/python-list

Re: Design advice for unit test asserters

2005-04-27 Thread Gary
First, thanks to both Kent and Edvard for useful comments. I certainly need to consider whether it make sense to switch to py.test at this time; its simplicity is attractive. In response to Edvards question: Edvard Majakari wrote: Gary [EMAIL PROTECTED] writes

Business Spirituality

2005-05-17 Thread Gary
If you are interested in Business and Spirituality visit us at http://www.executivecoachingservices.ca -- http://mail.python.org/mailman/listinfo/python-list

Empty string namespace on XP in minidom

2007-07-07 Thread Gary
' Should the library on XP be updated? Gary -- http://mail.python.org/mailman/listinfo/python-list

Re: Allowing Arbitrary Indentation in Python

2007-12-19 Thread Gary
Hi! I'd like to join the fray, as the person who posted that original LJ rant. First, some full disclosure, and stampings out of what seem to me to be misconceptions... 1) I am not a CS major. I majored in Computer Animation at an art college. I'm quite well aware that I don't know all there is

Re: Allowing Arbitrary Indentation in Python

2007-12-19 Thread Gary
Hi! I'd like to join the fray, as the person who posted that original LJ rant. First, some full disclosure, and stampings out of what seem to me to be misconceptions... 1) I am not a CS major. I majored in Computer Animation at an art college. I'm quite well aware that I don't know all there is

Re: Allowing Arbitrary Indentation in Python

2007-12-19 Thread Gary
On Dec 19, 3:19 pm, Grant Edwards [EMAIL PROTECTED] wrote: The problem is that to everybody else in the world, indentation in Python represents control flow nesting, not GUI widget nesting. Thanks, Grant. That's the first solid reasoning I've seen, and it's a very solid argument, as well. To

Re: Allowing Arbitrary Indentation in Python

2007-12-19 Thread Gary
On Dec 19, 3:50 pm, Chris Mellon [EMAIL PROTECTED] wrote: You have been done a disservice by whoever wrote the Maya python bindings, as far as using this tool to improve your knowledge and understanding of Python goes. No worries there. I'm definitely not using Maya as the way to learn

Re: Allowing Arbitrary Indentation in Python

2007-12-19 Thread Gary
On Dec 19, 6:44 pm, Ross Ridge [EMAIL PROTECTED] wrote: Sam [EMAIL PROTECTED] wrote: cmds.window(t='gwfUI Builder') cmds.paneLayout(configuration='vertical3', ps=((1, 25, 100), (3, 20, 100))) cmds.paneLayout(configuration='horizontal2') cmds.frameLayout(l='Layouts')

Re: Allowing Arbitrary Indentation in Python

2007-12-19 Thread Gary
On Dec 19, 6:44 pm, Ross Ridge [EMAIL PROTECTED] wrote: Sam [EMAIL PROTECTED] wrote: cmds.window(t='gwfUI Builder') cmds.paneLayout(configuration='vertical3', ps=((1, 25, 100), (3, 20, 100))) cmds.paneLayout(configuration='horizontal2') cmds.frameLayout(l='Layouts')

Re: Allowing Arbitrary Indentation in Python

2007-12-19 Thread Gary
On Dec 19, 7:01 pm, Terry Reedy [EMAIL PROTECTED] wrote: Hi, Gary. Welcome to Python. I hope you will take some of the reaction you got as initiatory ribbing. Thanks, Terry, and absolutely! You guys are quite tame compared to some of the lions whose dens I've stumbled into on usenet. You're

Re: Allowing Arbitrary Indentation in Python

2007-12-19 Thread Gary
On Dec 19, 7:01 pm, Terry Reedy [EMAIL PROTECTED] wrote: Hi, Gary. Welcome to Python. I hope you will take some of the reaction you got as initiatory ribbing. Thanks, Terry, and absolutely! You guys are quite tame compared to some of the lions whose dens I've stumbled into on usenet. You're

Re: Allowing Arbitrary Indentation in Python

2007-12-20 Thread Gary
On Dec 19, 10:10 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: ElementTree is a good candidate for processing xml: http://effbot.org/zone/element.htm It provides a natural way to access elements and attributes, instead of writing the same handler again and again or using slow DOM functions

Re: Allowing Arbitrary Indentation in Python

2007-12-20 Thread Gary
On Dec 19, 10:10 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: ElementTree is a good candidate for processing xml: http://effbot.org/zone/element.htm It provides a natural way to access elements and attributes, instead of writing the same handler again and again or using slow DOM functions

Proxy server?

2008-07-28 Thread Gary
I've seen examples for HTTP and FTP use, but not for simply any TCP data on any port, which is what I require. Can anyone please point me in the right direction? TIA -- http://mail.python.org/mailman/listinfo/python-list

Re: Proxy server?

2008-07-28 Thread Gary
Diez B. Roggisch [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Gary wrote: For what? A non-transparent proxy, for anonymity purposes only. -- http://mail.python.org/mailman/listinfo/python-list

Re: Proxy server?

2008-07-30 Thread Gary
Diez B. Roggisch [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Gary schrieb: Diez B. Roggisch [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] You can't make any TCP/IP communication run through a proxy, unless it's transparent. Thanks for all the info. I'm puzzled

Re: problems with looping, i suppose

2006-03-27 Thread Gary
a WinXP box and that's where it is here. My poor old mind can't dredge up whether it's in the same relative place in say, a Linux installation.) IDLE isn't perfect but it'll get you started. (Also, FWIW, if you run this under IDLE, you can omit the trailing raw_input()) hope this helps. gary

Re: file write collision consideration

2009-01-22 Thread Gary
It would help to know which version of Python when giving examples... I recollect that so-called mutex operation wasn't actually thread safe when using Python 2.5, but perhaps that was wrong, or subsequent versions have fixed that? -- http://mail.python.org/mailman/listinfo/python-list

Can someone help please

2011-07-21 Thread Gary
Hi Can someone help me with this code below please, For some reason it will not send me the first text file in the directory. I made up an empty file a.txt file with nothing on it and it sends the files i need but would like to fix the code. Thanks total = ' '

hi can someone help please key bind

2011-10-15 Thread Gary
Hi im trying to use key bind on Tkinter to call this function def Start(): for i in range(60,-1,-1): ent['text'] = i time.sleep(1) root.update() ent['text'] = 'Time Out!' root.update() i know the function is ok as i have assigned a button and i calls the

Fredericksburg, VA ZPUG June 8

2005-06-01 Thread Gary Poster
of every month. Location will be at the Zope Corporation offices. Further details below, and at http://www.zope.org/Members/poster/fxbgzpug_announce. Gary - Fredericksburg, VA ZPUG: second Wednesday of every month, 7:30-9:00 First meeting: June 8, 7:30. Speaker: Tres Seaver, architect

Fredericksburg, VA ZPUG August 10: .Net, functional testing

2005-08-03 Thread Gary Poster
. Hope to see you there! Gary General ZPUG information When: second Wednesday of every month, 7:30-9:00. Where: Zope Corporation offices. 513 Prince Edward Street; Fredericksburg, VA 22408 (tinyurl for map is http://tinyurl.com/duoab). Parking: Zope

Sept 14 Fredericksburg, VA ZPUG: Packaging with zpkg, review of Python Cookbook 2nd ed

2005-09-12 Thread Gary Poster
will present a discussion of zpkg, the Zope Packaging Tools (http:// www.zope.org/Members/fdrake/zpkgtools/). - Gary Poster, Zope Corp Senior Software Engineer, will present a brief review of the second edition of the O'Reilly Python Cookbook (http://www.oreilly.com/catalog/pythoncook2/). - We

Fifth Fredericksburg, VA ZPUG Meeting

2005-10-11 Thread Gary Poster
(tinyurl for map is http://tinyurl.com/duoab). Parking: Zope Corporation parking lot; entrance on Prince Edward Street. Topics: As desired (and offered) by participants, within the constraints of having to do with Python. Contact: Gary Poster ([EMAIL PROTECTED]) [1] From www.asterisk.org

Fredericksburg, VA ZPUG Meeting: November 9, 7:30-9:00 PM

2005-11-02 Thread Gary Poster
; entrance on Prince Edward Street. Topics: As desired (and offered) by participants, within the constraints of having to do with Python or Zope. Contact: Gary Poster ([EMAIL PROTECTED]) -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software

Revised announcement for tonight's Fredericksburg ZPUG

2005-11-09 Thread Gary Poster
This is a revised announcement for tonight's Fredericksburg ZPUG meeting. Andrew Sawyers is postponing his Squid and Zope presentation until the January ZPUG meeting (January 11, 2006). This is the new agenda: -- Please join us November 9, 7:30-9:00 PM, for the sixth meeting of the

Fredericksburg VA ZPUG: No December meeting; details on Jan and Feb meetings

2005-11-27 Thread Gary Poster
As discussed at the November Fredericksburg, VA ZPUG meeting, we are not going to have a December 14 ZPUG because of holiday goings-on. Andrew Sawyers will present on Squid and Zope in our January 11 meeting (other topics TBD). Zac Bir, Benji York, and Gary Poster will present in our

Fredericksburg, VA ZPUG Meeting: January 11, 7:30-9:00 PM

2006-01-05 Thread Gary Poster
://tinyurl.com/duoab). Parking: Zope Corporation parking lot; entrance on Prince Edward Street. Topics: As desired (and offered) by participants, within the constraints of having to do with Python or Zope. Contact: Gary Poster ([EMAIL PROTECTED]) -- http://mail.python.org/mailman/listinfo/python

Fredericksburg VA ZPUG, tomorrow 7:30-9 PM: Jim Fulton's State of Zope

2006-03-07 Thread Gary Poster
Corporation parking lot; entrance on Prince Edward Street. Topics: As desired (and offered) by participants, within the constraints of having to do with Python or Zope. Contact: Gary Poster ([EMAIL PROTECTED]) -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python

ZPUG Wed. May 10: pygame and Twisted+PyObjC+Flickr!

2006-05-09 Thread Gary Poster
(and offered) by participants, within the constraints of having to do with Python or Zope. Contact: Gary Poster ([EMAIL PROTECTED]) -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations.html

Fredericksburg, VA ZPUG June 14: meld3 templating and memcached sessions

2006-06-07 Thread Gary Poster
' product to do shared session management in Zope. Gary General ZPUG information When: second Wednesday of every month, 7:30-9:00. Where: Zope Corporation offices. 513 Prince Edward Street; Fredericksburg, VA 22408 (tinyurl for map is http://tinyurl.com

Fredericksburg, VA ZPUG July 12: Jim Fulton's buildout package, Python + Fortran, roundtable

2006-07-10 Thread Gary Poster
in Python. - We will have a roundtable discussion of Python and Zope topics. Gary General ZPUG information When: second Wednesday of every month, 7:30-9:00. Where: Zope Corporation offices. 513 Prince Edward Street; Fredericksburg, VA 22408 (tinyurl

Fredericksburg, VA ZPUG July 12: Jim Fulton's buildout package, Python + Fortran, roundtable

2006-07-12 Thread Gary Poster
for assembling applications from multiple parts, Python or otherwise. See http://svn.zope.org/zc.buildout/trunk/. - John Kimball will present a lightning talk of Fortran in Python. - We will have a roundtable discussion of Python and Zope topics. Gary General

No August Fredericksburg ZPUG

2006-08-08 Thread Gary Poster
The Fredericksburg, VA ZPUG will be taking a break this month: no August 9 meeting. Thanks Gary -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations.html

Re: IPython colors in windows

2005-02-05 Thread Gary Bishop
Claudio Grondi [EMAIL PROTECTED] wrote: Ashot [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] whoa, that was quick, looks like it works for me. Thanks a lot! It would be nice to be able to set the colors in the prefs file, although its possible to edit the pyColorize file

Re: IPython colors in windows

2005-02-05 Thread Gary Bishop
On SourceForge you will find release 1.12 of my Python readline module. If you don't want to hack the colors, there is no reason to upgrade from 1.11 to 1.12. They *should* work the same. But if you'd like to hack the iPython colors this new version makes it possible. In your ipythonrc file add

Re: pyFMOD writing a callback function in Python

2005-02-10 Thread Gary Bishop
Check out pySonic, a new FMOD wrapper written with Pyrex. Much more Pythonic. gb -- http://mail.python.org/mailman/listinfo/python-list

Re: What do you use as symbols for Python ?

2005-11-10 Thread Gary Herron
(3) Then you can refer to the values as State.OPENED State.CLOSED State.ERROR The extra clarity (and slight wordiness) of the dotted notation seems, somehow, quite Pythonic to me. Gary Herron -- Gary Herron, PhD. Department of Computer Science DigiPen Institute of Technology (425

Re: weird problem with os.chmod

2005-11-11 Thread Gary Herron
James Colannino wrote: James Colannino wrote: So then I entered the command print 0600, and saw that the actual number being output was 384 (why would it output 384?!) Ok, so further research revealed that 0600 is actually the octal representation for 384 (which makes sense.) So

How to write an API for a Python application?

2005-11-14 Thread Gary Kshepitzki
of doing itas a python COM server but I am not familiar with COM and I saw that implementing a COM server with events in python is not trivial. Is there a better (or simpler) solution?What are the common ways for doing that? Any answer would be greatly appreciated. Regards Gary -- http

Re: how to convert between type string and token

2005-11-14 Thread Gary Herron
faster. Good luck, Gary Herron enas khalil wrote: hello all when i run the code : # -*- coding: cp1256 -*- from nltk.tagger import * from nltk.corpus import brown from nltk.tokenizer import WhitespaceTokenizer # Tokenize ten texts from the Brown Corpus

Sending an event from a python COM server to a VB COM client

2005-11-15 Thread Gary Kshepitzki
be highly appreciated. Regards Gary -- http://mail.python.org/mailman/listinfo/python-list

Re: Sending an event from a python COM server to a VB COM client

2005-11-16 Thread Gary Kshepitzki
really looking for an example that will spell things out for me. There's a lot of 'wrapping' happening under the hood in this technology and I am kind of lost between what is done for me on each side and what I should explicitly do my self. Thanks again for taking the time to answer. Gary

How to write an API for a Python application?

2005-11-16 Thread Gary Kshepitzki
of doing it as a python COM server but I am not familiar with COM and I saw that implementing a COM server with events in python is not trivial for me. Is there a better (or simpler) solution? What are the common ways for doing that? Any answer would be highly appreciated. Regards Gary -- http

Re: How to write an API for a Python application?

2005-11-16 Thread Gary Kshepitzki
Thanks Its an interesting solution but I need a more closely coupled solution, with real time events, so the communication really has to be 2 ways, and not by polling. Thanks for putting the time and though. Gary [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] While not sure

Bug 834351 - Mouse wheel crashes program

2004-12-08 Thread Gary Richardson
Has this bug been fixed in 2.3.5 or 2.4? Does it exist in XP systems? #- from Tkinter import * def _onMouseWheel(event): print event root = Tk() root.bind('MouseWheel',_onMouseWheel) root.mainloop() -- http://mail.python.org/mailman/listinfo/python-list

Re: example code sought

2004-12-19 Thread Gary Richardson
Sean McIlroy [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] There's something quite simple I'd like to do, but I'm hampered by lack of knowledge regarding Tkinter. If someone could help me out with a snippet of maximally-simple code showing, in general terms, how to do this, that

Re: Reaching the real world

2005-01-04 Thread Gary Richardson
Fuzzyman [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have a friend who would like to move and program lights and other electric/electro-mechanical devices by computer. I would like to help - and needless to say Python would be an ideal language for the 'programmers interface'.

Re: what's wrong with lambda x : print x/60,x%60

2005-12-04 Thread Gary Herron
explicit about the returned tuple would produce what you want. lambda x : (x/60,x%60) Gary Herron [EMAIL PROTECTED] ~ $ python Python 2.4.2 (#1, Nov 18 2005, 19:32:15) [GCC 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)] on linux2 Type help, copyright, credits or license for more

Re: How to Refresh the Desktop window with python script

2005-12-12 Thread Gary Herron
name, mac address, ip address and OS on that system. The platform module can give lots of such info: http://docs.python.org/lib/module-platform.html Good Luck, Gary Herron Thanks in advance for having given a thought on my questions. Regards Yogi -- http://mail.python.org/mailman/listinfo

Re: IsString

2005-12-13 Thread Gary Herron
... Several types would qualify as numbers: IntType, FloatType, LongType, and ComplexType, and several as strings: StringType and UnicodeType Gary Herron -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido at Google

2005-12-22 Thread Gary Herron
it... What's your complaint, what's your solution, and why should we listen? Gary Herron -- http://mail.python.org/mailman/listinfo/python-list

Re: Indentation/whitespace

2005-12-23 Thread Gary Herron
it to the wall, and start walking backwards. You will still be able to discern the structure of the code *long* after you can no longer identify the curly-braces. (Provided you properly indented you C++ code -- you *do* indent you C++ code don't you?) Gary Herron Note: No need to follow up with long

Re: Indentation/whitespace

2005-12-23 Thread Gary Herron
. That was an April Fools joke. Gary Herron -- http://mail.python.org/mailman/listinfo/python-list

Re: reading files into dicts

2005-12-29 Thread Gary Herron
, to take over complete control of your program. So be carefully. Gary Herron -- http://mail.python.org/mailman/listinfo/python-list

Re: Global Variables in OOP and Python

2005-12-30 Thread Gary Herron
= os.getcwd() # Get working directory at startup (Even if the import of Parameters in some file occurs before the initialization code has a chance to run.) Gary Herron in all of the files (namespaces) where it is needed. Is there a better way? Are the two ideas presented above acceptable? If so

Re: important for me!!

2006-01-02 Thread Gary Herron
this process until the file runs out of words. (Hint:you can use ramdom.shufflefunction to scramble the letters) Please can you answer this problem? This sounds like a school assignment. We make it a habit here to *not* answer such questions. Sorry, and good luck with your studies. Gary Herron

Re: how to improve this simple block of code

2006-01-11 Thread Gary Duzan
') Gary Duzan Motorola CHS -- http://mail.python.org/mailman/listinfo/python-list

Re: Newcomer question wrt variable scope/namespaces

2006-01-13 Thread Gary Duzan
, not the modification of the objects to which they refer. Gary Duzan Motorola CHS -- http://mail.python.org/mailman/listinfo/python-list

Re: No newline using printf

2005-09-16 Thread Gary Herron
exactly the characters you want to sys.stdout. Thus: sys.stdout.write('%1d' % i) should do what you want. Dr Gary Herron Digipen Institute of Technology -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Source Code for a HTTP Proxy

2005-09-23 Thread Gary Herron
llothar wrote: Hello, i'm looking for a simple http proxy in python. Does anybody know about something like this ? Here's a list, maintained by Alan Kennedy, of about 20 proxys written in Python: http://xhaus.com/alan/python/proxies.html Enjoy, Gary Herron -- http://mail.python.org

Re: vim configuration for python

2005-05-26 Thread Gary Johnson
. HTH, Gary -- http://mail.python.org/mailman/listinfo/python-list

Fredericksburg, VA ZPUG June 8

2005-06-01 Thread Gary Poster
will be at the Zope Corporation offices. Further details below, and at http://www.zope.org/Members/poster/fxbgzpug_announce. Gary - Fredericksburg, VA ZPUG: second Wednesday of every month, 7:30-9:00 First meeting: June 8, 7:30. Speaker: Tres Seaver, architect of the Zope Content Management

Re: Going crazy...

2005-06-13 Thread Gary Herron
, and they support set differences: from sets import Set Set([1,2,3,4,5,6]) - Set([2,3,6]) Set([1, 4, 5]) Gary Herron -- http://mail.python.org/mailman/listinfo/python-list

Thread priorities?

2005-06-14 Thread Gary Robinson
problem. Or maybe there's another way to temporarily let one thread have priority over all the others? Gary -- Gary Robinson CTO Emergent Music, LLC [EMAIL PROTECTED] 207-942-3463 Company: http://www.goombah.com Blog:http://www.garyrobinson.net -- http://mail.python.org/mailman/listinfo

Re: Slicing every element of a list

2005-07-12 Thread Gary Herron
. Gary Herron Digipen Institute of Technology -- http://mail.python.org/mailman/listinfo/python-list

Re: Newcomer question wrt variable scope/namespaces

2006-01-17 Thread Gary Duzan
Florian Daniel Otel wrote: Gary, First of all, many thanks for the reply. Do I understand it correctly that actually the rule has to be refined as pertaining to the (so called) immutable types (like e.g. integers, tuples/strings) whereas lists and dictionaries are mutable types

Re: Uncompressing TIFF files directly in Python

2006-01-18 Thread Gary Duzan
, including Windows. http://www.pythonware.com/products/pil/ Gary Duzan Motorola CHS -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I dynamically create functions without lambda?

2006-01-27 Thread Gary Herron
Russell wrote: I want my code to be Python 3000 compliant, and hear that lambda is being eliminated. The problem is that I want to partially bind an existing function with a value foo that isn't known until run-time: someobject.newfunc = lambda x: f(foo, x) The reason a nested function

Re: Module imports

2006-01-30 Thread Gary Herron
and standard operation procedure.The functions from myFunctions execute in the environment of the module they were define in, no matter how you import/reference them from another procedure. Just try it and you'll be please with the results. Gary Herron Is there a way to make python

Re: python printout format

2006-02-01 Thread Gary Herron
string.ljust(PortlinkbeatInv[row[j][0]],14), ^ SyntaxError: invalid syntax The problem here is that the previous line has unbalanced parentheses. Fix that, and there should be no problem with this line. Gary Herron How should I change to printout row data [1,2,3,4,5] in one row in assigned

Re: Newbie

2006-02-12 Thread Gary Herron
LittlePython wrote: Is this a good place to post python questions from newbie's, or would you suggest another board? Thx This is the correct place. This group has the reputation of being newbie-friendly. Gary Herron -- http://mail.python.org/mailman/listinfo/python-list

Re: Module question

2006-02-21 Thread Gary Herron
to be performed. Gary Herron -- http://mail.python.org/mailman/listinfo/python-list

Re: pyFMOD writing a callback function in Python

2005-02-19 Thread Gary Bishop
I haven't tried it on Linux but I believe it should work. FMOD works on Linux as does Pyrex. I don't think there is any win32 specific code. Grab the source and try building it. You'll likely have to fool with the libraries and includes in setup.py. gb Marian Aldenh?vel [EMAIL PROTECTED]

class factory example needed (long)

2005-02-26 Thread Gary Ruben
program control are all identical in form. In this example they all call the wrapped method with an argument 42 greater than the value of the number. Does anyone have an example where they've done something similar or could help me out with an example? thanks in anticipation, Gary -- http

Re: class factory example needed (long)

2005-02-28 Thread Gary Ruben
be able to sort it out from here with the info you provided, thanks again, Gary Rainer Mansfeld wrote: snip Hi Gary, you want your 'class factory' to change the methods of Numeric, so that they accept foo objects and return foo objects? I've not the slightest idea how to achieve that. If OTOH you

Re: class factory example needed (long)

2005-03-01 Thread Gary Ruben
be better to do the same thing with class 'static' methods, if this is possible, so that the methods are created just once. Is this possible? Gary Rainer Mansfeld wrote: snip If OTOH you want your foo class to have sqrt, arccos, etc. methods without defining them explicitly, I think you're looking

Re: class factory example needed (long)

2005-03-03 Thread Gary Ruben
Thanks Steven and Kent, both of your suggestions look good to me. I'll try both out and pick one. Gary Gary Ruben wrote: OK, I've managed to get this to work with Rainer's method, but I realised it is not the best way to do it, since the methods are being added by the constructor, i.e

Ruby on Rails or Perl's Maypole..is there a Python equivalent

2005-03-03 Thread Gary Nutbeam
I've noticed that the Perl camp has a very nice web/database environment called Maypole. Ruby has the Rails environment which on the surface seems similar to Maypole. I can't find anything in Python that ties a database to a web interface anywhere near as well as Ruby on Rails or Maypole. I see

Re: Ruby on Rails or Perl's Maypole..is there a Python equivalent

2005-03-03 Thread Gary Nutbeam
Two out of three on the home made approach I was thinking about. Quixote, Cheetah and SQLObject. Thanks for the link. I'm perusing it now. deelan wrote: Gary Nutbeam wrote: (...) Does anyone know of something similar to Rails or Maypole in Python? you may want to take a look at subway

Re: Ruby on Rails or Perl's Maypole..is there a Python equivalent

2005-03-03 Thread Gary Nutbeam
I count zpt as xml because page templates can operate in html or xml mode. This is not a troll. It is a lot of work in Zope to create interfaces to relational data for anything more than simple data models. It's a lot less work in Maypole or Rails, but I don't want to go back to writing in Perl,

Re: Ruby on Rails or Perl's Maypole..is there a Python equivalent

2005-03-07 Thread Gary Nutbeam
John J. Lee wrote: I know mono runs on linux but I want nothing to do with it unless absolutely necessary. Gary Nutbeam [EMAIL PROTECTED] writes: D H wrote: [...] Check out Castle on Rails for .NET/Mono. It is still in early development, but you can use it with C#, VB, or boo, and I'm

Re: Ruby on Rails or Perl's Maypole..is there a Python equivalent

2005-03-07 Thread Gary Nutbeam
Learning Ruby to use Rails is tempting. Iwan van der Kleyn wrote: Gary Nutbeam wrote: needing to learn Ruby. But why wouldn't you just use Rails and learn Ruby in the process? The effort required to learn Ruby pales in comparisson to the advantages using Ruby on Rails might give you, imho

Re: why this error?

2005-03-15 Thread Gary Herron
spencer wrote: Hi, I'm not sure why I can't concatenate dirname() with basename(). Of course you *can* concatenate them, but you're not getting that far. The piece os.path.dirname(os.getcwd) should be os.path.dirname(os.getcwd()) Then it will work without raising an exception, but

Re: IPython - problem with using US international keyboard input scheme on W2K

2005-04-15 Thread Gary Bishop
Fernando Perez [EMAIL PROTECTED] wrote: Claudio Grondi wrote: Considering what I found in the ipython mailing archives and the fact, that after the fix with displaying colors on bright backgrounds Gary had no time yet to get in touch with me about the code I have sent him, I suppose

Python consulting opportunity

2005-04-25 Thread Gary Robinson
an opportunity you'd be interested in, or if you know of someone who might be a match, please let us know. Thanks, Gary -- Gary Robinson CTO Emergent Music, LLC [EMAIL PROTECTED] 207-942-3463 Company: http://www.goombah.com Blog:http://www.garyrobinson.net -- http://mail.python.org

Re: Why not a Python compiler?

2008-02-07 Thread Gary Duzan
/Kessel_Run Gary Duzan Motorola HNM -- http://mail.python.org/mailman/listinfo/python-list

Re: which one is more efficient

2008-02-08 Thread Gary Herron
would be better spent worrying about how to optimize the other portions of you code. Gary Herron -- http://mail.python.org/mailman/listinfo/python-list

Re: different key, same value in dictionaries

2008-02-09 Thread Gary Herron
your own dictionary type from the builtin dictionary type, and map an index operation d[(x,y)] to d[ImmutableSet(a,b)]. Then all of d[a,b], d[b,a], d[(a,b)] and d[(b,a)] would index the same element. See http://docs.python.org/lib/module-sets.html for details of the set module. Gary Herron

Re: Better way to negate a boolean list?

2008-02-10 Thread Gary Herron
operator, and find operator.not_ which is a function and does what you want. Gary Herron -- http://mail.python.org/mailman/listinfo/python-list

Re: Python equivt of __FILE__ and __LINE__

2008-02-11 Thread Gary Herron
for the reader. (Meaning I haven't a clue.) Gary Herron -- http://mail.python.org/mailman/listinfo/python-list

Re: How to access object attributes given a string

2008-02-12 Thread Gary Herron
, 100 ). You want getattr and setattr: setattr(ob, 'blah', 123) and getattr(ob, 'blah') Gary Herron -- http://mail.python.org/mailman/listinfo/python-list

Re: Easy PIL question

2008-02-16 Thread Gary Herron
. Basically I'm trying to make a: if pixel == color: do_this() else: pass And have it do this as fast as my pc can handle (that is why only grabbing 1px would be helpful) Try image.getpixel((x,y)) to retrieve the pixel at (x,y). Gary Herron -- http://mail.python.org/mailman/listinfo

Re: Sys.exit() does not fully exit

2008-02-17 Thread Gary Herron
answer. However, it you *do* want threads, and you don't want the main thread to wait for the threads to quit, you can make the threads daemon threads. See setDaemon method on Thread objects in the threading module. Gary Herron -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3.0

2008-02-18 Thread Gary Herron
is to keep the incompatibilities to a minimum, but subject to the larger goal of producing a cleaner/better language unhindered by the need of absolute compatibility. Gary Herron David Blubaugh -Original Message- From: Bill Hart [mailto:[EMAIL PROTECTED] Sent: Friday, February

Re: Understanding While Loop Execution

2008-02-18 Thread Gary Herron
for one. The easiest way to do that is mylist[:]. (This is a shorthand for copying out any sublist of mylist via the syntax mylist[a:b], with a and b defaulting to whole list.) Gary Herron -- http://mail.python.org/mailman/listinfo/python-list

Re: packing things back to regular expression

2008-02-20 Thread Gary Herron
of a pattern matched by an re can be replaces with a given string. See sub and subn. Perhaps you can make one of those do whatever it is you are trying to do. Gary Herron e.g re.SomeNewFunc(compilexp, mytable) myname mytable = {a : 1} re.SomeNewFunc(compileexp, mytable

Re: simpleparse - what is wrong with my grammar?

2008-02-24 Thread Gary Herron
. Good luck. Gary Herron Thanks, Laszlo from simpleparse.common import numbers, strings, comments from simpleparse.parser import Parser declaration = r''' expr:= paren_expr/unop_expr/binop_expr/word paren_expr := (,expr,) unop_expr := unop,expr binop_expr

Re: Newbie: How can I use a string value for a keyword argument?

2008-02-25 Thread Gary Herron
during the calling process as a dictionary, You can create the dictionary yourself, and slip it into the calling arguments with a ** notation: kw = {somestring:32} x.foo(**kw) Gary Herron or x.MyClass() y = 'trials' x.foo(y = 32) # does the wrong thing Surely there's some way to use

  1   2   3   4   5   6   7   8   9   10   >