Re: Looking for a good introduction to object oriented programming with Python

2012-08-05 Thread Wolfgang Strobl
Dennis Lee Bieber :

>   Don't look for Object-Oriented Programming -- since the first widely
>popular OOP language was C++ (Smalltalk was earlier, but rather
>specialized, whereas C++ started as a preprocessor for C).

Well, C++ did to C what Simula 67 did to Algol 60, much earlier. Simula
was quite popular at its time.




-- 
Thank you for observing all safety precautions
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What are the minimum requirements to get a job in?

2012-12-15 Thread Wolfgang Strobl
Christian Heimes :

>To be fair, memcpy() is a pretty simple function. 

This, of course, depends on the target architecture. See for example
 or


>It can be implemented
>in just about two lines of C code plus five lines of boiler plate. 

Or in a single line of IBM 360 ASM/F Code, plus boiler plate. :-)


In 1979, I implemented various block move code snippets for three
different eight bit microprocessors of that time. The parameterized
variant took between 20 and >30 instructions.  

-- 
Wir danken für die Beachtung aller Sicherheitsbestimmungen
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New in Python , Need a Mentor

2013-01-02 Thread Wolfgang Strobl
Chris Angelico :

>On Thu, Jan 3, 2013 at 1:04 AM, NewbiePythonic  wrote:
>> Hello Friends,
>>
>> I am very new to python and loved the easiness with which we can deal with 
>> problems. I would like to take things seriously and develop some good web 
>> applications. But right now I am stuck and looking for a mentor who can help 
>> me out with improving my skills and knowledge . Looking forward to meet 
>> someone who can help me out.
>
>The best mentor for Python is actually your Python interpreter. As a
>modern high-level language, Python's pretty helpful at finding
>problems - anything that it detects as an error will be reported with
>a thrown exception, with full traceback. Get to know your interpreter
>via its interactive mode (on Windows, 

Right.   In addition, i'd suggest applying the short recpie in

(i.e. add that snippet to sitecustomize.py) and learn a little bit of
pdb. This works everywhere and comes quite handy for inspecting code
right after something throws an exception.


>I strongly recommend IDLE - much
>better editing/recall facilities than the command-line Python has),
>and work through the tutorial:

Well, this is certainly a matter of taste.  I'd recommend using some
small, language independent programmers editor and some modern
distributed version control system  right at the beginning. Put your
code, even the smallest snippets,  under version control, make that a
habit.  Write small doctests for your code from the very beginning. Try
to construct your code so that it works equally well as a module and as
a standalone script   Don't start developing web applications, write
some small utilities for your own needs, first. 

Personally, I suggest SciTE and TortoiseHG on Windows, but that too is,
as I said, a matter of taste. 


-- 
Wir danken für die Beachtung aller Sicherheitsbestimmungen
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: HELP: Python equivalent of UNIX command "touch"

2005-03-02 Thread Wolfgang Strobl
pekka niiranen <[EMAIL PROTECTED]>:

>Does anybody know Python recipe for changing the date
>of the directory or files in W2K to current date and time?
>In UNIX shell command "touch" does it.

See below. The key is using the FILE_FLAG_BACKUP_SEMANTICS flag.

#--
# dirtest.py
from win32file import *
from pywintypes import Time
import time
x=CreateFile(r"d:\scratch\testdir",GENERIC_READ+GENERIC_WRITE,
FILE_SHARE_WRITE,None,OPEN_EXISTING,FILE_FLAG_BACKUP_SEMANTICS,0)
i,c,a,w= GetFileTime(x)
print "create",c,"access",a,"write",w
SetFileTime(x,Time(int(c)-24*3600),Time(int(c)-12*3600),Time(int(c) 
-3*3600))
#--

C:\e\littlepython>dirtest.py
create 01/21/05 04:27:04 access 01/21/05 16:27:04 write 01/22/05
01:27:04

C:\e\littlepython>dirtest.py
create 01/20/05 03:27:04 access 01/20/05 15:27:04 write 01/21/05
00:27:04

C:\e\littlepython>dir d:\scratch\testdir
...
 Verzeichnis von d:\scratch\testdir

20.01.2005  00:27 .
20.01.2005  00:27 ..
   0 Datei(en)  0 Bytes
   2 Verzeichnis(se), 806.768.640 Bytes frei

