Re: can someone teach me this?

2012-07-23 Thread E.
e complete code with all sources. Everything is > open to everyone since I change this from another expert. > > http://dl.dropbox.com/u/63928380/blackjack.rar > > Thanks for your help and instructions. > > Best regards, > > menghsiu Maybe you want to show us

Lambda

2005-02-08 Thread e
here's what is probably an unusual question: -- http://mail.python.org/mailman/listinfo/python-list

Lambda

2005-02-08 Thread e
Question: WHAT IS LAMBDA? I can't figure out what it does from any documentation i've found anywhere. i doubt i need it but i still want to know what the heck it is/does/fixes/whatever! -- http://mail.python.org/mailman/listinfo/python-list

Re: setting Referer for urllib.urlretrieve

2009-09-04 Thread E
rievals are done.  (Or > maybe I just don't understand wget's full array of options well > enough.)  This means that my referrer changes as I bounce up and down > the hierarchy, which makes this less convenient.  Still, it does seem > more convenient that re-writing the module from scratch. Just wanted to add a note. I used the sample code posted above, and I would get this syntax error: NameError: global name 'addheader' is not defined The fix for the code is to change the line that references addheader to say this: self.addheader('Referer', url) ~E -- http://mail.python.org/mailman/listinfo/python-list

Single leading dash in member variable names?

2012-09-11 Thread e . doxtator
All Python noob here. Trying to understand a particular syntax: class stuff: def __init__(self): self._bongo = "BongoWorld" --- What is the significance of the leading underscore in "self._bongo"? I've seen this a few times and, after looking through PEP 8, I didn't see

Re: Single leading dash in member variable names?

2012-09-11 Thread e . doxtator
On Tuesday, September 11, 2012 2:06:45 PM UTC-5, Ian wrote: > On Tue, Sep 11, 2012 at 12:45 PM, I wrote: > > > All > > > > > > Python noob here. Trying to understand a particular syntax: > > > > > > class stuff: > > > def __init__(self): > > > self._bongo = "BongoWorld" > > >

Re: Single leading dash in member variable names?

2012-09-12 Thread e . doxtator
On Tuesday, September 11, 2012 5:02:31 PM UTC-5, Erik Max Francis wrote: > On 09/11/2012 01:53 PM, me wrote: > > > On Tuesday, September 11, 2012 2:06:45 PM UTC-5, Ian wrote: > > >> On Tue, Sep 11, 2012 at 12:45 PM, I wrote: > > >>> What is the significance of the leading underscore in "self._b

[Click the star to watch this topic] HOT LINKS FOR YOUTH ONLY

2012-04-11 Thread e kartheeka
[Click the star to watch this topic]HOT LINKS FOR YOUTH ONLY -- http://mail.python.org/mailman/listinfo/python-list

From the crest of Olivet...

2012-04-16 Thread E Bmums
"From the crest of Olivet, Jesus looked upon Jerusalem. Fair and peaceful was the scene spread out before Him. It was the season of the Passover, and from all lands the children of Jacob had gathered there to celebrate the great national festival. In the midst of gardens and vineyards, and gre

From the crest of Olivet...

2012-04-28 Thread E Bmums
"From the crest of Olivet, Jesus looked upon Jerusalem. Fair and peaceful was the scene spread out before Him. It was the season of the Passover, and from all lands the children of Jacob had gathered there to celebrate the great national festival. In the midst of gardens and vineyards, and gre

I have no clue figuring out how to check dates in workholidays

2020-11-06 Thread J.J. E.
Hi, Thank you for allowing me in this support mailing list. My experience with Python is short due to my new job. My boss told me that I need to create a code that checks yesterday's date. The conditions for returning none are that: - Yesterday happens to be a holiday, - Yesterday turns out

Re: newbie write to file question

2005-12-04 Thread Rob E
> I'm not sure what I'm > missing so I'd appreciate some advice. You question is pretty general and I'm not going to go over this in any great detail, but I will make a few comments. * In your if section use if ... else constructs not all the strange if and then not if blocks. Also get rid

Re: Efficient lookup in list of dictionaries

