prefixes to variables, or especially as suffixes to
abbreviations. This is a *python* list for crying out loud!
James
--
http://mail.python.org/mailman/listinfo/python-list
-featured text editor, so you will switch soon to a real one.
Second, its too easy to save as rtf, even with the txt extension--and it
will take some time and frustration to realize your mistake. The best
option is TextWrangler for non-vi, non-emacs people. Sometimes its even
a good option for vi & emacs people.
James
--
http://mail.python.org/mailman/listinfo/python-list
the __repr__() output and hope to
re-create the object later, say between invocations of the interpreter.
You would either need the contents of the object stored or you would
need to know those contents via a reference (in the same invocation). In
short, you propose to do accounting that you should otherwise allow the
interpreter to do for you.
James
--
http://mail.python.org/mailman/listinfo/python-list
thus are not using
exceptions in their intended way. You might describe the reason you are
generating error codes and gather suggestions about a more pythonic
(i.e. reasonable) approach.
James
--
http://mail.python.org/mailman/listinfo/python-list
André wrote:
> I'm really annoyed at Python - and not for the reasons already
> mentioned on this list.
>
> Everyone know that programming is supposed to be a dark art, nearly
> impossible to learn. Computer code is supposed to be something
> impossible to read to the common person and yet reveal
t" The word * %s * belongs in line number: %d" % (k,
> j)
>
> print "Total keywords in this file are: %d" %(total)
>
You probably want something that goes a little like this:
for i,line in enumerate(linelist):
for k in line.split():
if keyword.iskeyword(k):
total += line.count(k)
print "The word '%s' belongs in line num: %d" % (k, i+1)
print "Total keyords are: %d" % total
James
--
http://mail.python.org/mailman/listinfo/python-list
James Stroud wrote:
> Andy wrote:
>> Hi, the file below will print all the keywords in a file and also the
>> line # of the keyword. What I couldn't figure out is to count those
>> keywords per line. For example - "Line #1 has 3 keywords"
>>
>> Can
James Stroud wrote:
> James Stroud wrote:
>> Andy wrote:
>>> Hi, the file below will print all the keywords in a file and also the
>>> line # of the keyword. What I couldn't figure out is to count those
>>> keywords per line. For example - "
[EMAIL PROTECTED] wrote:
> That's a short, abridged version of my code :) But, what I want is to
> count total# of keywords per line and print 'em. Rather than
> printing :
>
> The word 'and' belongs in line num: 1
> The word 'del' belongs in line num: 1
> The word 'from' belongs in line num: 1
>
ould hold true especially for large sets with sparse overlap
between lists. So it might be reasonable consider the content of your
sets and lists and write your code based on the content or on assuming a
particular composition.
James
--
http://mail.python.org/mailman/listinfo/python-list
> Is there an easy way to do this?
>
> Thanks!,
> Soren
>
For this particular, very narrow, example, following the example as
closely as I possibly can:
import re
atext = "text1 \n text2 \n text3 \n text4"
atup = tuple(re.split(r'\s*\n', atext))
James
--
http://mail.python.org/mailman/listinfo/python-list
--not
possible in python regex. You will have to use something else--or maybe
you don't understand the homework problem.
James
--
http://mail.python.org/mailman/listinfo/python-list
Flyzone wrote:
> P.S: i can't have more re.search, so [clip]
This reminds me of a quote by the Great Researcher Roy Garcia:
If it worked the first time, they'd just call it "search".
James
--
http://mail.python.org/mailman/listinfo/python-list
//www.pythonware.com/library/tkinter/introduction/x7583-patterns.htm
You need to also determine exactly what it is you want to scroll. You
probably don't want to scroll frame_grid as that contains your
scrollbar. Google "tkinter scrolled frame". Here is an example:
http:/
RobJ wrote:
> On Apr 30, 12:00 am, [EMAIL PROTECTED] (Alex Martelli) wrote:
>
>>RobJ <[EMAIL PROTECTED]> wrote:
>>
>>>http://pyschool.robj.webfactional.com/
>>
>>Things start on a pretty bad note when I'm asked to select my OS:
>>Ubuntu Linux
>>Windows XP
>>
>>I'm running MacOSX. What now? Why i
Méta-MCI wrote:
> Hi!
>
>
> See http://wiki.tcl.tk/10630
>
> Any plan to integrate Tcl 8.5 in standard Python?
>
>
>
> @+
>
> MCI
>
Better would be to outegrate it and instead use another gui kit as the
standard.
James
--
http://mail.python.org/mailman/listinfo/python-list
3], [4, 5], [6, 7], [8, 9], [10, 11], [12, 13]]
James
--
http://mail.python.org/mailman/listinfo/python-list
Regards,
>
> Jeremiah
>
For the impatient: http://tinyurl.com/2z6qeq
James
--
http://mail.python.org/mailman/listinfo/python-list
.3, but its very cool that one can depend
on wx being present on 10.4+ machines. So there is no need to bundle
python/wx with your app when developing for Macs. (Yes, I noticed the
author is running OS X 10.3.)
James
--
http://mail.python.org/mailman/listinfo/python-list
James Stroud wrote:
> miah_gbg wrote:
>
>> Hi there!
>>
>> Just wanted to let people know in this group that I have recently
>> (April 24th) published an introductory article on wxPython and Mac OS
>> X. It is available here: http://www.macdevcenter.com
ter way to do this today than to use lambda? It seemed
> the simplest way to do this that I could find.
>
You don't absolutely require lambda.
def add_self(afun):
def _f(self, *args, **kwargs):
return afun(*args, **kwargs)
return _f
superdict = addm(dict(), add_self(myUtils.HasDrive), "hasdrive")
James
--
http://mail.python.org/mailman/listinfo/python-list
nt than the active index (which is marked with an underline).
You are probably using the active index and don't realize the difference.
James
--
http://mail.python.org/mailman/listinfo/python-list
that he realised the Nazis had murdered
Jews 'on an industrial scale', he says. ' We didn't even know the names
of the concentration camps.'"
http://www.guardian.co.uk/germany/article/0,2763,1446410,00.html
James
--
http://mail.python.org/mailman/listinfo/python-list
default wrote:
> On 2 May 2007 20:10:20 -0700, Midex <[EMAIL PROTECTED]> wrote:
>
>> LIES LIES LIES LIES LIES
>
> Trying to understand the World Trade Center events is like waking up
> to act fifteen of a long Greek Tragedy. It needs a complex fabric of
> description to give a full picture. In ex
default wrote:
> On Fri, 04 May 2007 03:26:17 -0700, James Stroud
> <[EMAIL PROTECTED]> wrote:
>
>> default wrote:
>>> On 2 May 2007 20:10:20 -0700, Midex <[EMAIL PROTECTED]> wrote:
>>>
>>>> LIES LIES LIES LIES LIES
>>> Trying to
ning a name to a value rather than
"putting a value" into the name. When you assign, you completely change
the identity of name, rather than changing the contents of the name.
For example:
py> x = object()
py> id(x)
1074201696
py> x = object()
py> id(x)
1074201704
Notice how the identity (id) of x changes.
James
--
http://mail.python.org/mailman/listinfo/python-list
MooseFET wrote:
> On May 4, 12:32 pm, James Stroud <[EMAIL PROTECTED]> wrote:
> []
>
>>The Marxist contribution to western thought is that it put everything in
>>terms of labor and thus allowed us to quantify the human component of
>>economies.
>
>
&g
Charles wrote:
> On Fri, 04 May 2007 20:19:33 -0700, James Stroud
> <[EMAIL PROTECTED]> wrote:
>
>
>>MooseFET wrote:
>>
>>>On May 4, 12:32 pm, James Stroud <[EMAIL PROTECTED]> wrote:
>>>[]
>>>
>>>
>>>>The Mar
MooseFET wrote:
> On May 4, 8:19 pm, James Stroud <[EMAIL PROTECTED]> wrote:
>> MooseFET wrote:
>>> On May 4, 12:32 pm, James Stroud <[EMAIL PROTECTED]> wrote:
>>> []
>>>> The Marxist contribution to western thought is that it put every
[EMAIL PROTECTED] wrote:
> In article <[EMAIL PROTECTED]>,
>MooseFET <[EMAIL PROTECTED]> wrote:
>> On May 4, 8:19 pm, James Stroud <[EMAIL PROTECTED]> wrote:
>>> MooseFET wrote:
>> Groucho Marx.
>
> Give that man a cigar.
>
> /BAH
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
says...
> On Sat, 05 May 2007 07:54:50 +0100, Eeyore
> <[EMAIL PROTECTED]> wrote:
>
> >
> >
> >quasi wrote:
> >
> >> Gib Bogle wrote:
> >>
> >> >Ah, so the firefighters were in on the conspiracy!
> >>
> >> No, but the firefighters are very much aw
[EMAIL PROTECTED] wrote:
> Like i want the
> key 170 to take either the name 'dataPackageID' or the name
> 'LocalId'.I use this in my code,and hence if either comes it should
> work .
It should work to do what exactly? Cause a perturbation in the orbit of
Mars, or
[EMAIL PROTECTED] wrote:
> SkimpyGimpy is a collection of tools for generating
> HTML visual, PNG image, and WAVE audio components
> for use in web based applications including CAPTCHA
Can you advertise "CAPTCHA" as it is trademarked by Carnegie Mellon?
James
--
http://mail
time.sleep(some_number_of_seconds)
user_defined_method()
A more sophisticated approach would use threading, for example:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/464959
James
--
http://mail.python.org/mailman/listinfo/python-list
quasi wrote:
> On Mon, 7 May 2007 17:00:01 -0400, krw <[EMAIL PROTECTED]> wrote:
>
>
>>In article <[EMAIL PROTECTED]>,
>>[EMAIL PROTECTED] says...
>>
>>>On Mon, 7 May 2007 10:55:55 -0400, James Beck
>>><[EMAIL PROTECTED]> wrot
Tonico wrote:
> On May 4, 2:08 am, quasi <[EMAIL PROTECTED]> wrote:
>
>>On Fri, 04 May 2007 09:37:37 +1200, Gib Bogle
>>
>><[EMAIL PROTECTED]> wrote:
>>
>>>Ah, so the firefighters were in on the conspiracy!
>>
>>No, but the firefighters are very much aware that there is more to
>>9/11 than has bee
99"]
>
> permute("axc",N) or permute("2446",N) should raise ValueError as the
> alphabet is not strictly sorted.
>
> I have a reasonably elegant solution but it's a bit verbose (a couple
> dozen lines which I'll post later if there is i
sherry wrote:
> On May 8, 9:31 am, Steven D'Aprano
> <[EMAIL PROTECTED]> wrote:
>> On Mon, 07 May 2007 20:45:52 -0700, Michael Tobis wrote:
>>> I have a reasonably elegant solution but it's a bit verbose (a couple
>>> dozen lines which I'll post later if there is interest). Is there some
>>> clever
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
says...
> On Mon, 7 May 2007 10:55:55 -0400, James Beck
> <[EMAIL PROTECTED]> wrote:
>
> >In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
> >says...
> >> On Sat, 05 May 2007 07:54
Steven D'Aprano wrote:
> On Tue, 08 May 2007 10:22:05 +0000, James Stroud wrote:
>
>
>>This takes annoying past annoying to some new level of hell to which
>>even satan himself wouldn't venture.
>
>
> And thank you for sharing that piece of spam with u
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
says...
> James Beck wrote:
> >
> > Yep, you must have access to better drugs than I do.
> > You get to hallucinate your stuff up.
> > Don't forget to adjust your tin beanie!
>
>
>Its not a be
966) Episomic
resistance factors in Enterobacteriaceae. 34. The specific effects of
the inhibitors of DNA synthesis on the transfer of R factor and F
factor. Med. Biol. (Tokyo) 73:79-83.',
'Levy, S.B. (1967) Blood safari into Kenya. The New Physician
16:50-54.',
'Levy, S.B., W.T. Fitts and J.B. Leach (1967) Surgical treatment of
diverticular disease of the colon: Evaluation of an eleven-year period.
Annals Surg. 166:947-955.']
James
--
http://mail.python.org/mailman/listinfo/python-list
tate >> to print out >> 'disabled'
>
> Thanks
> Rahul
>
print w["state"]
James
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
says...
> James Beck wrote:
> >
> > In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
> > says...
> > > James Beck wrote:
> > > >
> > > > Yep, you must have access to be
entire bib,
making use of the numbering and eliminating the most probable, but still
fairly rare, potential ambiguity. You might want to check out that code,
as my testing it showed that it worked with your example.
James
--
http://mail.python.org/mailman/listinfo/python-list
elps make sense of maintaining branches based on
versions. I'm not sure why the announcements aren't bundled into one
because just about everyone who sees this for the first time asks the
same question.
James
--
http://mail.python.org/mailman/listinfo/python-list
re space inefficient than "pointers"?
The implementation of the dict would, in fact, itself be pointers, where
each key (same memory requirement if using pointers) is mapped to a
pointer to a dict node or a pointer to a leaf, same as with a more "low
level" construction. A printout of the graph as a dict might look a
little ugly, though.
I could be wrong, however.
James
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> I see that naming conventions are such that classes usually get named
> CamelCase. So why are the built-in types named all lowercase (like
> list, dict, set, bool, etc.)?
>
> And names for instances of classes are usually written in lowercase,
> like foo in ``foo = Camel
I use a variation of the following. Clean and straight forward.
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/425043
Vyacheslav Maslov wrote:
> Hi, all!
>
> I need multi threaded version of SimpleXMLRPCServer. Does python library
> already have implementation of this one? Or i need
proper settings of
LD_LIBRARY path.
Doesn't seem like hyper-paranoid sysadmining is all that efficient, does it?
James
--
http://mail.python.org/mailman/listinfo/python-list
o re-bind any events you have bound
when the button is "disabled". So its better to just use the "command"
parameter rather than binding mouse events.
An exception is Checkbutton, where you might want to bind
and then query the button's state (or the state of
*original_parameters):
do_something_to_caller_without_magic(caller)
do_something_with_original_parameters(*original_parameters)
James
--
http://mail.python.org/mailman/listinfo/python-list
walterbyrd wrote:
> Python's lack of an EOF character is giving me a hard time.
>
> I've tried:
>
[ stuff ]
for s in f:
do_whatever_with_s(s)
James
--
http://mail.python.org/mailman/listinfo/python-list
walterbyrd wrote:
> I don't know exactly what the first non-space character is. I know the
> first non-space character will be * or an alphanumeric character.
>
This is another of the hundreds of ways:
py> for i,c in enumerate(astring):
... if c != ' ': break
...
py> print i
--
http://mail.p
> or this:
>
> f = open('testdata','r')
> s = f.readline()
> while s:
> print repr(s)
> s = f.readline()
>
> Please post real, runnable code. You've done something wrong
> and we've no way to guess what it was if you won't show us your
> code.
>
I'm guessing it was runnable when he pasted it into google groups.
James
--
http://mail.python.org/mailman/listinfo/python-list
John Zenger wrote:
>>>>print [x for x in items if x != '']
>
> ['SRCPARAM', '1', '6.35e-07', '15.00', '340.00', '1.10', '3.0']
>
This can be shortened to
[x for x in items if x]
James
--
http://mail.python.org/mailman/listinfo/python-list
r that never
> takes part in a match. The docs are not very promising regarding
> such a thing, or did I miss something?
>
> Any other ideas?
>
> Tschö,
> Torsten.
>
You should probably provide examples of what you are trying to do or you
will likely get a lot of i
Torsten Bronger wrote:
> Hallöchen!
>
> James Stroud writes:
>
>
>>Torsten Bronger wrote:
>>
>>
>>>I need some help with finding matches in a string that has some
>>>characters which are marked as escaped (in a separate list of
>>>indi
ns)
You must decide for yourself how to deal with ambiguities. For example,
will '1.0' be a float or an int? The above assumes you want all values
in a column to have the same type. Reordering the loops can give mixed
types in columns, but would not fulfill your stated requirements. Some
things are not as efficient as they might be (for example, eliminating
the clumsy make_str). But adding tests to improve efficiency would cloud
the logic.
James
--
http://mail.python.org/mailman/listinfo/python-list
e files, taking a 1/N sample can save a lot of time with little
> chance of misdiagnosis.
Why stop there? You could lower the minimum 1/N by straightforward
application of Bayesian statistics, using results from previous tables
as priors.
James
--
http://mail.python.org/mailman/listinfo/python-list
Int (were the tenths-decimal place to vary randomly). You
could generate a similar statistical model to convince yourself with
vanishing uncertainty that the column that tests positive for Int four
times in a (random sample) is not actually a Float (even with only one
decimal place known).
James
--
http://mail.python.org/mailman/listinfo/python-list
James Stroud wrote:
> Now with one test positive for Int, you are getting pretty certain you
> have an Int column. Now we take a second cell randomly from the same
> column and find that it too casts to Int.
>
> P_2(H) = 0.9607843--> Confidence its an Int column from round
John Machin wrote:
> So, all in all, Bayesian inference doesn't seem much use in this scenario.
This is equivalent to saying that any statistical analysis doesn't seem
much use in this scenario--but you go ahead and use statistics anyway?
--
http://mail.python.org/mailman/listinfo/python-list
a Centauri where organizations are
fundamentally different from here on Earth and we can not make any
reasonable assumptions about them--like that they will indeed cough up
money when the time comes or that they speak a dialect of an earth
language or that they even generate spreadsheets for us to parse.
James
--
http://mail.python.org/mailman/listinfo/python-list
an 20%, but no where near the 0.001 cutoff
to conclude the column is not Int) and the final probability P_7(H|D) =
0.9986247 (rounding up to our 0.999 criteria for confidence that it is
an Int ;).
James
--
http://mail.python.org/mailman/listinfo/python-list
, especially given reasonable foreknowledge of how data types
are typically encoded.
James
--
http://mail.python.org/mailman/listinfo/python-list
nt mod1.doit(37)
except ValueError:
print 'Gracefully handling 37....'
print
print mod1.doit(37)
# end of mod2
James
--
http://mail.python.org/mailman/listinfo/python-list
nyone recommend a good library I can use for this?
>
>
> Matplotlib!
>
>
In the perennial spirit of one-upsmanship (or one-sidewaysmanship at the
very least):
Pychart!
James
--
http://mail.python.org/mailman/listinfo/python-list
ng paranormal conveyances:
ConfigParser
cPickle
shelve
I leave it to you to interpret them as I am just a messenger.
James
--
http://mail.python.org/mailman/listinfo/python-list
> ...
> empty
>
> But then doing the following gives a surprising (to me!) result
>
>
>>>>[] == False
>
> False
>
> Could anybody point out why this is the case?
>
> Thanks,
> Rajarshi
>
Meditate on:
py> isinstance(False, int)
True
py> isinstance([], int)
False
py> bool([])
False
James
--
http://mail.python.org/mailman/listinfo/python-list
Daniel wrote:
> On Sun, 22 Jul 2007 06:03:17 +0300, leegold <[EMAIL PROTECTED]> wrote:
>> say I have a text file:
>>
>> zz3 uaa4a ss 7 uu
>> zz 3 66 ppazz9
>> a0zz0
>>
>> I want to sort the text file. I want the key to be the number after
>> the two "zz". Or I guess a string of t
Take a look at
http://www.demonseed.net/~jp/code/magic.py
W3 wrote:
> Hi all,
>
> Just a quick one... Is there such a thing?
>
> Thanks,
> /Walter
--
http://mail.python.org/mailman/listinfo/python-list
gt; Does anyone know of a tokenizer that will allow for this sort of use?
>
> Thanks in advance,
> Jim Howard
>
Pyparsing: http://pyparsing.wikispaces.com/
James
--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095
http://www.jamesstroud.com/
--
http://mail.python.org/mailman/listinfo/python-list
ring at each round. Does
some function or library exist for these types of transformations that
works more like string.translate or is the above the best one can hope
to do without writing some C? I'm guessing that "if s in astr" type
optimizations are already done in the replace
Peter Otten wrote:
> unicode.translate() supports this kind of replacement...
> and re.compile(...).sub() accepts a function:
Thanks Peter!
--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095
http://www.jamesstroud.com/
--
http://mail.pyth
>
> I know the * operator. However, a 'partial unpack' does not seem to
> work.
>
> def g():
> return (1,2)
>
> def f(a,b,c):
> return a+b+c
>
> f(*g(),10) will return an error.
>
> Do you know how to get that to work?
>
> Thanks,
> cg
>
proliferate and self
> reinforce. All honest people have left this sad newsgroup. Buy bye,
> assholes, I am not going to miss you!!!
>
> Martha
You have convinced me to subscribe to clpm! Sounds like it will be fun
reading.
--
James Stroud
UCLA-DOE Institute for Genomics and P
Welcome aboard
On 7/25/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Python is a better language, with php support, anyway, but I am fed up
with attitudes of comp.lang.perl.misc. Assholes in this newsgroup ruin
Perl experience for everyone. Instead of being helpful, snide remarks,
back-bitin
Wow! They might leave this newsgroup now also!
On 7/25/07, Jürgen Exner <[EMAIL PROTECTED]> wrote:
[EMAIL PROTECTED] wrote:
> Python is a better language, with php support, anyway, but I am fed up
> with attitudes of comp.lang.perl.misc. Assholes in this newsgroup ruin
> Perl experience for eve
o access the file
multiple times at arbitrary positions, you may need to seek(0), cache
lines already read, or slurp the whole thing, which has already been
suggested.
James
--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095
http://www.jamesstroud.com/
--
http://mail.python.org/mailman/listinfo/python-list
em and wandered into the interior design department by
accident and found what I like to call "the motherload". No, the girls
definitely weren't doing the sciency stuff back then. But that has been
a few years already, so maybe things have changed.
James
--
James Stroud
UCLA-DOE I
Dear Lists
What is the difference between <> and !=
Thank You
James
--
http://www.goldwatches.com/watches.asp?brand=55
http://www.jewelerslounge.com
--
http://mail.python.org/mailman/listinfo/python-list
Watch all your favorite shows on your Computer from anywhere in the
World!
Save 1000's of $$$ over many years on cable and satellite bills.
INSTANT DOWNLOAD
For More Details: http://tvonpc.cq.bz
--
http://mail.python.org/mailman/listinfo/python-list
ck
>
>
Balme your professors. They are not paying for the books. Of course most
will be give a lot of lip-service to educational access for
disadvantaged groups but thier choice of books usually suggests
otherwise. The high price of textbooks and the tendency for professors
to overlook alternativ
d I should just start typing HTML.reStructuredText for this
sort of thing?
James
--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095
http://www.jamesstroud.com/
--
http://mail.python.org/mailman/listinfo/python-list
Carsten Haese wrote:
> On Mon, 2007-07-30 at 16:24 -0700, James Stroud wrote:
>
>>Hello All,
>>
>>I have a python module I wrote in C some time ago and I have since
>>forgotten how to use my functions and so I wanted to add some
>>doc-strings such that "
x27;functional' way to do the same.
>
> Thanks,
> beginner
>
Does it get any more functional than lambda?
py> f = lambda n, r=None: f(n/26, (r if r else [])) + [n%26] if n/26
else [n%26]
py> f(30)
[17, 1, 20, 12]
py> f(30000)
[1, 18, 9, 22]
py> f(3000)
[4, 11, 10]
py
James Stroud wrote:
> py> f = lambda n, r=None: f(n/26, (r if r else [])) + [n%26] if n/26
> else [n%26]
> py> f(30)
> [17, 1, 20, 12]
> py> f(3)
> [1, 18, 9, 22]
> py> f(3000)
> [4, 11, 10]
> py> f(1000)
> [1, 12, 12]
>
>
Oops, th
quite painful in Python (no tail
>>>recursion, and look at all that list copying).
>>
>
> It might actually be :
>
> def f(n):
> if n > 0:
> return ([n%26] + f(n/26))
> else:
> return []
>
> Wouldn't t
implementation for production software.
--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095
http://www.jamesstroud.com/
--
http://mail.python.org/mailman/listinfo/python-list
http://pythonnet.sourceforge.net/
On 8/1/07, Acm <[EMAIL PROTECTED]> wrote:
>
> I am working with Python 2.5.
>
> I would like to know how to call a .NET application (or .dll) from a
> Python script.
>
> Can anyone help please?
>
> Thank you.
>
> --
> http://mail.python.org/mailman/listinfo/python
I am very happy with there support i concur with what Joshua wrote! I have
yet to see a full paying consumer not happy with wingide
On 8/1/07, Steve Holden <[EMAIL PROTECTED]> wrote:
>
> Joshua J. Kugler wrote:
> > On Wednesday 01 August 2007 13:53, Robert Dailey wrote:
> >> He's secretly an emplo
sable(object):
def __init__(self, func):
self.func = func
def __call__(self, *args, **kwargs):
return functools.partial(self.func, *args, **kwargs)
For example:
@enclosable
def do_something_with(a, b):
[etc]
James
--
James Stroud
UCLA-DOE Institute for Genomics and
James Stroud wrote:
> import functools
> class enclosable(object):
> def __init__(self, func):
> self.func = func
> def __call__(self, *args, **kwargs):
> return functools.partial(self.func, *args, **kwargs)
>
> For example:
>
> @enclosable
> def
Watch Satellite TV On Your Computer Without Paying Monthly Fees... FOR
FREE?
Watch all your favorite shows on your Computer from anywhere in the
World!
Save 1000's of $$$ over many years on cable and satellite bills.
INSTANT DOWNLOAD
Plus Free Unlimited Downloads Movies, MP3s Music, etc !!!
Mo
mething_with(AModule, funcname)
Ideally, it would be nice to leave out AModule if the functions were
designed in the same namespace in which do_something_with is called.
Thanks in advance for any suggestions.
James
--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Ang
James Stroud wrote:
> Basically, what I am trying to acomplish is to be able to do this in any
> arbitrary module or __main__:
>
>
> funcname = determined_externally()
> ModuleUser.do_something_with(AModule, funcname)
>
>
> Ideally, it would be nice to leave out AM
James Stroud wrote:
> James Stroud wrote:
>
>> Basically, what I am trying to acomplish is to be able to do this in
>> any arbitrary module or __main__:
>>
>>
>> funcname = determined_externally()
>> ModuleUser.do_something_with(AModule, funcname)
>&
like it much, however, because
it seems unnatural.
James
--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095
http://www.jamesstroud.com/
--
http://mail.python.org/mailman/listinfo/python-list
current module when all you have is the name of the function in a
> string. The answer to that would be "globals()[funcname]".
This is like a bad case of phone-tag. Please see my response to your
previous post for why this does not seem feasible to me.
James
--
James Stroud
1501 - 1600 of 3475 matches
Mail list logo