-- 
Wir danken für die Beachtung aller Sicherheitsbestimmungen
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: [Py Windows] User Directory Path

2005-04-30 Thread Wolfgang Strobl
"Zoool" :

>Is there a way to know the main directory path of a user session?
>I mean the "C:\Documents and Settings\username" Directory of the user logged 
>into a windows session.

>>> from win32com.shell.shell import SHGetSpecialFolderPath
>>> from win32com.shell.shellcon import CSIDL_PROFILE
>>> SHGetSpecialFolderPath(0,shellcon.CSIDL_PROFILE)
u'C:\\Dokumente und Einstellungen\\wolfgang'


-- 
Wir danken für die Beachtung aller Sicherheitsbestimmungen
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Install Python on Windows without Start Menu icons?

2011-12-05 Thread Wolfgang Strobl
"Pedro Henrique G. Souto" :

>On 02/12/2011 16:34, snorble wrote:
>> Is it possible to automate the Python installation on Windows using
>> the MSI file so it does not add a Start Menu folder? I would like to
>> push out Python to all of my office workstations, but I'd like for it
>> to be relatively silent from the user's point of view.
>
>If you just want to run python scripts in those machines (not developing 
>in it), you can use something like py2exe [http://www.py2exe.org/].

That doesn't answer the question.

Snorble might use  "ORCA", a MSI editor from Microsoft.

http://forums.frontmotion.com/viewtopic.php?f=10&t=837

discusses a similar question for Firefox.

I haven't tried it myself, but would give it a try.

-- 
Thank you for observing all safety precautions
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python script not working on windows 7 but works fine on linux

2013-03-04 Thread Wolfgang Strobl
io :

>The following scripts are working fine on linux but, using the same 
>version, can't work on windows because i receive the following message:

Thats because there is No such file or directory: '/home/io/btc_trading/
on that Windows PC.


-- 
Wir danken für die Beachtung aller Sicherheitsbestimmungen
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Determine if windows drive letter is hard drive or optical from python?

2005-05-28 Thread Wolfgang Strobl
"mh" <[EMAIL PROTECTED]>:

>2. More importantly for those drives that exist, how do I determine if
>it is actually a harddrive?

C:\>python
Python 2.3.4 (#53, May 25 2004, 21:17:02) [MSC v.1200 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import win32file,string
>>> def harddisks():
... driveletters=[]
... for drive in string.letters[len(string.letters)/2:]:
... if win32file.GetDriveType(drive+":")==win32file.DRIVE_FIXED:
... driveletters.append(drive+":")
... return driveletters
...
>>> harddisks()
['C:', 'F:']

-- 
Thank you for observing all safety precautions
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Determine if windows drive letter is hard drive or optical from python?

2005-05-31 Thread Wolfgang Strobl
Magnus Lycka <[EMAIL PROTECTED]>:

>Wolfgang Strobl wrote:
>> ... for drive in string.letters[len(string.letters)/2:]:
>
>Or better...
>..for drive in string.ascii_uppercase:
>
>string.letters differ with locale, but Windows drives are always
>only A-Z (right?) and just iterating over upper case (or lower)
>seems more clear than to iterate over half of the sum of both...

Ooops. Your're right, of course. In my defense, I could argue that it
was a cut&paste job, from a program written long ago ...

-- 
Thank you for observing all safety precautions
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Can a low-level programmer learn OOP?

2007-07-17 Thread Wolfgang Strobl
Steve Holden <[EMAIL PROTECTED]>:

>I'm happy you are proceeding with so little trouble. Without wishing to 
>confuse you, however, I should point out that this aspect of Python has 
>very little to do with its object-orientation. There was a language 
>called Icon, for example, 20 years ago, that used similar semantics but 
>wasn't at all object-oriented.

Actually, there was a language called SNOBOL, 40 years ago, that used
similar semantics, developed by Griswold et al. Its object model was
remarkably similar to that of Python without classes. And it even had
dictionaries (called "tables") :-). 

For an explaination of the concept "variable" in SNOBOL see


SNOBOLs powerfull patterns still shine, compared to Pythons clumsy
regular expressions. I've used the language a lot in the past, first on
the mainframe (SPITBOL on System/360), later on the PC (Catspaws SNOBOL4
&SPITBOL). When I switched to Python, it wasn't because of the
expressiveness of the language, but of the rich library ("batteries
included") and the IMO elegant syntax, i.e. blocks by identation.




Icon came later. Griswold developed Icon as a successor to SNOBOL,
constructing it around the concept of generators and co-expressions. I
didn't like it.


-- 
Thank you for observing all safety precautions
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Can a low-level programmer learn OOP?

2007-07-22 Thread Wolfgang Strobl
Paul Rubin :

>[EMAIL PROTECTED] (Aahz) writes:
>> .So adding SNOBOL patterns to another library would be a wonderful
>> gift to the Python community...
>
>Snobol patterns were invented at a time when nobody knew anything
>about parsing.  

But Snobol patterns aren't mainly about building parsers. 

>They were extremely powerful (recursive with arbitrary
>amounts of backtracking) but could use exponential time and maybe even
>exponential space.

Sure. Like any Turing complete language feature. 
>
>These days, it makes more sense to use something like pyparsing.  

Probably, yes.



-- 
Wir danken für die Beachtung aller Sicherheitsbestimmungen
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Can a low-level programmer learn OOP?

2007-07-22 Thread Wolfgang Strobl
[EMAIL PROTECTED] (Aahz):

>In article <[EMAIL PROTECTED]>,
>Wolfgang Strobl  <[EMAIL PROTECTED]> wrote:
>>
>>SNOBOLs powerfull patterns still shine, compared to Pythons clumsy
>>regular expressions. 
>
>Keep in mind that Python regular expressions are modeled on the
>grep/sed/awk/Perl model so as to be familiar to any sysadmin 

Sure, I don't dispute that. There is room for both regular expressions
and SNOBOL type patterns, IMHO, because the concepts are different
enough.

>-- but
>there's a reason why Python makes it a *library* unlike Perl.  So adding
>SNOBOL patterns to another library would be a wonderful gift to the
>Python community...

Like Eddie Corns if find it hard to do in an elegant way, without
integrating it into the language. I haven't looked into it for a long
time, though.

-- 
Wir danken für die Beachtung aller Sicherheitsbestimmungen
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Can a low-level programmer learn OOP?

2007-07-22 Thread Wolfgang Strobl
[EMAIL PROTECTED] (Eddie Corns):

>I don't believe you can get the benefit of SNOBOL matching without direct
>language support.  

That's my opinion, too.

>There's only so much a library can do. However a valiant
>and interesting effort:
>
>http://www.wilmott.ca/python/patternmatching.html

This is newer than http://sourceforge.net/projects/snopy/ which adapts a
ADA implemenation, which follows the SNOBOL model quite closely. Didn't
knew that. Thanks for pointing it out!  

Well, unfortunately, it somehow demonstrates your point. This may be
missing familiarity with the changed idiom, though. Perhaps rewriting a
few of James Gimple's snippets from "Algorithms in SNOBOL4"
(->http://www.snobol4.org/) as an exercise using that library might help
to get a better appreciation. Perhaps I'll try, eventually ...


-- 
Wir danken für die Beachtung aller Sicherheitsbestimmungen
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ANN: Phatch = PHoto bATCH processor and renamer based on PIL

2008-02-19 Thread Wolfgang Strobl
"SPE - Stani's Python Editor" <[EMAIL PROTECTED]>:

>I develop Phatch on Ubuntu/Linux, but I have tested and polished it
>regularly on Windows and Mac Os X. (Only the droplet functionality
>needs to be ported.) Phatch is submitted to Debian unstable and
>Ubuntu Hardy. Packagers for other platforms are welcome.
>
>Requirements:
>- PIL 1.1.5 or higher
>- wxPython 2.6 or higher
>- pyexiv2 (optional)
>- python nautilus bindings (optional)

Hm. I just gave it a try on Windows, but in vain. See below.

C:\build\phatch-0.1.bzr385>python setup.py install

just says

Sorry your platform is not yet supported.

>>> from PIL import Image
>>> Image.VERSION
'1.1.5'
>>> import wx
>>> wx.__version__
'2.8.7.1'

By greping for "Sorry you platform", I found config.py and there
(abbreviated) the following function:

def check_config_paths(config_paths):
if config_paths: return config_paths
p   = sys.prefix
if sys.platform[:5] == 'linux':
return {
"PHATCH_IMAGE_PATH" : 
...
}
else:
sys.stderr.write('Sorry your platform is not yet supported.\n')
sys.exit()

How is this supposed to work on Windows?

-- 
Wir danken für die Beachtung aller Sicherheitsbestimmungen
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ANN: Phatch = PHoto bATCH processor and renamer based on PIL

2008-02-19 Thread Wolfgang Strobl
Steve Holden <[EMAIL PROTECTED]> wrote:

>RTFM: the web site instructions clearly state that setup.py doesn't 
>currently work with Windows. 

Do they? http://photobatch.stani.be/ doesn't, following "documentation"
http://photobatch.stani.be/ doesn't, either.  I missed "start phatch in
trunk/phatch" while browsing through the web site, though. Not finding
any specific instructions in README and finding no INSTALL at all, I
expected setup.py to work on any platform.

>You should be able to double-click on the 
>program in Explorer, or use any of the standard ways of creating a link 
>shortcut.

Just starting phatch.py in phatch, as documented, does it, too. Thanks!


-- 
Wir danken für die Beachtung aller Sicherheitsbestimmungen
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Question to python C API

2009-04-18 Thread Wolfgang Strobl
Andreas Otto  wrote
about his attempts to install and run Cython:

>  5. and start to build the hello world example
>
>I changed:  print "Hello World"
>to: print("Hello World")-> this is V3

AFAIK Cython doesn't support Python 3, yet. See
http://trac.cython.org/cython_trac/ticket/234

I suggest staying with Python 2.x.  What C compiler are you going to
use, btw.?


-- 
Wir danken für die Beachtung aller Sicherheitsbestimmungen
--
http://mail.python.org/mailman/listinfo/python-list


Re: CPython on the Web

2011-01-02 Thread Wolfgang Strobl
azakai :

>On Jan 2, 4:58 pm, pyt...@bdurham.com wrote:
>> Azakai/Gerry,
>>
>> > Errors when using Firefox 3.6.3:
>>
>> I'm running Firefox 3.6.1.3 and the interpreter is running fine.

I guess that meant FIrefox 3.6.13 (without the last dot), the current
stable version.

I'm using Firefox 3.6.13 (german) on Windowx XP (32bit, german) here,
and the interpreter is running fine, too.  Same for Chrome 8.0.552.224.


-- 
Wir danken für die Beachtung aller Sicherheitsbestimmungen
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: [ANN] pyjamas 0.7 released

2010-04-25 Thread Wolfgang Strobl
Daniel Fetchinson :

>> for fits and giggles, to show what's possible in only 400
>> lines of python, here is a game of asteroids, written by joe rumsey.
>> yes, it runs under pyjamas-desktop too.
>>
>> http://pyjs.org/examples/asteroids/public/Space.html
>
>This URL returns a blank page for me on firefox 3.3.5 (linux) with and
>without adblock plus.

http://pyjs.org/examples/asteroids/output/Space.html works. (Firefox
3.6.3 with ABP, Chrome 4.1)


-- 
Wir danken für die Beachtung aller Sicherheitsbestimmungen
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: pyjamas 0.7 released

2010-04-28 Thread Wolfgang Strobl
lkcl :

>On Apr 25, 9:37 pm, Wolfgang Strobl  wrote:
>> Daniel Fetchinson :
>>
>> >> for fits and giggles, to show what's possible in only 400
>> >> lines of python, here is a game of asteroids, written by joe rumsey.
>> >> yes, it runs underpyjamas-desktop too.
>>
>> >>    http://pyjs.org/examples/asteroids/public/Space.html
>>
>> >This URL returns a blank page for me on firefox 3.3.5 (linux) with and
>> >without adblock plus.
>>
>> http://pyjs.org/examples/asteroids/output/Space.html works. (Firefox
>> 3.6.3 with ABP, Chrome 4.1)
>
> yep.  apologies.  didn't want to play asteroids, wanted to do a
>release.  

Sure.  :-) But you made a very prominent reference to it. Btw., both
http://pyjs.org/ and http://code.google.com/p/pyjamas/ still name 0.6 as
the current version. Shouldn't that be changed to 0.7?