2005-12-04 Thread Rob E
> Hi. I like working with lists of dictionaries since order is preserved > in a list when I want order and the dictionaries make it explicit what > I have got inside them. I find this combination very useful for storing > constants especially. Generally I find myself either needing to > retriev

Re: wxPython vs. pyQt

2005-03-20 Thread Andrew E
Hans-Peter Jansen wrote: .. While in PyQt world, I found these advantages: + conceptually vastly superior + powerful api/widgets/features + fast as hell due to the efficient binding of a quite efficient lib + cool tools, that are unicode/translation aware + very efficient programming environme

Re: wxPython vs. pyQt

2005-03-20 Thread Andrew E
John J. Lee wrote: The key question from my point of view is: can I write commercial sell-if-I-want-to applications using Qt? If it is GPL, then I guess the answer is 'no'? Yes, you can write commercial apps. It's multi-licensed (commercial, GPL, etc.): you get to pick the license(s) you want to

module to parse "pseudo natural" language?

2005-04-17 Thread Andrew E
Hi all I've written a python program that adds orders into our order routing simulation system. It works well, and has a syntax along these lines: ./neworder --instrument NOKIA --size 23 --price MARKET --repeats 20 etc However, I'd like to add a mode that will handle, say: ./neworder buy 2

Re: sscanf needed

2005-04-17 Thread Andrew E
= c.iso2date( iso ) print "Input '%s' -> datetime: %s" % ( iso, date ) except ValueError, e: print str(e) demo( "2005-04-21T12:34:56" ) demo( "2005-04-21 12:34:57" ) demo( "2005-04-2 12:34:57" ) -- http://mail.python.org/mailman/listinfo/python-list

scipy error invalid path

2014-01-31 Thread e-letter
Readers, Used the community edition service of activepython web site to install python27. Within the 'bin' directory, received the following error: $ ./easy_install-2.7 scipy Searching for scipy Reading https://pypi.python.org/simple/scipy/ Best match: scipy 0.13.2 Downloading https://pypi.pytho

bw2ui installation failure

2014-02-02 Thread e-letter
Readers, Firstly, sorry for the cross-post: https://groups.google.com/d/topic/brightway2/-akB-OQBZi4 Any advice about forcing installation of a later version of a software please? -- https://mail.python.org/mailman/listinfo/python-list

Re: Gpg python installer

2015-04-01 Thread E Smitty
On Wednesday, April 1, 2015 at 4:26:40 PM UTC-7, leonardo davinci wrote: > I am using Kleopatra(gpg for win) to verify the 3.4.3 python installer, > Windows x86 MSI > > >. This file does > >not have a email in the digital signaure and I a

rhythmbox plugin problem

2015-06-24 Thread L E
Hello, I am trying to get some old plugins I wrote to wrote on anewer version of rhythmbox. When I try to load the plugin I see: (rhythmbox:3092): libpeas-WARNING **: nowplaying-lcd: /usr/lib/rhythmbox/plugins/nowplaying-lcd/libnowplaying-lcd.so: cannot open shared object file: No such file or d

Re: PyInstaller+ Python3.5 (h5py import error)

2015-09-25 Thread Hedieh E
On Thursday, September 24, 2015 at 1:12:31 PM UTC+2, Laura Creighton wrote: > In a message of Thu, 24 Sep 2015 02:58:35 -0700, Heli Nix writes: > >Thanks Christian, > > > >It turned out that h5py.defs was not the only hidden import that I needed to > >add. > > > >I managed to get it working with

Getting a list in user defined selection order

