Hi,
is there a one-liner to accomplish the following task?
>From the list
l = ['string1', 'string2', 'string3']
generate the list of lists
l = [['string1'], ['string1', 'string2'], ['string1', 'string2',
'string3']]
Any help would be appreciated.
Thanks
Francesco
--
http://mail.python.org/mail
hi,all!
have you used 'dictionary' of linux, the program that rests on the
panel as an icon, and when you click on the icon, it will display a
window and do something. So i'm wondering how to achieve this. I guess
it's a dialog window, right? but the crucial part is how to minimize
the program to a
If you have Microsoft windows 98/2000/ME/XP/2003 Operating System on
your PC.
Then Open the Notepad and type the following sentence, and save the
file and close the notepad. Now reopen the file and you will find out
that, Notepad is not able to save the following text line.
Well you are speed
Thi
On Sep 15, 5:25 pm, 7stud <[EMAIL PROTECTED]> wrote:
>dialog.Destroy()
>timer.Stop()
>win.Show() #
You can also change that last line to win.Destroy(), and then the user
will never see the frame.
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 16, 12:03 am, [EMAIL PROTECTED] wrote:
> Goodtolove.com is sharing their 50% adsense revenue with you to post
> videos of anything.
> Just keep up logging in and start posting now to make money...
Could you give details about it ?
GEOrgE
http://zsoftwares.googlepages.com/index.htm
--
ht
Please tell me from which website I will get the free Python Ebook.
GEOrgE
http://zsoftwares.googlepages.com/index.htm
--
http://mail.python.org/mailman/listinfo/python-list
cesco wrote:
> l = ['string1', 'string2', 'string3']
l2=[l[:i+1] for i in range(len(l))]
--
http://mail.python.org/mailman/listinfo/python-list
On 9/16/07, cesco <[EMAIL PROTECTED]> wrote:
> Hi,
>
> is there a one-liner to accomplish the following task?
> >From the list
> l = ['string1', 'string2', 'string3']
> generate the list of lists
> l = [['string1'], ['string1', 'string2'], ['string1', 'string2',
> 'string3']]
>
> Any help would be
On Sun, 16 Sep 2007 15:05:55 +1000, Ben Finney wrote:
> Steven D'Aprano <[EMAIL PROTECTED]> writes:
>
>> In *general* the compiler can't tell, but in specific cases it could. A
>> (hypothetical) optimizing compiler would tell the difference between:
>>
>> for item in alist[1:5]:
>> print ite
Hi,
I have the following list:
l = [1, 2, 3, 4]
and I'd like to obtain a list like the following:
l_partial_sum = [1, 3, 6, 10] (that is [1, 1+2, 1+2+3, 1+2+3+4])
Is there a simple way to accomplish this?
I came up with the following solution but it seems a bit too
elaborated for the task:
l_par
On Sep 16, 11:56 am, cesco <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have the following list:
> l = [1, 2, 3, 4]
> and I'd like to obtain a list like the following:
> l_partial_sum = [1, 3, 6, 10] (that is [1, 1+2, 1+2+3, 1+2+3+4])
>
> Is there a simple way to accomplish this?
>
> I came up with the f
Hi all,
To get the hostname, I can use socket.gethostbyname() but that has an
inherent limitation wherein does it not support IPv6 name resolution, and
getaddrinfo() should be used instead.
Looking up the socket.getaddrinfo() documentation, I come to know that
The getaddrinfo() function returns a
Uh... that turned out weird.
Anyways, here goes again
l = [1, 2, 3, 4]
[sum(l[:x+1]) for x in xrange(len(l))]
--
http://mail.python.org/mailman/listinfo/python-list
Hi guys. I'm using python 2.3 on XP. At the moment, I might add, I
cannot change any of these: I cannot move back to linux, and I cannot
use a higher version of python.
Trying to install sip 4.7, using gcc version 3.4.2 (mingw-special),
created this error:
siplib.o:siplib.c:(.text+0x17): undefined
> l = [1, 2, 3, 4]
> [sum(l[:x+1]) for x in xrange(len(l))]
Thanks,
actually my problem is a bit more complex (I thought I could get a
solution by posting a simplified version...)
The list is composed of objects:
l = [obj1, obj2, obj3, obj4]
and I need to call a method (say method1) on each obje
On Sun, 16 Sep 2007 09:50:39 +, Steven D'Aprano wrote:
> The point is rather moot, since CPython (and probably other Pythons) do
> almost no optimizations. But just because Python is a dynamic language
> doesn't mean there are no optimizations possible: Haskell is a dynamic
> language, and
Hi George,
> Please tell me from which website I will get the free Python Ebook.
which one do you mean?
I only know this one:
http://diveintopython.org
Bye,
Marco
PS: Sorry, hit the wrong button the first time ;-)
--
http://mail.python.org/mailman/listinfo/python-list
> Haskell is a dynamic language, and there are optimizing compilers for it.
Last time I used Haskell it was statically typed but this has been
almost a year ago and times are changing fast.
About optimizing compilers for Python. These won't work without
restrictions a la Shedskin which uses C++ a
cesco wrote:
> The list is composed of objects:
> l = [obj1, obj2, obj3, obj4]
> and I need to call a method (say method1) on each object as follow:
> l1 = [obj1.method1(obj2), obj2.method1(obj3), obj3.method1(obj4),
> obj4]
to me it sounds a bit different from the original request, but...
> Is
Stefan Behnel schrieb:
> Stefan Behnel wrote:
>> Diez B. Roggisch wrote:
>>> Any suggestions on how to teach the built-in ET-parser entities?
>> As you already do it in your code.
>>
>> http://effbot.org/elementtree/elementtree-xmlparser.htm#tag-ET.XMLParser.entity
>
> Hmmm, I never needed this, b
Those methods of computing partial sums seem to be O(n^2) or worse.
What's wrong with an ordinary loop?
for i in xrange(1, len(l)):
l[i] += l[i - 1]
And as for the list of objects:
ll = [l[i - 1].method(l[i]) for i in xrange(1, len(l))] + l[-1]
--
http://mail.python.org/mailman/listinfo/py
On Sep 15, 5:11 pm, James Stroud <[EMAIL PROTECTED]> wrote:
> Steve Holden wrote:
> > I don't know why you have a bug up your ass about it, as the
> > Americans say.
>
> I think most Americans say "wild hare up your ass". We do not, in fact,
> say "wild hair up your ass". Many of us can testify tha
Hi, Folks:
I am using Python in WSH. However, I got a strange problem on my
computer. Here is a small program to show the problem.
# xxx.pys
objArgs = WScript.Arguments
for i in xrange(objArgs.Count()):
WScript.Echo(objArgs(i))
WScript.Echo('Total %d arguments.' % objArgs.Count())
If I execu
On 9/15/07, Steve Holden <[EMAIL PROTECTED]> wrote:
> John Machin wrote:
> > On 16/09/2007 8:11 AM, James Stroud wrote:
> >> Steve Holden wrote:
> >>> I don't know why you have a bug up your ass about it, as the
> >>> Americans say.
> >> I think most Americans say "wild hare up your ass".
> >
> I
ZeD wrote:
> cesco wrote:
>
>
>> The list is composed of objects:
>> l = [obj1, obj2, obj3, obj4]
>> and I need to call a method (say method1) on each object as follow:
>> l1 = [obj1.method1(obj2), obj2.method1(obj3), obj3.method1(obj4),
>> obj4]
>>
>
> to me it sounds a bit different from
On Sun, 16 Sep 2007 10:21:59 +, cesco wrote:
> The list is composed of objects:
> l = [obj1, obj2, obj3, obj4]
> and I need to call a method (say method1) on each object as follow: l1 =
> [obj1.method1(obj2), obj2.method1(obj3), obj3.method1(obj4), obj4]
>
> Is there a clean way of doing this
On Sun, 16 Sep 2007 09:56:04 +, cesco wrote:
> Hi,
>
> I have the following list:
> l = [1, 2, 3, 4]
> and I'd like to obtain a list like the following:
> l_partial_sum = [1, 3, 6, 10]
> (that is [1, 1+2, 1+2+3, 1+2+3+4])
>
> Is there a simple way to accomplish this?
Yes, use a loop. Put
GaryLee <[EMAIL PROTECTED]> wrote:
> Does anyone have the same situation? Is it my pywin32 package
> corrupted? I've downloaded the last pywin32 package and executed the
> site-packages\win32comext\axscript\client\pyscript.py to register the
> PyScript. But, the problem is still there.
>
I've no
On Sun, 16 Sep 2007 10:58:07 +, Marc 'BlackJack' Rintsch wrote:
> On Sun, 16 Sep 2007 09:50:39 +, Steven D'Aprano wrote:
>
>> The point is rather moot, since CPython (and probably other Pythons) do
>> almost no optimizations. But just because Python is a dynamic language
>> doesn't mean t
On Sun, 16 Sep 2007 04:18:30 -0700, marek.rocki wrote:
> Those methods of computing partial sums seem to be O(n^2) or worse.
> What's wrong with an ordinary loop?
Haven't you heard? There's a global shortage of newlines, and programmers
have been asked to do their bit to conserve them.
--
Ste
Marc 'BlackJack' Rintsch wrote:
> On Thu, 06 Sep 2007 09:00:02 +0200, Stefan Arentz wrote:
>
>> What I find really frustrating in Python (combined with usually bad
>> documentation) is that many people have different styles. The most
>> frustratinng being getFoo() vs .foo, vs get_foo().
>
> `getF
On 9/16/07, Colin J. Williams <[EMAIL PROTECTED]> wrote:
>
> Marc 'BlackJack' Rintsch wrote:
> > On Thu, 06 Sep 2007 09:00:02 +0200, Stefan Arentz wrote:
> >
> >> What I find really frustrating in Python (combined with usually bad
> >> documentation) is that many people have different styles. The m
On Sun, 16 Sep 2007 13:31:57 +, Steven D'Aprano wrote:
> On Sun, 16 Sep 2007 10:58:07 +, Marc 'BlackJack' Rintsch wrote:
>
>> On Sun, 16 Sep 2007 09:50:39 +, Steven D'Aprano wrote:
>>
>>> The point is rather moot, since CPython (and probably other Pythons) do
>>> almost no optimizati
Hi:
I'm working with probstat module which does an excellent job for the
project I'm working on.
I am passing the Combination objects I generate to generator functions
that allow me to scale down the results.
I am trying to find a way however to store the end resultant
Combination object. Try t
hi, all
I attempt to use the function inch() to get the character at the
current position, and compare it with a particular character like :
if screen.inch(x,y) == 'F'
but this method doesn't seem work, can anyone tell me the reason and
how to corrent it
thanks
--
http://mail.python.org/mailman/l
I'd like to filter spam from a certain company. Here are examples of
strings found in their spam:
Mega Dik
Mega D1k
MegaDik
Mega. Dik
M eg ad ik
M E _G_A_D_ IK
M_E_G. ADI. K
I figured that this regex would match all but the second example, yet
it matches none:
|[^a-z]m[^a-z]e[^a-z]g[^a-z]a[^a-z]d[
On Sep 16, 10:18 am, "Dotan Cohen" <[EMAIL PROTECTED]> wrote:
> I'd like to filter spam from a certain company. Here are examples of
> strings found in their spam:
> Mega Dik
> Mega D1k
> MegaDik
> Mega. Dik
> M eg ad ik
> M E _G_A_D_ IK
> M_E_G. ADI. K
>
> I figured that this regex would match all
On Sep 16, 10:18 am, "Dotan Cohen" <[EMAIL PROTECTED]> wrote:
> I'd like to filter spam from a certain company. Here are examples of
> strings found in their spam:
> Mega Dik
> Mega D1k
> MegaDik
> Mega. Dik
> M eg ad ik
> M E _G_A_D_ IK
> M_E_G. ADI. K
>
> I figured that this regex would match all
Steven D'Aprano wrote:
> On Sun, 16 Sep 2007 15:05:55 +1000, Ben Finney wrote:
>
>> Steven D'Aprano <[EMAIL PROTECTED]> writes:
>>
>>> In *general* the compiler can't tell, but in specific cases it could. A
>>> (hypothetical) optimizing compiler would tell the difference between:
>>>
>>> for item
Dotan Cohen schreef:
> I'd like to filter spam from a certain company. Here are examples of
> strings found in their spam:
> Mega Dik
> Mega D1k
> MegaDik
> Mega. Dik
> M eg ad ik
> M E _G_A_D_ IK
> M_E_G. ADI. K
>
> I figured that this regex would match all but the second example, yet
> it matche
Steven D'Aprano wrote:
> On Sun, 16 Sep 2007 15:05:55 +1000, Ben Finney wrote:
>
>> Steven D'Aprano <[EMAIL PROTECTED]> writes:
>>
>>> In *general* the compiler can't tell, but in specific cases it could. A
>>> (hypothetical) optimizing compiler would tell the difference between:
>>>
>>> for item
Hi everybody,
Some of my colleagues want me to write a script for easy folder and
subfolder creation on the Mac.
The script is supposed to scan a text file containing directory trees
in the following format:
[New client]
|-Invoices
|-Offers
|--Denied
|--Accepted
|-Delivery notes
As you can see,
Does anybody know a good solution (preferably in python) for rasterizing
SVG or other vector graphics.
I'm thinking something like
vector_image = SVGFile(path_to_image)
raster_image = vector_image.rasterize(format, (width, height), dpi)
raster_image.write(out_file)
Thanks for any pointers you mi
Rustom Mody wrote:
> On 9/16/07, cesco <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> is there a one-liner to accomplish the following task?
>> >From the list
>> l = ['string1', 'string2', 'string3']
>> generate the list of lists
>> l = [['string1'], ['string1', 'string2'], ['string1', 'string2',
>> 'stri
On 16/09/2007, Paul McGuire <[EMAIL PROTECTED]> wrote:
> On Sep 16, 10:18 am, "Dotan Cohen" <[EMAIL PROTECTED]> wrote:
> > I'd like to filter spam from a certain company. Here are examples of
> > strings found in their spam:
> > Mega Dik
> > Mega D1k
> > MegaDik
> > Mega. Dik
> > M eg ad ik
> > M E
On 16/09/2007, Roel Schroeven <[EMAIL PROTECTED]> wrote:
> FYI Kodos (http://kodos.sourceforge.net/) can be very useful for
> developing, testing and debugging such regexes.
Thanks, it's even in the Ubuntu repos.
> If I have been able to see further, it was only because I stood
> on the shoulders
Jimmy wrote:
> hi, all
> I attempt to use the function inch() to get the character at the
> current position, and compare it with a particular character like :
> if screen.inch(x,y) == 'F'
> but this method doesn't seem work, can anyone tell me the reason and
> how to corrent it
> thanks
>
The rea
Steven D'Aprano <[EMAIL PROTECTED]> writes:
> > What do you mean by Haskell is a dynamic language? It is statically and
> > strict typed and the compiler usually knows all the functions. No
> > "surprises", no side effects, no duck typing.
>
> Haskell's IO monad (and possibly the do monad?) allo
cesco пишет:
> Hi,
>
> I have the following list:
> l = [1, 2, 3, 4]
> and I'd like to obtain a list like the following:
> l_partial_sum = [1, 3, 6, 10] (that is [1, 1+2, 1+2+3, 1+2+3+4])
>>> def iscan(f, seq, acc=0):
... for i in seq:
...acc = f(acc,i)
...yield acc
...
>>>
cesco <[EMAIL PROTECTED]> writes:
> I have the following list:
> l = [1, 2, 3, 4]
> and I'd like to obtain a list like the following:
> l_partial_sum = [1, 3, 6, 10] (that is [1, 1+2, 1+2+3, 1+2+3+4])
>
> Is there a simple way to accomplish this?
I won't show explicit code since you are apparentl
On Sun, 16 Sep 2007 10:17:18 -0400, Colin J. Williams wrote:
> Marc 'BlackJack' Rintsch wrote:
>
>> `getFoo()` is discouraged by PEP 8. […]
>
> Perhaps PEP 8 needs rethinking. I prefer getFoo().
Yeah, *your* preference is a very good reason to rethink PEP 8… ;-)
Ciao,
Marc 'BlackJack'
On Sep 17, 12:07 am, Steve Holden <[EMAIL PROTECTED]> wrote:
> Jimmy wrote:
> > hi, all
> > I attempt to use the function inch() to get the character at the
> > current position, and compare it with a particular character like :
> > if screen.inch(x,y) == 'F'
> > but this method doesn't seem work,
Hi all,
I would like to create an application on a Windows machine, such that
when a document is dragged and dropped on the application icon on the
desktop, the document is processed by the application
For instance, if I drag & drop an Outlook message or a PPT
presentation, the application would
J. Cliff Dyer wrote:
> Does anybody know a good solution (preferably in python) for rasterizing
> SVG or other vector graphics.
>
> I'm thinking something like
>
> vector_image = SVGFile(path_to_image)
> raster_image = vector_image.rasterize(format, (width, height), dpi)
> raster_image.write(out_
On Sep 16, 3:46 am, GeorgeRXZ <[EMAIL PROTECTED]> wrote:
> If you have Microsoft windows 98/2000/ME/XP/2003 Operating System on
> your PC.
> Then Open the Notepad and type the following sentence, and save the
> file and close the notepad. Now reopen the file and you will find out
> that, Notepad is
Sorry for answering so late. Thanks a million! This code snippet
helped me solve the problem.
I think I will be using SQLAlchemy for these sorts of things from now
on though, it seems to be taking care of these things itself, on top
of being one hell of a handy ORM of course :)
thijs
On 1 sep, 0
On Sep 14, 1:00 am, Jonathan Gardner
<[EMAIL PROTECTED]> wrote:
> On Sep 12, 9:38 pm, Prateek <[EMAIL PROTECTED]> wrote:
>
> > Have you checked out Brainwave?http://www.brainwavelive.com
>
> > We provide a schema-free non-relational database bundled with an app
> > server which is basically CherryP
Paddy wrote:
> On Sep 13, 1:30 am, Amer Neely <[EMAIL PROTECTED]> wrote:
>> I'm a complete newbie with Python, but have several years experience
>> with Perl in a web environment.
>>
>> A question I have, if someone here is familiar with Perl, does Python
>> have something like Perl's 'here documen
so i have always heard of the .pyc files but for some reason i
don't see them on the Windows platform... when i have a program
called try.py and after running it for ages, i still don't have a
try.pyc file in my folder even if i turn the "show hidden file" to on.
--
http://mail.python.org
On Sep 16, 12:28 pm, Summercool <[EMAIL PROTECTED]> wrote:
> so i have always heard of the .pyc files but for some reason i
> don't see them on the Windows platform... when i have a program
> called try.py and after running it for ages, i still don't have a
> try.pyc file in my folder even
On Sun, 16 Sep 2007 17:28:30 +, Summercool wrote:
> so i have always heard of the .pyc files but for some reason i
> don't see them on the Windows platform... when i have a program
> called try.py and after running it for ages, i still don't have a
> try.pyc file in my folder even if i
Stefan Behnel wrote:
> J. Cliff Dyer wrote:
>
>> Does anybody know a good solution (preferably in python) for rasterizing
>> SVG or other vector graphics.
>>
>> I'm thinking something like
>>
>> vector_image = SVGFile(path_to_image)
>> raster_image = vector_image.rasterize(format, (width, height
On Sunday 16 September 2007, J. Cliff Dyer wrote:
> Does anybody know a good solution (preferably in python) for rasterizing
> SVG or other vector graphics.
>
> I'm thinking something like
>
> vector_image = SVGFile(path_to_image)
> raster_image = vector_image.rasterize(format, (width, height), dpi
Jimmy wrote:
> On Sep 17, 12:07 am, Steve Holden <[EMAIL PROTECTED]> wrote:
>> Jimmy wrote:
>>> hi, all
>>> I attempt to use the function inch() to get the character at the
>>> current position, and compare it with a particular character like :
>>> if screen.inch(x,y) == 'F'
>>> but this method doe
check this out buddies... a kool site for anti hacking and hacking
tips and tricks , computer tweaks to enhance ur pc,small virus
creation ,etc it's the best site ...
www.realm-of-tricks.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano <[EMAIL PROTECTED]> writes:
> On Sat, 15 Sep 2007 15:56:40 +0200, Arnau Sanchez wrote:
>
>> js escribió:
>>
On 9/15/07, Summercool <[EMAIL PROTECTED]> wrote:
>>
in Python... is the method to use ",".join() ? but then it must take
a list of strings... not integers
On Sep 17, 2:25 am, Steve Holden <[EMAIL PROTECTED]> wrote:
> Jimmy wrote:
> > On Sep 17, 12:07 am, Steve Holden <[EMAIL PROTECTED]> wrote:
> >> Jimmy wrote:
> >>> hi, all
> >>> I attempt to use the function inch() to get the character at the
> >>> current position, and compare it with a particular
On Sep 16, 1:10?pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> On Sun, 16 Sep 2007 01:46:34 -0700, GeorgeRXZ <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
> > Then Open the Notepad and type the following sentence, and save the
> > file and close the notepad. Now reopen th
I'm trying to do the following. I have a Python application that is
run:
python app1.py --location=c:\test1
What I want to do is save the location parameter, so I can then do (in
the same window):
python app2.py
And have app2.py automatically have access to the value of "location".
Now, the di
On Sep 16, 8:01 am, dohertywa <[EMAIL PROTECTED]> wrote:
> Hi:
>
> I'm working with probstat module which does an excellent job for the
> project I'm working on.
>
> I am passing the Combination objects I generate to generator functions
> that allow me to scale down the results.
>
> I am trying to
John Roth a écrit :
> On Sep 12, 11:35 am, TheFlyingDutchman <[EMAIL PROTECTED]> wrote:
>
>>On Sep 12, 4:40 am, Bjoern Schliessmann <[EMAIL PROTECTED]> wrote:
>>
>>>Ivan Voras wrote:
>>>
What does "self" have to do with an object model? It's an
function/method argument that might as well b
Paul Rudin <[EMAIL PROTECTED]> wrote:
...
> Isn't it odd that the generator isn't faster, since the comprehension
> presumably builds a list first and then iterates over it, whereas the
> generator doesn't need to make a list?
The generator doesn't, but the implementation of join then does
(alm
[EMAIL PROTECTED] wrote:
> On Sep 16, 1:10?pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
>> On Sun, 16 Sep 2007 01:46:34 -0700, GeorgeRXZ <[EMAIL PROTECTED]>
>> declaimed the following in comp.lang.python:
>>
>>> Then Open the Notepad and type the following sentence, and save the
>>> file and cl
On Sunday 16 September 2007, Pierre Quentel wrote:
> Hi all,
>
> I would like to create an application on a Windows machine, such that
> when a document is dragged and dropped on the application icon on the
> desktop, the document is processed by the application
>
> For instance, if I drag & drop a
Erik Jones a écrit :
> On Sep 14, 2007, at 11:54 PM, David Trudgett wrote:
>
>> TheFlyingDutchman <[EMAIL PROTECTED]> writes:
>>
(snip)
>>
>> Several languages use the "object.method(args)" form, which is syntactic
>> sugar for "method(object, other_args)" which Ada, for instance, uses.
>> Knowi
I've checked for space/tab problems twice. Any ideas? Thanks ahead
of time.
404 Not Found
The path '/' was not found.
Page handler: "The path '/' was not found."
Traceback (most recent call last):
File "c:\python25\lib\site-packages\cherrypy-2.2.1-py2.5.egg\cherrypy
\_cphttptools.py", line 10
Hi,
I'm looking for a construct that's similar to (Turbo) Pascal's "with"
statement. I read about the Python's new "with" statement, but I was
dissapointed to learn that it does something different (I still don't
see how it's better than try..except..finally, but that's not my question).
Is there
On Sep 16, 6:46 pm, GeorgeRXZ <[EMAIL PROTECTED]> wrote:
> If you have Microsoft windows 98/2000/ME/XP/2003 Operating System on
> your PC.
> Then Open the Notepad and type the following sentence, and save the
> file and close the notepad. Now reopen the file and you will find out
> that, Notepad is
Ivan Voras wrote:
> Hi,
>
> I'm looking for a construct that's similar to (Turbo) Pascal's "with"
> statement. I read about the Python's new "with" statement, but I was
> dissapointed to learn that it does something different (I still don't
> see how it's better than try..except..finally, but that'
On 9/16/07, Stodge <[EMAIL PROTECTED]> wrote:
> python app1.py --location=c:\test1
> What I want to do is save the location parameter, so I can then do (in
> the same window):
> python app2.py
> And have app2.py automatically have access to the value of "location".
Do app1.py to save a pickle of t
Ivan Voras wrote:
> I'm looking for a construct that's similar to (Turbo) Pascal's
> "with" statement.
Please have a look at the archives -- this is discussed here from
time to time. I think last time it was a Visual BASIC fan that
asked a similar question.
> I know it can be almost always done
On Sep 16, 2:22?pm, Steve Holden <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > On Sep 16, 1:10?pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> >> On Sun, 16 Sep 2007 01:46:34 -0700, GeorgeRXZ <[EMAIL PROTECTED]>
> >> declaimed the following in comp.lang.python:
>
> >>> Then Open the
On 2007-09-16, Martin M. <[EMAIL PROTECTED]> wrote:
> Hi everybody,
>
> Some of my colleagues want me to write a script for easy folder and
> subfolder creation on the Mac.
>
> The script is supposed to scan a text file containing directory trees
> in the following format:
>
> [New client]
>|-Invoi
On Sep 17, 7:54 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> On Sep 16, 2:22?pm, Steve Holden <[EMAIL PROTECTED]> wrote:
>
>
>
> > [EMAIL PROTECTED] wrote:
> > > On Sep 16, 1:10?pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> > >> On Sun, 16 Sep 2007 01:46:34 -0700, GeorgeRXZ <[EMAIL PRO
Announcing the release of pprocess 0.3 (previously known as parallel/
pprocess), available from...
http://www.python.org/pypi/pprocess/0.3
Note that only POSIX-like platforms are supported in this release,
although improvements in portability and all other areas are welcome.
What is it?
On Sun, 16 Sep 2007 09:12:56 -0700, Paul Rubin wrote:
> Steven D'Aprano <[EMAIL PROTECTED]> writes:
>> > What do you mean by Haskell is a dynamic language? It is statically
>> > and strict typed and the compiler usually knows all the functions.
>> > No "surprises", no side effects, no duck typin
On Sun, 16 Sep 2007 19:25:22 +0100, Paul Rudin wrote:
>> The generator expression takes about twice as long to run, and in my
>> opinion it is no more readable. So what's the advantage?
>
> If you do it with a decent size list they take more or less the same
> time.
Did you try it, or are you g
Thomas Jollans wrote:
> On Sunday 16 September 2007, Pierre Quentel wrote:
>> Hi all,
>>
>> I would like to create an application on a Windows machine, such that
>> when a document is dragged and dropped on the application icon on the
>> desktop, the document is processed by the application
>>
>> F
On Sun, 16 Sep 2007 11:49:15 -0400, Steve Holden wrote:
>> It seems to me that the "consenting adults" philosophy of Python
>> doesn't extend to the compiler, and perhaps it should. Maybe Python
>> could optimize common cases, and if developers wanted to do wacky
>> things, let them turn optimizat
On Sep 16, 5:28?pm, John Machin <[EMAIL PROTECTED]> wrote:
> On Sep 17, 7:54 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > On Sep 16, 2:22?pm, Steve Holden <[EMAIL PROTECTED]> wrote:
>
> > > [EMAIL PROTECTED] wrote:
> > > > On Sep 16, 1:10?pm, Dennis Lee Bieber <[EMAIL PROTECTED]
Theres a few python ebooks listed on the wiki
http://wiki.python.org/moin/PythonBooks
Hope this helps,
Nathan
On 16/09/2007, Marco <[EMAIL PROTECTED]> wrote:
> Hi George,
>
> > Please tell me from which website I will get the free Python Ebook.
> which one do you mean?
>
> I o
HI,
I m trying to start an api in a similar way to the djangic way of
Class.objects.all(). Ie objects is a "Manager" class.
So:
class Foo(object):
def __init__(self):
self.test = "NEE"
class Manager(object):
def __init__(self):
pass
def all(self):
return "COCONU
Steven D'Aprano wrote:
> On Sun, 16 Sep 2007 11:49:15 -0400, Steve Holden wrote:
>
>>> It seems to me that the "consenting adults" philosophy of Python
>>> doesn't extend to the compiler, and perhaps it should. Maybe Python
>>> could optimize common cases, and if developers wanted to do wacky
>>>
On Sep 17, 8:53 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> On Sep 16, 5:28?pm, John Machin <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Sep 17, 7:54 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > > On Sep 16, 2:22?pm, Steve Holden <[EMAIL PROTECTED]> wrote:
>
> > > > [EMAIL PROTECTED
[EMAIL PROTECTED] wrote:
> On Sep 16, 5:28?pm, John Machin <[EMAIL PROTECTED]> wrote:
>> On Sep 17, 7:54 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>>
>>
>>
>>
>>
>>> On Sep 16, 2:22?pm, Steve Holden <[EMAIL PROTECTED]> wrote:
[EMAIL PROTECTED] wrote:
> On Sep 16, 1:10?pm, Dennis L
On Sep 17, 1:14 am, "Nathan Harmston" <[EMAIL PROTECTED]>
wrote:
> HI,
>
> I m trying to start an api in a similar way to the djangic way of
> Class.objects.all(). Ie objects is a "Manager" class.
>
> So:
>
> class Foo(object):
>def __init__(self):
> self.test = "NEE"
>
> class Manager(
Steven D'Aprano <[EMAIL PROTECTED]> writes:
> On Sun, 16 Sep 2007 15:05:55 +1000, Ben Finney wrote:
> > The compiler for a dynamic language like Python has very little
> > absolute "no significant side-effect in these specific cases"
> > guarantee of the kind you're assuming even in the cases you
On Sep 16, 6:25?pm, Steve Holden <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > On Sep 16, 5:28?pm, John Machin <[EMAIL PROTECTED]> wrote:
> >> On Sep 17, 7:54 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> >>> On Sep 16, 2:22?pm, Steve Holden <[EMAIL PROTECTED]> wrote:
> [E
PFGCIO <[EMAIL PROTECTED]> writes:
> I've checked for space/tab problems twice. Any ideas?
For CherryPy support, you might want to instead try the mailing lists
for that project:
http://www.cherrypy.org/wiki/CherryPyInvolved#Howtocontactus>
--
\ "Professionalism has no place in
Ivan Voras <[EMAIL PROTECTED]> writes:
> I know it can be almost always done by using a temporary variable:
>
> tmp = some.big.structure.or.nested.objects.element
> tmp.member1 = something
> tmp.member2 = something
>
> but this looks ugly to me.)
To me, it looks explicit. Python programmers val
1 - 100 of 121 matches
Mail list logo