Two weeks ago, I played around with the trunk version, looking for an
working drag&drop example. I didn't find anything, but noticed some
unfinished code in a dnd subdirectory. Are you aware of the fact that
many of the examples just don't work and that there is no way of
telling, other than by trying each one out in turn?  I didn't look at
every example again, but AFAIK, this didn't change with 0.7. (Tried with
Python 2.6.4/5 on WinXP/7 with Firefox and Chrome, if that matters).

There are quite some impressive working examples, but the user
experience is somewhat lacking and hampered by stumbling over faulting
examples, IMHO. May I suggest to restrinct some overview page to the
working examples, only?

Given my original motivation for looking into it - may I ask whether
there is a working example for a dnd operation, somewhere? Perhaps I
just didn't find it in the abundance of example code  :-) Thanks for
helping and for this great project!  


-- 
Wir danken für die Beachtung aller Sicherheitsbestimmungen
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: pyjamas 0.7 released

2010-04-28 Thread Wolfgang Strobl
lkcl :

>On Apr 28, 7:00 am, Wolfgang Strobl  wrote:

>> Two weeks ago, I played around with the trunk version, looking for an
>> working drag&drop example. I didn't find anything, but noticed some
>> unfinished code in a dnd subdirectory. Are you aware of the fact that
>> many of the examples just don't work
>
> no - because i specifically asked people, in the 0.7 pre-releases, to
>report any bugs found on http://code.google.com/p/pyjamas/issues and i
>said that once a certain amount of time had elapsed without receiving
>significant bugreports, i would do a release.