2013-03-14 Thread e . tekinalp
Hello everybody, I want to select components(vertices) in a particular Order with python. So when I create a list the main problem is, that maya is not listing the verts in the correct selected order as I did. Here an example: I have selected from a polySphere the following vtx [sphere.vtx400

Re: Getting a list in user defined selection order

2013-03-14 Thread e . tekinalp
Ah sorry this is the correct snippet cmds.selectPref(tso = 1) vtx = cmds.ls(os = 1, flatten = 1) print vtx the other one wouldn't make any sense. :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting a list in user defined selection order

2013-03-14 Thread e . tekinalp
Am Donnerstag, 14. März 2013 10:34:31 UTC+1 schrieb e.tek...@gmx.de: > Hello everybody, > > > > I want to select components(vertices) in a particular Order with python. > > So when I create a list the main problem is, that maya is not listing the > verts in the correct selected order as I did.

pyRTF and Footers

2006-11-15 Thread E . Doxtator
Hi All I've been using the pyRTF module to generate some documents that I need for work. In general, the module is good, and pretty simple to use. However, I am running into a problem with footers that doesn't quite make sense to me. My question is this: Is it possible to change the text of a f

Re: pyRTF and Footers

2006-11-15 Thread E . Doxtator
Gabriel Genellina wrote: > At Wednesday 15/11/2006 20:08, [EMAIL PROTECTED] wrote: > > >I've been using the pyRTF module to generate some documents that I need > >for work. In general, the module is good, and pretty simple to use. > >However, I am running into a problem with footers that doesn't

Re: Strange behavior of int()

2006-01-29 Thread Rob E
> Why is int(r/k), where r = 0.5 and k = 0.5 = 0? Shouldn't it be 1? > And why is the last one = 4 and not 5? I dont' know why the differences in your exact case. However, please realise that Regardless of the programming language good programming practice is to never rely on the int of a float

Re: List append

2007-09-15 Thread Rob E
On Sat, 15 Sep 2007 03:25:27 +, mouseit wrote: > I'm trying to add an element to a list which is a property of an > object, stored in an array. When I append to one element, all of the > lists are appended! > > Example Code: > > class Test: > array = [] > > myTests = [Test() , Test() ,

Re: List operation: Removing an item

2006-04-17 Thread Miguel E
Steven D'Aprano wrote: > On Sat, 15 Apr 2006 22:39:37 -0600, Miguel E. wrote: > > >>I am trying to create a function that removes an item as specified by >>the user. Apparently, the list operation "del list[:]" deletes the >>entire list. Below is th

Re: scope of variables

2006-05-03 Thread Rob E
> is the code below correct? > > b = 3 > def adding(a) > print a + b > > it seams not to see the up-level scope where b is defined. Yes except for the missing : at the end of the "def" line. Rob -- http://mail.python.org/mailman/listinfo/python-list

Running files with the associated program...

2008-02-05 Thread E-Lo
Hello all, How can I start a file (on Windows) with the associated program, Like if I want to open a bmp file, I want to to be shown in the program that all bmp files are associated with. I need a python code to do this. Thanks, -- http://mail.python.org/mailman/listinfo/python-list

Re: Running files with the associated program...

2008-02-06 Thread E-Lo
On Feb 6, 6:09 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 05 Feb 2008 22:34:59 -0200, E-Lo <[EMAIL PROTECTED]> escribió: > > > How can I start a file (on Windows) with the associated program, > > http://docs.python.org/lib/os-process.html

Python for Palm OS

2008-03-15 Thread E-Lo
Is there any other edition of Python for Palm OS instead of Pippy? -- http://mail.python.org/mailman/listinfo/python-list

Re: Counter Class -- Bag/Multiset

2009-01-22 Thread msrachel . e
On Jan 22, 5:41 pm, Giovanni Bajo wrote: > * I find it *very* confusing c.items() vs c.elements(). Items and > elements are synonymous (again, in my understanding of English). Would have used the term "items" but that term has a different meaning in the context of dictionaries where "items" means

Re: Counter Class -- Bag/Multiset

2009-01-22 Thread msrachel . e
On Jan 22, 5:54 pm, Paul Rubin wrote: > Giovanni Bajo writes: > > * I'm not a native speaker, but why use the word "Counter"? > > I agree with this, the new functionality is welcome but I think > the traditional term "multiset" or "bag" would have been better. The t

Re: Counter Class -- Bag/Multiset

2009-01-23 Thread msrachel . e
On Jan 23, 12:27 am, bearophileh...@lycos.com wrote: > bearophile: > > > Are keys restricted to be long and int values only? Or are they > > general (referenced) objects + a control of their integral nature? > > Here I meant values, sorry. > Also: what's the rationale of allowing negative values to

Version upgrade blocked mentally

2008-11-29 Thread Adam E
I have read in my copy of Programming Python that all strings will be Unicode and there will be a byte type. This is mentally keeping me from upgrading to 2.6 . I'm curious, but are there still some who prefer Python 2.5? I don't mind constructive criticsm. -- http://mail.python.org/mailman/listi

Re: Tkinter, toplevel and images

2008-08-22 Thread Adam E
On Aug 22, 9:17 am, Pedro <[EMAIL PROTECTED]> wrote: > Hi > > I'm trying to build a small application that can display some images > in a toplevel window. I have this code: > > def Results(master): > from Tkinter import Toplevel, Button, Label > from PIL import ImageTk > > figures = ['f

Re: rules of thumb for cross os code

2008-08-22 Thread Adam E
On Aug 22, 9:55 am, DwBear75 <[EMAIL PROTECTED]> wrote: > I am considering using python as a replacement for a lot of bash > scripting that I have been doing. I would like to be as cross platform > as possible, writing scripts for both windows and linux. Are there any > guides are general rules of

Attachment Size and SMTP EMail

2008-09-23 Thread Eric E
Hello All - I am using python to send an email with a large zip file as an attachment. I successfully sent a 52M attachment. If I try to send a 63M attachment or larger, the message never gets through. I do not get any errors in my python code. I pasted my python code below. from email.MIMEBa

Re: Attachment Size and SMTP EMail

2008-09-23 Thread Eric E
On Sep 23, 9:52 am, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2008-09-23, Eric E <[EMAIL PROTECTED]> wrote: > > > I am using python to send an email with a large zip file as an > > attachment. I successfully sent a 52M attachment. If I try > > to send a 6

Re: What's The Best Editor for python

2006-03-24 Thread Miguel E.
PythonStudent wrote: > Hi, > Can one of you say to me what's the best editor for editing the python > programs ( for linux or windows ) What may be "best" for me, may not necessarily work for you nor anybody else. Personally, I like to use Kate, Pico, or Joe on Linux, and Notepad2 or IDLE editor

List operation: Removing an item

2006-04-15 Thread Miguel E.
Hi, I've been (self) studying Python for the past two months and I have had no background in OOP whatsoever. I was able to write an interactive program that randomly selects an item from a list. From a Main Menu, the user has the option to add items to an empty list, show the list, run the rando

Re: What's wrong with this code?

2012-07-23 Thread Russell E. Owen
In article , Chris Angelico wrote: > On Tue, Jul 24, 2012 at 12:50 AM, Stone Li wrote: > > > > I'm totally confused by this code: > > > > Code: > > Boiling it down to just the bit that matters: > > c = None > d = None > x = [c,d] > e,f =

Re: Tkinter bug in Entry widgets on OS X

2012-09-13 Thread Russell E. Owen
In article , Kevin Walzer wrote: > On 8/31/12 6:18 AM, Arnaud Delobelle wrote: > > I'm very inexperienced with Tkinter (I've never used it before). All > > I'm looking for is a workaround, i.e. a way to somehow suppress that > > output. > > What are you trying to do? Navigate the focus to anot

