On 2/12/2011 9:20 PM, Martin De Kauwe wrote:
On Feb 13, 5:12 am, Terry Reedy wrote:
On 2/12/2011 1:24 AM, Martin De Kauwe wrote:
The point of this posting was just to ask those that know, whether it
was a bad idea to use the class object in the way I had or was that
OK? And if I should have j
FYI: Your macro listing page seems to be broken:
http://sahriswiki.org/Macros
Cheers,
Chris
On Sat, Feb 12, 2011 at 2:13 PM, James Mills
wrote:
> Hello all,
>
> I'm pleased to announce the release of sahriswiki 0.8.1
>
> This is a minor bug-fix release.
>
> For more information see the PyPi page
On Feb 13, 1:29 am, aspineux wrote:
> Hi
>
> I'm releasing a .exe made with py2exe myself an got this problem too.
> 99% of the time the required DLL is already installed by another
> application and you don't need to care about it.
> The 1% is about empty or fresh windows install (server most of
On Fri, Feb 11, 2011 at 10:20 PM, Steven D'Aprano
wrote:
> On Fri, 11 Feb 2011 21:47:32 -0800, Dan Stromberg wrote:
>
>> Did you have some sort of bad experience with pylint? Do you resent the
>> 20 minutes it takes to set it up?
>
> If you read my post more carefully and less defensively, you'll
On Feb 13, 5:12 am, Terry Reedy wrote:
> On 2/12/2011 1:24 AM, Martin De Kauwe wrote:
>
> > The point of this posting was just to ask those that know, whether it
> > was a bad idea to use the class object in the way I had or was that
> > OK? And if I should have just used a dictionary, why?
>
> Di
> There seems no Rhino for linux.
Rhino is written in Java. "java -jar js.jar" works fine on my Linux machine.
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I released Benchmarker 3.0.1.
http://pypi.python.org/pypi/Benchmarker/
Benchmarker is a small utility to benchmark your code.
*NOTICE* This release doesn't have compatibility with release 2.0.0.
Download
http://pypi.python.org/pypi/Benchmarker/
Installation::
## if you have
There seems no Rhino for linux.
Spidermonkey won't support document , window and something else in js,
so it won't help me a lot.
On Sat, 2011-02-12 at 05:57 -0800, john wrote:
> Even though I've never tried it, you may want to look into running the html
> thru a separate javascript engine, lik
Arnaud Delobelle writes:
> "LL.Snark" writes:
>
>> Hi,
>>
>> I'm looking for a pythonic way to translate this short Ruby code :
>> t=[6,7,8,6,7,9,8,4,3,6,7]
>> i=t.index {|x| x>
>
> In Python3:
>
t = [6,7,8,6,7,9,8,4,3,6,7]
next(filter(t[0].__gt__, t))
> 4
Oops! I realised my mistake
On Sat, Feb 12, 2011 at 7:25 PM, Peter Otten <__pete...@web.de> wrote:
> Jean-Daniel wrote:
>
>> Hello,
>>
>> I am writing a small framework where the user which writes a function
>> can expect some global variable to be set in the function namespace.
>>
>> The user has to write a function like thi
"LL.Snark" writes:
> Hi,
>
> I'm looking for a pythonic way to translate this short Ruby code :
> t=[6,7,8,6,7,9,8,4,3,6,7]
> i=t.index {|x| x
In Python3:
>>> t = [6,7,8,6,7,9,8,4,3,6,7]
>>> next(filter(t[0].__gt__, t))
4
--
Arnaud
--
http://mail.python.org/mailman/listinfo/python-list
Paul Rubin wrote:
> Martin De Kauwe writes:
>> def wrapper(*old_dicts):
>> dict={}
>> for d in old_dicts:
>> dict.update(d)
>> return f(**dict)
>
> Untested:
>
> from itertools import chain
> def wrapper(*old_dicts):
>return f(**dict(chain
Martin De Kauwe writes:
> def wrapper(*old_dicts):
> dict={}
> for d in old_dicts:
> dict.update(d)
> return f(**dict)
Untested:
from itertools import chain
def wrapper(*old_dicts):
return f(**dict(chain(d.iteritems() for d in old_dicts)))
-
Hi
I'm releasing a .exe made with py2exe myself an got this problem too.
99% of the time the required DLL is already installed by another
application and you don't need to care about it.
The 1% is about empty or fresh windows install (server most of the
time)
For them, I provide a link to the M$ v
Dear Room,
I am using Windows XP (SP2) and a Python Version "Python 2.6.5
(r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on
win32".
I was looking to create exe files. Reviewing various posts here, I
felt py2exe may be the best thing I can opt for.
But for Python2.6 I found the f
Python 2.6 can run a zip file, searching for __main__.py in the root
of the zip archive and running it.
How can I create such an archive using distutils (and not
setuptools) ?
If I use
# python setup.py bdist --format=zip
I get a "dumb" zip file with a deep tree structure from "/" and I
cannot put
On Sat, Feb 12, 2011 at 9:08 AM, Martin De Kauwe wrote:
> Hi,
>
> Is there a better way to unpack more than one dictionary in a function
> than...
>
> def unpack_dicts(f):
> def wrapper(*old_dicts):
> dict={}
I wouldn't call the variable "dict" since that clashes with the name
of the bu
Martin De Kauwe wrote:
> Is there a better way to unpack more than one dictionary in a function
> than...
>
> def unpack_dicts(f):
> def wrapper(*old_dicts):
> dict={}
> for d in old_dicts:
> dict.update(d)
> return f(**dict)
> return wrapper
>
> @unp
Jean-Daniel wrote:
> Hello,
>
> I am writing a small framework where the user which writes a function
> can expect some global variable to be set in the function namespace.
>
> The user has to write a function like this:
> """
> # function.py
> from framework import, command, run
>
> @command
>
On 2/12/2011 1:24 AM, Martin De Kauwe wrote:
The point of this posting was just to ask those that know, whether it
was a bad idea to use the class object in the way I had or was that
OK? And if I should have just used a dictionary, why?
Did you miss my suggestion to use a module rather than a
Hello,
I am writing a small framework where the user which writes a function
can expect some global variable to be set in the function namespace.
The user has to write a function like this:
"""
# function.py
from framework import, command, run
@command
def myfunc():
print HOST
if __name__==
Hi,
Is there a better way to unpack more than one dictionary in a function
than...
def unpack_dicts(f):
def wrapper(*old_dicts):
dict={}
for d in old_dicts:
dict.update(d)
return f(**dict)
return wrapper
@unpack_dicts
def some_func(a=None, b=None, c=No
On Feb 12, 3:29 am, John Nagle wrote:
>
> If you're having trouble debugging a sequential program,
> you do not want to add shared memory to the problem.
No, you don't want to add additional concurrent threads of execution.
But he's not doing that, he's just preloading stuff into RAM. It's
n
Even though I've never tried it, you may want to look into running the html
thru a separate javascript engine, like spidermonkey or rhino, and then parse
the results of that.
On Friday, February 11, 2011 2:20:32 AM UTC-6, yanghq wrote:
> hi,
> I wanna get attribute value like href,src... in
On Feb 12, 8:06 pm, Martin De Kauwe wrote:
> On Feb 12, 7:21 pm, Andrea Crotti wrote:
>
> > Il giorno 12/feb/2011, alle ore 00.45, Martin De Kauwe ha scritto:
>
> > > Hi,
>
> > > yes I read a .INI file using ConfigParser, just similar sections (in
> > > my opinion) to make one object which i can
On Feb 12, 7:21 pm, Andrea Crotti wrote:
> Il giorno 12/feb/2011, alle ore 00.45, Martin De Kauwe ha scritto:
>
> > Hi,
>
> > yes I read a .INI file using ConfigParser, just similar sections (in
> > my opinion) to make one object which i can then pass to different
> > classes. E.G.
>
> Ok then I s
On Feb 12, 7:22 pm, John Nagle wrote:
> On 2/11/2011 6:56 AM, Martin De Kauwe wrote:
>
> > Hi,
>
> > I have a series of parameter values which i need to pass throughout my
> > code (>100), in C I would use a structure for example. However in
> > python it is not clear to me if it would be better t
On 2/10/2011 9:21 AM, Charles Fox (Sheffield) wrote:
On Feb 10, 3:43 pm, Jean-Paul Calderone
wrote:
On Feb 10, 9:30 am, "Charles Fox (Sheffield)"
wrote:
Thanks Jean-Paul, I'll have a think about this. I'm not sure if it
will get me exactly what I want though, as I would need to keep
unloadin
On Feb 11, 3:47 pm, Westley Martínez wrote:
> No, too confusing. Then people'll want compound loops e.g.:
>
> for a in b if c while d else return x:
> print('Ha ha I'm so clever!')
On Feb 11, 6:34 pm, Steven D'Aprano wrote:
> There's nothing wrong with writing
>
> for x in iterable:
> if
On 2/11/2011 6:56 AM, Martin De Kauwe wrote:
Hi,
I have a series of parameter values which i need to pass throughout my
code (>100), in C I would use a structure for example. However in
python it is not clear to me if it would be better to use a dictionary
or build a class object? Personally I t
On Fri, Feb 11, 2011 at 7:34 PM, Steven D'Aprano
wrote:
> On Fri, 11 Feb 2011 16:59:52 -0700, Ian Kelly wrote:
>
>> Why not allow the same thing in for-loop conditions?
>
> Because new syntax and new language features means more work. Somebody
> has to write the code, make sure that it doesn't bre
Il giorno 12/feb/2011, alle ore 00.45, Martin De Kauwe ha scritto:
> Hi,
>
> yes I read a .INI file using ConfigParser, just similar sections (in
> my opinion) to make one object which i can then pass to different
> classes. E.G.
Ok then I suggest configobj, less buggy and much more powerful th
Hello,
2011/2/11 yanghq :
> but for some pages rendered by js, like:
You could use selenium or windmill to help you reproduce the contents
of the web page in a browser so you can get the data from the DOM tree
once the page has been rendered instead of by parsing the js.
Best regards,
Jav
On Feb 11, 1:24 pm, "LL.Snark" wrote:
> Hi,
>
> I'm looking for a pythonic way to translate this short Ruby code :
> t=[6,7,8,6,7,9,8,4,3,6,7]
> i=t.index {|x| x
> If you don't know Ruby, the second line means :
> What is the index, in array t, of the first element x such that x
> If can write it
34 matches
Mail list logo