Look at it from the point of view of people walking by, trying to decide
whether they should invest some of their time into digging into yet
another framework and library. 

>
>> and that there is no way of
>> telling, other than by trying each one out in turn?
>
> yepp  that's correct.  across multiple browsers and across multiple
>desktop platforms.  nine in total.  which is why i asked for community
>input this time.

It's hard to come by with valuable input when the baseline - what is
expected to work under which circumstances is unknown. Don't expect the
community having as much knowledge about all the relevant topics as you
have. 

>
>for the 0.6 release i spent about a month of my own time and money
>doing the necessary verification, and i decided i wasn't going to
>place the entire burden of testing onto my own shoulders, this time,
>because pyjamas is a _community_ project and is _not_ funded by
>google, PSF, or any other organisation, foundation or company.

So please make it simpler for more people to help. Other people have
other projects, where they invest some of their own time and money in.

>
>
>>  I didn't look at
>> every example again, but AFAIK, this didn't change with 0.7. (Tried with
>> Python 2.6.4/5 on WinXP/7 with Firefox and Chrome, if that matters).
>
> then please issue bugreports for as many as you feel comfortable
>with / have time for.  

Ok, will do.

>i _did_ tell people this time that i was
>relying on community input more than for 0.6.  thus, the "quality" of
>the release depends on collective input.
>
>> There are quite some impressive working examples, but the user
>> experience is somewhat lacking and hampered by stumbling over faulting
>> examples, IMHO. May I suggest to restrinct some overview page to the
>> working examples, only?
>
> no, because they're all intended to work.  ohh... wait... are you
>referring to some of the django-based ones?  