Re: Keeping a Tkinter GUI alive during a long running process

2012-12-26 Thread Russell E. Owen
In article , Kevin Walzer wrote: > I maintain a Tkinter application that's a front-end to to a package > manger, and I have never been able to find a way to keep the app from > locking up at some point during the piping in of the package manager's > build output into a text widget. At some po

Generator problem: parent class not seen

2012-02-01 Thread Russell E. Owen
I have an odd and very intermittent problem in Python script. Occasionally it fails with this error: Traceback (most recent call last): File "/Applications/APO/TTUI.app/Contents/Resources/lib/python2.7/TUI/Base/Bas eFocusScript.py", line 884, in run File "/Applications/APO/TTUI.app/Contents/R

Re: Is it necessary to call Tk() when writing a GUI app with Tkinter?

2012-03-05 Thread Russell E. Owen
In article <3d0bf288-fa5d-48e5-9529-db92d420a...@1g2000yqv.googlegroups.com>, Rick Johnson wrote: > On Feb 29, 11:24 pm, Terry Reedy wrote: > > On 2/29/2012 10:22 PM, Rick Johnson wrote: > > > > PS: I would highly suggest against using the "from Tkinter import *". > > > Instead, use "import T

pickle question: sequencing of operations

2012-05-04 Thread Russell E. Owen
What is the sequence of calls when unpickling a class with __setstate__? >From experimentation I see that __setstate__ is called and __init__ is not, but I think I need more info. I'm trying to pickle an instance of a class that is a subclass of another class that contains unpickleable objects.

Re: pickle question: sequencing of operations

2012-05-08 Thread Russell E. Owen
In article , "Russell E. Owen" wrote: > What is the sequence of calls when unpickling a class with __setstate__? > > >From experimentation I see that __setstate__ is called and __init__ is > not, but I think I need more info. > > I'm trying to pickle an in

Re: pickle question: sequencing of operations

2012-05-09 Thread Russell E. Owen
In article , Ian Kelly wrote: > On Tue, May 8, 2012 at 1:19 PM, Russell E. Owen wrote: > > In article , > >  "Russell E. Owen" wrote: > > > >> What is the sequence of calls when unpickling a class with __setstate__? > > I believe it jus

what does newP = func(code,p) do?

2012-05-16 Thread e-mail mgbg25171
def execute (code) : p = 0 while p < len(code) : func = code[p] p += 1 newP = func(code,p) if newP != None : p = newP I'm trying to work out what this does code is a list of function addresses and numbers What on earth is funct(code,p) doing

what does newP = func(code,p) do?

2012-05-16 Thread e-mail mgbg25171
It's been a long time since I did any Python and I've never done that In C I'm used to storing function ptrs and then having to use some other constructs to call them. To be able to store func and then use func to call itself like that threw me...it's very elegant. Thank you very much for your very

what do these mean

2012-05-20 Thread e-mail mgbg25171
There's a little forth program written in python here #http://openbookproject.net/py4fun/forth/forth.py I'm struggling to understand what these lines mean. def rJnz (cod,p) : return (cod[p],p+1)[ds.pop()] def rJz (cod,p) : return (p+1,cod[p])[ds.pop()==0] Specifically I'm stuck on what (code[p],

Re: Nonuniform PRNG?

2022-12-07 Thread Robert E. Beaudoin
m bit stream, but if they fail that should indicate a problem. Robert E. Beaudoin On Wed, 7 Dec 2022 11:05:53 -0500 David Lowry-Duda wrote: > Inspired by the recent thread about pseudorandom number generators on > python-ideas (where I also mistakenly first wrote this message), I > b

why no camelCase in PEP 8?

2020-05-18 Thread Lance E Sloan
I've been using Python for about 18 years. Several things have changed in the language in those years. I don't disagree with most of it, but one of the things that annoys me is the disapproval of using camelCase to name symbols such as variables, functions, etc. I think PEP 8, the "Style Guid

Python script produces "sem_trywait: Permission denied"

2005-10-18 Thread Mark E. Hamilton
se problems. However, if anyone does have a solution to it I'd like to see it. I hate having unresolved wierdnesses in our code. -- Mark E. Hamilton Orion International Technologies, Inc. Sandia National Laboratory, NM. 505-844-7666 -- http://mail.python.org/mailman/listinfo/python-list

Python script produces "sem_trywait: Permission denied"

2005-10-18 Thread Mark E. Hamilton
rmission denied We don't run these scripts as root, so I can't say whether they work as root. I suspect they would, though, since root has permissions to do anything. -- Mark E. Hamilton Orion International Technologies, Inc. Sandia National Laboratory, N

Re: Tkinter or Python issue?

2005-10-19 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>, "Eric Brunel" <[EMAIL PROTECTED]> wrote: >You should now see why it works here: your first tkFont.Font is remembered at >Python level in a variable. So it is not discarded once the tag_config is >over. So the second tkFont.Font is not allocated at the same locati

frozenset/subclassing/keyword args

2005-10-31 Thread Mark E. Fenner
Hello all, I was migrating some code from sets.ImmutableSet to frozenset and noticed the following: **code #!/usr/bin/env python from sets import ImmutableSet class MSet1(ImmutableSet): def __init__(self, iterArg, myName="foo"): ImmutableSet.__init__(self, iterArg)

[Ann] RO package 2005-10-31