No. Having written a few small django apps myself, I'm certainly aware
about such dependencies. But are you aware that's there is no simple way
to tell whether certain apps have environment dependencies like this?
Avoiding examples depending on django is obvious.  What about the
infohierarchy sample, for example?

I'm talking about messages like 
lightout TypeError: lightout.RootPanel().,get is no function
and such. I'll make a list over the weekend.

>no, you can't be, because
>the http://pyjs.org/examples page won't refer you to them.

Sure.


>> Given my original motivation for looking into it - may I ask whether
>> there is a working example for a dnd operation, somewhere?

> the person who started the port of gwt-dnd requested that they be
>"left alone" to complete it, but then didn't.  the use of java2py.py
>and manual conversion i can do about 1000 lines per day, and people
>i've guided before usually take about 3x longer than me.  i don't have
>money to work on even 1 line let alone 1000, so if you'd like to go
>through the code, converting it and the examples, i'm happy to advise
>(on the pyjamas-dev list so that other people can contribute as well
>if they choose).

Hey, I'm just asking, after looking around for a while and finding none,
I'm not demanding anything.

Thanks for the detailed explaination of how to do a conversion, which
I've deleted here for brevity. I'll give it a try, but it will require
some reading.


-- 
Wir danken für die Beachtung aller Sicherheitsbestimmungen
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: pyjamas 0.7 released