2005-10-31 Thread Russell E. Owen
RO package 2005-10-31 is now available from What is it? A package of python utilities I wrote to support a telescope control interface. RO has a strong emphasis on the Tkinter GUI library, networking, astronomy and cross-platform support (uni

Re: frozenset/subclassing/keyword args

2005-11-01 Thread Mark E. Fenner
> Without researching it, I would guess that you have to override __new__ > so as not to pass through the myName arg to the otherwise inherited and > called-with-all-arguments __new__ of the base class. > Regards, > Bengt Richter Bengt, Thanks as always! Python's rabbit holes always go a lit

Re: A Tcl/Tk programmer learns Python--any advice?

2005-11-08 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>, Kevin Walzer <[EMAIL PROTECTED]> wrote: >I'm a Tcl/Tk developer who has been dabbling with Python for some time,... >Well, I have finally found a good reason to learn Python in more depth:... > >Any advice, particularly from other programmers with a lot of experien

Re: PythonMagick on Windows

2005-12-05 Thread Travis E. Oliphant
Adam Endicott wrote: > Does anyone know anything about PythonMagick? I've got a project that > could use ImageMagick, so I went looking around for PythonMagick, and > I'm a bit lost. > > I was able to download the PythonMagick source from the ImageMagick > site, but I'm on Windows and don't have t

directory bug on linux; workaround?

2005-01-13 Thread Russell E. Owen
I stumbled across a really strange bug involving directories on linux. os.path.exists(path) can return 0 even after os.path.mkdir(path) succeeds (well after; this isn't a timing issue). For the first file, the directory did not exist, so my code created the directory (successfully) using os.pa

Re: Configuring Python for Tk on Mac

2005-01-24 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Martyn Quick) wrote: >On my desk here at work I have a Mac G4 running Mac OS X v10.2.8. > >When I go into a terminal and type "python" up comes a nice python >interface and all seems great. However when I type "import Tkinter" >I'm greeted by th

Re: tkinter socket client ?

2005-01-24 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>, "Tonino" <[EMAIL PROTECTED]> wrote: >yeah - had a look at createfilehandler() - was a bit confusing - but >your example helps ;) Be warned that createfilehandler does not work on Windows, though it works well on unix and MacOS X. So my suggestion is one to try a

Re: tkinter socket client ?

2005-01-25 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>, "Tonino" <[EMAIL PROTECTED]> wrote: >thanks for this info - I had to abandon the createfilehandler() method >as it is not supported in windows and the GUI "might" be used there at >some time ... > >So - I went the threading route - works well - for now - so I will

Re: continuous plotting with Tkinter

2005-02-03 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>, "Martin Blume" <[EMAIL PROTECTED]> wrote: >I have a number-crunching application that spits out >a lot of numbers. Now I'd like to pipe this into a python >app and plot them using Tkinter, such as: >$ number_cruncher | myplot.py >But with Tkinter once I call Tkin

Re: Reinstall python 2.3 on OSX 10.3.5?

2005-02-03 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: >Hi there > >I started a very long and roundabout process of attempting to install >python 2.3.4 along side my apple-installed 2.3 system. To make a long >story short, I have completely confabulated my environment ( i deleted >the 2.3 binar

Python scripts a PC Interfacing equipment

2005-02-06 Thread Pramode C E
Hello, The Phoenix project aims to bring low cost PC-based experimental Physics to the classroom. Read a short intro here: http://linuxgazette.net/111/pramode.html Regards, Pramode --- -- http://mail.python.org/mailman/listinfo/python-list

Re: How long is a piece of string? How big's a unit?

2005-07-11 Thread Chuck E. Cheese
The correct answer to the above question How long is a piece of string? is 2 times half it's length CEC -- http://mail.python.org/mailman/listinfo/python-list

"Aliasing" an object's __str__ to a different method

2005-07-22 Thread Jeffrey E. Forcier
1 However, expressions such as self.__str__ = aren't working for me, as above. Why not? Thanks for any responses, Jeff -- Jeffrey E. Forcier Junior Developer, Research and Development Stroz Friedberg, LLC 15 Maiden Lane, 12th Floor New York, NY 10038 [main]212-981-6540 [direct]212-981-

Re: "Aliasing" an object's __str__ to a different method

2005-07-22 Thread Jeffrey E. Forcier
, however, so who knows where I will end up =) Thanks for the response! If you or anyone else can shed some insight on *why* this is the way it is (and why/if the docs are in fact incorrect) I'd appreciate further replies. More knowledge == better. Regards, Jeff -- Jeffrey E. Forcier J

Re: "Aliasing" an object's __str__ to a different method

2005-07-23 Thread Jeffrey E. Forcier
n each object and then have the ability to point __str__ to one or the other. I suppose now I need to figure out which is more important, that ease-of-use of overriding __str__ or whatever benefits new-style classes give (something I'm still a bit unclear on). Thanks again, Jef

Re: "Aliasing" an object's __str__ to a different method

2005-07-24 Thread Jeffrey E. Forcier
ign to be, but primarily all at once. E.g. I'd have a Page or PageBody container class holding a bunch of (implementing the same interface) objects as discussed, and would want all of those sub-objects to be in the same mode. In other words...a page is either displaying text fields for ed

Time formatting and date suffixes

2005-07-25 Thread Jeffrey E. Forcier
y frowned upon to use such a locale-specific function as English date suffixes? Thanks, Jeff -- Jeffrey E. Forcier Junior Developer, Research and Development Stroz Friedberg, LLC 15 Maiden Lane, 12th Floor New York, NY 10038 [main]212-981-6540 [direct]212-981-6546 http://www.strozllc.com This m

Re: Time formatting and date suffixes

2005-07-25 Thread Jeffrey E. Forcier
See, I was thinking I'd have to write a short function to do it myself, but I hadn't realized it could be quite *that* short. Thanks! That'll do quite nicely, and is definitely something I'm going to throw in my "general utility functions" folder :) Regards, Jeff -- http://mail.python.org/mailma

Re: sqlobject vs mysqldb module

2005-08-09 Thread Jeffrey E. Forcier
Skip is correct, they're somewhat different: SQLObject is an 'ORM' or 'Object-Relational Mapping', meaning that it allows you to handle everything related to the database with objects. The table handles are objects, the result set is an object, the individual rows in a result set are objects with

Re: Recommendations for CVS systems

2005-08-09 Thread Jeffrey E. Forcier
Thirding the Subversion/SVN suggestions. It's generally a newer, better CVS with some new features and a lot less of the negative features/lack thereof, of the older system. If any of your team has CVS experience they should have no real problem with the switch, and anyone without prior version co

Re: epyDoc Questions

2005-08-11 Thread Jeffrey E. Forcier
Neil Benn wrote: >1. I want to document the attributes (instance and also class) of a > class and or module, I know the tags are there - where does they > go (before/after theclass decleration, top of the module, if > someone puts in the class doc but misses out the module stu

Sep 9 is the last day for reduced rates for OOPSLA 2005

2005-08-16 Thread Gail E. Harris
. -- Gail E. Harris, MSc, PMP Principal, Solution Delivery & Emerging Technology Instantiated Software Inc. http://www.Instantiated.CA [EMAIL PROTECTED] (416) 573-0469 DISCLAIMER: The information contained in this e-mail may be confidential and is intended solely for the use of the n

How to get a unique id for bound methods?

2005-08-19 Thread Russell E. Owen
I have several situations in my code where I want a unique identifier for a method of some object (I think this is called a bound method). I want this id to be both unique to that method and also stable (so I can regenerate it later if necessary). I thought the id function was the obvious choic

Re: How to get a unique id for bound methods?

2005-08-19 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>, Benji York <[EMAIL PROTECTED]> wrote: >Russell E. Owen wrote: >> The id of two different methods of the same object seems to be the >> same, and it may not be stable either. > >Two facts you're (apparently) unaware of are con

Re: Decorator and Metaclasses Documentation

2005-08-21 Thread Jeffrey E. Forcier
Amusingly, I was just perusing these links earlier today. Go go Firefox history search! http://www.python.org/2.2/descrintro.html http://users.rcn.com/python/download/Descriptor.htm -- http://mail.python.org/mailman/listinfo/python-list

Re: Decorator and Metaclasses Documentation

2005-08-21 Thread Jeffrey E. Forcier
Sorry about that, I misread the original question. However, the python.org link is still valid as it concerns metaclasses as well as a handful of other topics. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get a unique id for bound methods?

2005-08-22 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Bengt Richter) wrote: >On Fri, 19 Aug 2005 16:33:22 -0700, "Russell E. Owen" <[EMAIL PROTECTED]> >wrote: >[...] >> >>The current issue is associated with Tkinter. I'm trying to create a tk &