2010-05-02 Thread Wolfgang Strobl
lkcl :

> at least _some_ input would be good!  the knowledge doesn't have to
>be there: just the bugreports saying "there's a problem and here's
>exactly how you reproduce it" would be a start!

>> So please make it simpler for more people to help.

> ... how?? there's a bugtracker, wiki, svn repository, over 30
>examples and a developer list.  the code really _is_ very very small
>(the UI widget set, with around 75 widgets, minus the license header
>text is only around 4,000 lines _total_, making it very very simple
>and very very easy for people to get used to).  suggestions welcome!

Well, the bunch of programming languages and APIs I collected over the
years is large enough already. These days I prefer to stay with python
and c, spiced with an occasional domain specific language. That's why I
was attracted by pyjamas, to begin with!.  If I'd like to program using
Eclipse and Java or fool around with JavaScript, I'd do just that. But I
don't.  IMHO, that ist a general problem of translation tools - they
attract the wrong people, from the point of view a developer who looks
for people sharing some of the workload. :-)

So, Luke, I can only answer your question from the point of view of
somebody who is mostly a potentional consumer of your work, and most
problably not another developer. If you want to delegate some work you'd
like not to do yourself (for example because you prefer designing and
coding to testing and reorganizing and polishing the docs), than you
have at least to _define_ those pieces and to monitor progress. 

>
>> Other people have
>> other projects, where they invest some of their own time and money in.
>
> yes. been there. didn't receive any return on investment. did some
>projects. received about 25% of required money to pay bills.  need
>£15k pa; receiving approximately £7-8k.
>
>> >>  I didn't look at
>> >> every example again, but AFAIK, this didn't change with 0.7. (Tried with
>> >> Python 2.6.4/5 on WinXP/7 with Firefox and Chrome, if that matters).
>>
>> > then please issue bugreports for as many as you feel comfortable
>> >with / have time for.  

Well, ok. I put my notes in a Google chart, see
http://spreadsheets.google.com/pub?key=0Au5LhqNQyrfCdGpDbTVjZFJwSERzVUFXVlg5bWl2enc

I had to write a short patch against compile.py (see issue 397) in order
to make it compile the showcase examples on Windows.

In addition, I've tried to create Selenium tests for automating the time
consuming job of checking all those examples, using Selenium IDE in
Firefox. I was my first experience using this against Ajax apps. The
results are somewhat mixed. Playing a round of "lightout" was a breeze,
but so far I hadn't much luck in driving the showcase example(s). I
didn't try very hard, though, because I ran out of time, as I do now.  

-- 
Wir danken für die Beachtung aller Sicherheitsbestimmungen
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: map

2009-08-30 Thread Wolfgang Strobl
elsa :

>now, say I want to map myFunc onto myList, with always the same
>argument for b, but iterating over a:

>>> from functools import partial
>>> def g(x,y=1): return x+y
...
>>> map(partial(g,y=2),[1,2])
[3, 4]
>>> map(partial(g,y=42),[1,2])
[43, 44]


-- 
Wir danken für die Beachtung aller Sicherheitsbestimmungen
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What people are using to access this mailing list

2010-11-03 Thread Wolfgang Strobl
John Bond :

>Hope this isn't too O/T - I was just wondering how people read/send to this 
>mailing list, eg. normal email client, gmane, some other software or online 
>service?

I'm reading comp.lang.python on usenet, using Forté Agent as a
newsreader, which connects via nntp to a locally managed leafnode, which
in turn is fed by http://news.individual.net/ (for most newsgroups) and
http://news.gmane.org/ (for some mailing lists which are only available
there). I usually try to avoid reading mailing lists as mail.

>My normal inbox is getting unmanageable, and I think I need to find a new way 
>of following this and other lists.

Another way to regain control is to use separate mail adresses for
different purposes. I'm adding another alias for a new subscription or a
new registration email adress each time I subscribe to something. 


-- 
Thank you for observing all safety precautions
-- 
http://mail.python.org/mailman/listinfo/python-list