Re: High Level FTP library

2005-08-23 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>, "Paulo Pinto" <[EMAIL PROTECTED]> wrote: >Hello, > >Is there any Python library similar to NET::FTP from Perl? >ftplib seems too lowlevel. > >I already found a few, but would like to get one that is >endorsed by the community. Try urllib or urllib2; these are incl

Re: How to get a unique id for bound methods?

2005-08-23 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>, "Fredrik Lundh" <[EMAIL PROTECTED]> wrote: >Russell E. Owen wrote: > >>>>The current issue is associated with Tkinter. I'm trying to create a tk >>>>callback function that calls a python "function&quo

Re: How to get a unique id for bound methods?

2005-08-23 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>, "Fredrik Lundh" <[EMAIL PROTECTED]> wrote: >Russell E. Owen wrote: > >>>>The current issue is associated with Tkinter. I'm trying to create a tk >>>>callback function that calls a python "function&quo

Re: Sorta noob question - file vs. open?

2005-08-23 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>, Peter A. Schott <[EMAIL PROTECTED]> wrote: >Been reading the docs saying that file should replace open in our code, but >this >doesn't seem to work: > ># Open file for writing, write something, close file >MyFile = file("MyFile.txt", "w") >MyFile.write("This is a

Re: How to get a unique id for bound methods?

2005-08-24 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>, "Fredrik Lundh" <[EMAIL PROTECTED]> wrote: >Russell E. Owen wrote: > >> Having looked at it again, it is familiar. I copied it when I wrote my >> own code. I avoided using at the time both because the initial >> un

Printing w/o newlines inside loops - odd behavior

2005-09-13 Thread Jeffrey E. Forcier
This is a difficult issue to search for, and Googling (and reviewing the pertinent Python docs) has not found me anything useful. It's also not a super important issue, but regardless of whether it's avoidable, I still want to know what the heck is going on. Doing multiple print statements inside

Re: Printing w/o newlines inside loops - odd behavior

2005-09-13 Thread Jeffrey E. Forcier
Erik: Thanks, that was it! Figured it was something along those lines, but like I said, I didn't know specifically what was going on or what to look for. Larry: That recipe could be useful, thanks a lot :) And thanks for the quick replies, too, you guys are awesome. Regards, Jeff -- http://ma

Python in XCode - autoindent?

2005-09-19 Thread Jeffrey E. Forcier
Hoping at least some of you use XCode... In futzing with PyObjC and Cocoa programming on my Mac, I've come to know XCode a little better, and am considering switching to it from my existing editor (TextMate). However, it appears to lack your typical auto-indenting that I'm sure most of you also fi

Re: How to define a window's position (Tkinter)

2005-02-28 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>, "Harlin Seritt" <[EMAIL PROTECTED]> wrote: >I am trying to use the geometry() method with the toplevel window >called root. I know that one can do the following: > >root.geometry('400x400+200+200') > >This will put the window in 200, 200 position with a size of 400

Re: Lisp-likeness

2005-03-15 Thread Steven E. Harris
stand > their basic loops :-) The thread "Midfunction Recursion"¹ from October 2002 sounds relevant here, exploring options for bindings in iteration. Footnotes: ¹ http://groups-beta.google.com/group/comp.lang.lisp/browse_frm/thread/46bb18e56cad/0590de10f975a059 -- Steven E. Har

Re: tkinter shell problem

2004-11-29 Thread Russell E. Owen
ean up code...does not get called... > >Yet Idle manages - any clue ? Use the traceback module. For example: try: ...code to protect... except (SystemExit, KeyboardInterrupt): raise except Exception, e: traceback.

Re: PHP vs. Python

2004-12-22 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: >Anyone know which is faster? I'm a PHP programmer but considering >getting into Python ... did searches on Google but didn't turn much up >on this. For web service, the first hurdle is picking which python web interface to use, installi

  1   2   3   >