[Diez B. Roggisch]
> > out:) But I wanted a general purpose based solution to be available that
> > doesn't count on len() working on an arbitrary iterable.
[Peter Otten]
> You show signs of a severe case of morbus itertools.
> I, too, am affected and have not yet fully recovered...
Maybe you guy
>
>story stargaming, I caught it first this time !-)
Shouldn't that be s-o-r-r-y :-)
> <*ot>
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 16, 8:29 pm, Paul Miller <[EMAIL PROTECTED]> wrote:
> I'm looking at doing some currency calculations in some Python code
> integrated with a C++ application. I want to be able to come up with the
> same values I get in an Excel spreadsheet.
Ouch! do really want to come up with the Excel re
Grant Edwards wrote:
> On 2007-10-16, Robert Kern <[EMAIL PROTECTED]> wrote:
>
>> It's not universal. Many people consider it harmful. Google "reply-to
>> considered
>> harmful" for a variety of opinions, for and against.
>>
>> I use GMane to read and post to this list because I like my lists to
I don't understand my earlier problem but the following code works no
matter what the ylim is set to:
I reworked the example major_minor_demo1.py to find the answer.
thanks
Dick C
ps: I still can't post a reply since I read the list with my mozilla or
konqueror browser and email separately wit
On Tue, 16 Oct 2007 13:16:50 +, Alexandre Badez wrote:
> Hye everyone,
>
> I'm would like to do something a bit tricky.
>
> I would like when I do something like to create a __init__ package's
> (here calle my_package) file witch make an action when we try to import
> something in this packa
O> > while cal <=0:
> >#Prompt for calories
> >cal = input("Please enter the number of calories in your food: ")
> >if cal <=0:
> >print "Error. The number of calories must be positive."
>
> >#Prompt for fat
> >fat = input("Please enter the number of fat
import urllib2
proxy_support = urllib2.ProxyHandler({'http' :
'username:[EMAIL PROTECTED]:port'})
opener=urllib2.build_opener(proxy_support)
urllib2.install_opener(opener)
print urllib2.urlopen('http://www.python.org').read()
Hi, the above works for me. The hardest part is getting the proxy handl
On Oct 16, 11:38 pm, Grant Edwards <[EMAIL PROTECTED]> wrote:
> On 2007-10-16, Robert Kern <[EMAIL PROTECTED]> wrote:
> > I use GMane to read and post to this list because I like my lists to act
> > like
> > USENET.
> > http://gmane.org
>
> Since "this list" is just mirroring a Usenet news group,
Hi everyone,
I have been battling to make my code work with a HTTPS proxy, current
my code uses urllib2 to to most things and works well, except that
urllib2 doesn't handle HTTPS proxies.
Urlgrabber (http://linux.duke.edu/projects/urlgrabber/help/
urlgrabber.grabber.html) looks very promising exc
En Tue, 16 Oct 2007 10:16:50 -0300, Alexandre Badez
<[EMAIL PROTECTED]> escribió:
> I would like when I do something like to create a __init__ package's
> (here calle my_package) file witch make an action when we try to
> import something in this package...
>
> Quiet like __getattribute__ work f
This one is really small and simple (one small file):
http://davidbau.com/archives/2007/02/18/python_templates.html
"allen.fowler" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello,
>
> Can anyone recommend a simple python template engine for generating
> HTML that relies only
On 2007-10-16, Robert Kern <[EMAIL PROTECTED]> wrote:
> It's not universal. Many people consider it harmful. Google "reply-to
> considered
> harmful" for a variety of opinions, for and against.
>
> I use GMane to read and post to this list because I like my lists to act like
> USENET.
>
> http:
On 2007-10-17, Byung-Hee HWANG <[EMAIL PROTECTED]> wrote:
> Just click "Ctrl-L", then you can reply to lists directly if you use
> good mailer like mutt or thunderbird or evolution ;;
Thunderbird only if it has the list-reply patch, has either enigmail or
mhengy installed and has the reply-to
I have posted a new version of Gluon and some slides. I am hoping to
have a draft manual soon.
I believe I have fixed all of the issues that have been addressed
but, if not, please let me know.
Massimo
Did you try gluon? http://mdp.cti.depaul.edu/examples
On Oct 13, 2007, at 12:17 AM, Kay Sch
Hello:
Recently I started an open source project "cutils" on the
sourceforge:
https://sourceforge.net/projects/crablfs/
The document can be found at:
http://crablfs.sourceforge.net/#ru_data_man
This project's mirrord/fs_mirror is a near realtime file system
mirroring application across 2 or more
En Tue, 16 Oct 2007 17:50:06 -0300, <[EMAIL PROTECTED]> escribió:
> On Oct 16, 3:46 pm, Johny <[EMAIL PROTECTED]> wrote:
>> Now I need to find out which of Programs imports a particular module
>> - module timesocket.py
>> Is that possible without opening each program?
>
> It is with grep on *nix
On Oct 17, 10:56 am, Mark Shroyer <[EMAIL PROTECTED]> wrote:
> On 2007-10-16, Diez B. Roggisch <[EMAIL PROTECTED]> wrote:
> > The module decimal. But in the end, you might not be able to recreate
> > the same values as excel, due to the unknown intricacies of excel.
>
> But it can be done! All it
"J. Cliff Dyer" <[EMAIL PROTECTED]> writes:
> With thunderbird, I do "reply all," which has the ugly side effect
> that the poster of the message I'm responding to gets 2 copies,
> unless I remember to delete one of them.
Though glacially slow (originally requested in 2000), the "reply to
list" f
On Tue, 2007-10-16 at 23:45 +0200, stef mientki wrote:
> hello,
>
> I'm always have great difficulties, replying to this beautiful and
> helpful list.
>
> When I hit the reply button,
> the message is sent personally to the sender and not to the list.
> I've subscribed to dozen's of lists,
> and
[EMAIL PROTECTED] wrote:
> Does anyone know of an approximation to raising a negative base to a
> fractional exponent? For example, (-3)^-4.1 since this cannot be
> computed without using imaginary numbers. Any help is appreciated.
As others have said, you can use Python's complex numbers (jus
QOTW: "Aaaugh! Don't use __slots__!" - Aahz
"I will use public attributes (with access customizable with properties)
and remember that in Python I can do everything :)." - Artur Siekielski
Don't use __slots__ to create struct-like objects:
http://groups.google.com/group/co
Dick Crepeau wrote:
> It seems to me the original question was how can I reply to a posted
> message.
>
> I'm new here and see that while there are replies to several messages,
> many times, like with this note, the issue is brought up as if it is new.
>
> I don't know how to do a reply, can some
Dick Crepeau <[EMAIL PROTECTED]> writes:
> It seems to me the original question was how can I reply to a posted
> message.
By choosing whether you want to "reply to the author", or "reply to
the list". (Every message from the mailing list automatically provides
the correct infromation to make bot
It seems to me the original question was how can I reply to a posted
message.
I'm new here and see that while there are replies to several messages,
many times, like with this note, the issue is brought up as if it is new.
I don't know how to do a reply, can someone tell me how? This note was
On 10/16/07, stef mientki <[EMAIL PROTECTED]> wrote:
> I'm always have great difficulties, replying to this beautiful and
> helpful list.
>
> When I hit the reply button,
> the message is sent personally to the sender and not to the list.
> I've subscribed to dozen's of lists,
> and all have an "r
On Oct 17, 8:00 am, mannewalis <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have the following setup...
>
> Apache 2.2.3, Python 2.5 and mod_python 3.3.1
>
> I have configured apache to call a python script when fetching .py
> resources...so far so good... I did the hello world script in the
> mod_python
On Oct 16, 2:48 pm, [EMAIL PROTECTED] wrote:
> Does anyone know of an approximation to raising a negative base to a
> fractional exponent? For example, (-3)^-4.1 since this cannot be
> computed without using imaginary numbers. Any help is appreciated.
Use complex numbers. They are part of pyth
I would like to control the y axis of a plot. The following code does
exactly what I want it to! On my linux computer it sets the y axis
limits to 18.0 minimum, 58.0 maximum, plots some points on y=x, provides
ticks at 20,30,40,50 and horizontal tick lines that intersect the
plotted points.
> I am new to Python and find it very interesting
welcome to the wonderful world of Python :)
> so I decided to try to port a big project from matlab to
> python. To prove the value of the python, I need to find an
> python way to do it.
A good exercise for learning Python.
> The input file c
Robert Kern <[EMAIL PROTECTED]> writes:
> It's not universal. Many people consider it harmful. Google
> "reply-to considered harmful" for a variety of opinions, for and
> against.
The arguments in support of munging have been defeated, since
2001. Munging the "Reply-To" field is in violation of s
stef mientki <[EMAIL PROTECTED]> writes:
> I'm always have great difficulties, replying to this beautiful and
> helpful list.
>
> When I hit the reply button,
> the message is sent personally to the sender and not to the list.
Yes. That's what the "reply" function is for: sending a reply to the
Hi, Tim,
Thanks for your help. For some reason, I only get your reply from the forum.
This is not a homework problem since I have left the school long time ago. I am
new to Python and find it very interesting so I decided to try to port a big
project from matlab to python. To prove the value
On Oct 16, 7:35 am, Laurent Pointal <[EMAIL PROTECTED]> >
> How does it compare to the scalar module ?
> (seehttp://russp.us/scalar.htm)
or the Unum module (http://home.scarlet.be/be052320/Unum.html) ?
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano a écrit :
(snip)
> def myreversed(sequence):
> if isinstance(sequence, basestring):
> return type(sequence)().join(reversed(sequence))
> else:
> return type(sequence)(reversed(sequence))
>
> (in fact, that's so simple I wonder why the built-in reversed() doe
On Oct 17, 8:03 am, Steve Holden <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > Does anyone know of an approximation to raising a negative base to a
> > fractional exponent? For example, (-3)^-4.1 since this cannot be
> > computed without using imaginary numbers. Any help is apprecia
Steve Holden wrote:
> [EMAIL PROTECTED] wrote:
>> Does anyone know of an approximation to raising a negative base to a
>> fractional exponent? For example, (-3)^-4.1 since this cannot be
>> computed without using imaginary numbers. Any help is appreciated.
>>
> A couple of questions.
>
> 1. Ho
Bruno Desthuilliers a écrit :
> answering to Dmitri O.Kondratiev
(snip)
>
> def reverse(xs):
> if xs:
> return xs
> else:
> return (reverse (xs[1:])) + [xs[0]]
I meant:
def reverse(xs):
if not xs:
(etc...)
of course...
--
http://mail.python.org/mailman/listinfo/python-list
stef mientki wrote:
> hello,
>
> I'm always have great difficulties, replying to this beautiful and
> helpful list.
>
> When I hit the reply button,
> the message is sent personally to the sender and not to the list.
> I've subscribed to dozen's of lists,
> and all have an "reply-to" address, th
answering to Dmitri O.Kondratiev
> On Sunday 14 October 2007 5:06:19 pm Dmitri O.Kondratiev wrote:
>
>>The function I wrote (below) reverses lists all right:
>>
>>def reverse(xs):
>>if xs == []:
>>return []
>>else:
>>return (reverse (xs[1:])) + [xs[0]]
>>
>reverse ([1,2
Hi,
I have the following setup...
Apache 2.2.3, Python 2.5 and mod_python 3.3.1
I have configured apache to call a python script when fetching .py
resources...so far so good... I did the hello world script in the
mod_python docs and it works great.
Now when I want to add some meat and potatoes
[EMAIL PROTECTED] wrote:
> Does anyone know of an approximation to raising a negative base to a
> fractional exponent? For example, (-3)^-4.1 since this cannot be
> computed without using imaginary numbers. Any help is appreciated.
>
A couple of questions.
1. How do you approximate a complex
Does anyone know of an approximation to raising a negative base to a
fractional exponent? For example, (-3)^-4.1 since this cannot be
computed without using imaginary numbers. Any help is appreciated.
--
http://mail.python.org/mailman/listinfo/python-list
hello,
I'm always have great difficulties, replying to this beautiful and
helpful list.
When I hit the reply button,
the message is sent personally to the sender and not to the list.
I've subscribed to dozen's of lists,
and all have an "reply-to" address, that points to list and not to the
indi
Robert Kern wrote:
> stef mientki wrote:
>
>> I want to view my own namespace,
>> i.e. to see the modules namespace in the module itself,
>> is that possible ?
>>
>> I can use
>>dir()
>> but I read dir is just a convenience function,
>> and besides I want key/value pairs.
>>
>
> vars()
It seems that I have problem with the python-list, so I resend this.
Thanks
Frank
From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: how to convert string to
number?Date: Tue, 16 Oct 2007 18:15:06 +
Hi, I have struggling to efficiently convert a string list to number. Here is
my problem. I
Paul Hankin a écrit :
> On Oct 12, 11:58 am, Florian Lindner <[EMAIL PROTECTED]> wrote:
>
>>Hello,
>>can I determine somehow if the iteration on a list of values is the last
>>iteration?
>>
>>Example:
>>
>>for i in [1, 2, 3]:
>> if last_iteration:
>> print i*i
>> else:
>> print i
>
Hi experts,
I am currently embedding the Python interpreter 2.3.4 in a managed C++
application (I currently use an unmanaged dll which is linked to
Python23.lib). Forget about Ironpython - no binary compatibility for
extension modules, forget about a decent C API, by the way...
After a lot of work
On Oct 16, 6:52 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> On Tue, 16 Oct 2007 06:47:06 -0700, gamename wrote:
> > I've just started using ctypes and so far, its great. But I'm running
> > to some problems with complex datatypes. I'm not sure how to wrap
> > something like this:
>
Hi,
I've just started using ctypes and so far, its great. But I'm running
to some problems with complex datatypes. I'm not sure how to wrap
something like this:
/* This defines the Handle type in a header file. I don't think
this needs wrapping, its just to show the handle definition for
co
On Oct 16, 3:43 pm, stef mientki <[EMAIL PROTECTED]> wrote:
> I want to view my own namespace,
> i.e. to see the modules namespace in the module itself,
> is that possible ?
>
> I can use
>dir()
> but I read dir is just a convenience function,
> and besides I want key/value pairs.
>
> thanks,
>
On Oct 16, 3:46 pm, Johny <[EMAIL PROTECTED]> wrote:
> My Main program imports several other smaller programs.
> for example
> Main.py
> imports
> Program1.py
> Program2.py
> ...
> Program50.py
>
> Now I need to find out which of Programs imports a particular module
> - module timesocket.py
> Is t
stef mientki wrote:
> I want to view my own namespace,
> i.e. to see the modules namespace in the module itself,
> is that possible ?
>
> I can use
>dir()
> but I read dir is just a convenience function,
> and besides I want key/value pairs.
vars() will give you a dictionary copy of the local
My Main program imports several other smaller programs.
for example
Main.py
imports
Program1.py
Program2.py
...
Program50.py
Now I need to find out which of Programs imports a particular module
- module timesocket.py
Is that possible without opening each program?
Thanks
B.
--
http://mail.python
I want to view my own namespace,
i.e. to see the modules namespace in the module itself,
is that possible ?
I can use
dir()
but I read dir is just a convenience function,
and besides I want key/value pairs.
thanks,
Stef Mientki
--
http://mail.python.org/mailman/listinfo/python-list
Peter Bengtsson <[EMAIL PROTECTED]> writes:
> On Oct 15, 4:09 pm, sophie_newbie <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> I'm wondering how do you set a 'timeout' or expiry date/time for a
>> cookie set using a python cgi script. I can set a cookie ok but I
>> dunno how to set the expiry time so it
Hello,
I am trying to get the output from the win32 platform command
OutputDebugString. I have used the following C++ code as a
guideline:
http://groups.google.com/group/microsoft.public.vc.utilities/browse_frm/thread/1434418cb968d053/1a3c957675242c7e?lnk=st&q=DBWIN_BUFFER&rnum=3#1a3c957675242c7
The think that got you such a fast help from the anglo is that
you are a corporatist bastard from
sas.com
On Oct 16, 12:59 pm, Tim Arnold <[EMAIL PROTECTED]> wrote:
> On Oct 16, 3:53 pm, [EMAIL PROTECTED] (Robin Fairbairns) wrote:
>
>
>
> > "Tim Arnold" <[EMAIL PROTECTED]> writes:
>
> > >I know
TG wrote:
> Okay, another one which I don't have answer for.
>
> it is the reverse case, sort of :
>
>> phi.shape (x,y)
>> d.shape (a,b)
>
> I want to return m :
>> m.shape = (x,y,a,b)
> with
> m[x,y] = d * phi[x,y]
>
> currently, my code is :
>> m = empty(phi.shape + d.shape)
>> m[:,:] = d
>
> These days there seems to be more coverage of different needs. For
> instance, Mako looks like something I might have used if it had been
> around back then.
>
It's probably the same to me.
And many times, the simple python templating system %(var)s is good
enough...
--
http://mail.python.org
On Oct 15, 8:02 pm, 7stud <[EMAIL PROTECTED]> wrote:
> t = timeit.Timer("test3()", "from __main__ import test3, key, data")
> print t.timeit()
> t = timeit.Timer("test1()", "from __main__ import test1, data")
> print t.timeit()
>
> --output:---
> 42.791079998
> 19.0128788948
>
> I thought groupby()
Paul Miller schrieb:
> I'm looking at doing some currency calculations in some Python code
> integrated with a C++ application. I want to be able to come up with the
> same values I get in an Excel spreadsheet.
>
> I've been poking around for a couple of days and haven't come across a
> definit
Just send the currency to me. I'll deal with it.
--
Grant Edwards grante Yow! I'm into SOFTWARE!
at
visi.com
--
http://mail.python.org/mailman/listinfo/python-list
I'm looking at doing some currency calculations in some Python code
integrated with a C++ application. I want to be able to come up with the
same values I get in an Excel spreadsheet.
I've been poking around for a couple of days and haven't come across a
definitive method for dealing with curre
On Tue, 16 Oct 2007 11:52:22 -0700, fabdeb wrote:
> the first: what is the differences between a function and a classe?
A class bundles data and functions into one object.
> In which case i should use a function ?
> In which case i should use a class ?
If you have several functions that operate
On Oct 16, 3:00 am, Lars Johansen <[EMAIL PROTECTED]> wrote:
> HI are there any recommended books for an sysadmin who has been mostly
> writing shell scripts, but want to move up to create more complex
> programs.
See also
http://www.ibm.com/developerworks/aix/library/au-python/
http://www.samag.
On Oct 16, 1:52 pm, fabdeb <[EMAIL PROTECTED]> wrote:
> Hi every one,
> I m a sysadmin who want to know how to use python.
> I dont know anything about oriented object programation, i only know
> bash and a little perl.
> I have some simple questions about python.
>
> the first: what is the differe
Adrian Cherry a écrit :
> "allen.fowler" <[EMAIL PROTECTED]> wrote in
> news:[EMAIL PROTECTED]:
>
>
>>Hello,
>>
>>Can anyone recommend a simple python template engine for
>>generating HTML that relies only on the Pyhon Core modules?
>>
>>No need for caching, template compilation, etc.
>>
>>Speed
fabdeb a écrit :
> Hi every one,
> I m a sysadmin who want to know how to use python.
> I dont know anything about oriented object programation, i only know
> bash and a little perl.
> I have some simple questions about python.
>
> the first: what is the differences between a function and a classe
Shawn Minisall wrote:
> I just learned about while statements and get why you place them around
> inputs for validation, but I'm a little lost on exactly where to place
> it with what condition in this program where the number of fat grams
> exceeds the total number of calories so that it loops
Martin v. Löwis wrote:
>
> Can you please clarify what you mean by "stock Python installation"?
> I just built Python 2.5.1 with Tk 8.5 on Debian unstable, and it works
> fine.
OK, that's good to know. I'm using the precompiled Mac OS X build of
2.5.1 from python.org.
>
> It's still not clear.
Sami Vaisanen <[EMAIL PROTECTED]> wrote:
> Hello group,
>
> I'm writing a C++ based application that embeds the python engine. Now I
> have a problem regarding exception/error information. Is there a way to
> get the exception message and possibly the traceback into a string for
> example? I've
TG wrote:
> Hi there.
>
> I want to do some intensive computations with numpy, and I'm
> struggling a bit to find my wayy.
The best place to ask numpy questions is on the numpy mailing list.
http://www.scipy.org/Mailing_Lists
> Here is the problem :
>
> m and d are two matrices :
>
Hi every one,
I m a sysadmin who want to know how to use python.
I dont know anything about oriented object programation, i only know
bash and a little perl.
I have some simple questions about python.
the first: what is the differences between a function and a classe?
In which case i should use a
danfolkes a écrit :
> Hey Everyone, I am trying to send repeated messages from a "Node" to a
> "Server". It works the first time I send the from the Node to Server,
> but after that it either errors, or does not do anything.
>
> I would love some help, here is the code:
Posting the trackbacks m
> I have struggling to efficiently convert a string list to
> number. Here is my problem. I have a file that contains lines
> such as:
>
> data_1 1 1 2 3.5
>
> After I read the data from the file by using readlines(), each
> line contains a string. I use the re moduel to split the line
> into ['d
> It's been a while, but when I've tried to run my Tkinter app against Tk
> 8.5 with a stock Python installation, I get an error message saying that
> Tk 8.4.x is required.
Can you please clarify what you mean by "stock Python installation"?
I just built Python 2.5.1 with Tk 8.5 on Debian unstabl
Thank you this answers my question. I wanted to make sure it was actually
designed this way.
Massimo
From: Tim Chase [EMAIL PROTECTED]
Sent: Tuesday, October 16, 2007 1:38 PM
To: DiPierro, Massimo
Cc: python-list@python.org; Berthiaume, Andre
Subject: Re:
Sami Vaisanen schrieb:
> Hello group,
>
> I'm writing a C++ based application that embeds the python engine. Now I
> have a problem regarding exception/error information. Is there a way to
> get the exception message and possibly the traceback into a string for
> example? I've been eyeballing the
> Let me show you a very bad consequence of this...
>
> a=open('file1.txt','rb').read()
> b=re.sub('x',a,'x')
> open('file2.txt','wb').write(b)
>
> Now if file1.txt contains a \n or \" then file2.txt is not the
> same as file1.txt while it should be.
That's functioning as designed. If you want
> Even stranger
>
> >>> re.sub('a', '\\n','bab')
> 'b\nb'
> >>> print re.sub('a', '\\n','bab')
> b
> b
That's to be expected. When not using a print statement, the raw
evaluation prints the representation of the object. In this
case, the representation is 'b\nb'. When you use the print
st
In article <[EMAIL PROTECTED]>,
Kevin Walzer <[EMAIL PROTECTED]> wrote:
> Martin v. Löwis wrote:
> >> I'd like to experiment with Tk 8.5 (now in beta) in my Python
> >> application, but Python 2.5 requires Tk 8.4.x.
> >
> > Why do you say that? AFAIK, that's not the case.
>
> It's been a while,
Let me show you a very bad consequence of this...
a=open('file1.txt','rb').read()
b=re.sub('x',a,'x')
open('file2.txt','wb').write(b)
Now if file1.txt contains a \n or \" then file2.txt is not the same as
file1.txt while it should be.
Massimo
From: Tim C
It is the fisrt line that is wrong, the second follows from the first, I agree.
From: Tim Chase [EMAIL PROTECTED]
Sent: Tuesday, October 16, 2007 1:20 PM
To: DiPierro, Massimo
Cc: python-list@python.org; Berthiaume, Andre
Subject: Re: re.sub
> Even strange
Hi,
I have struggling to efficiently convert a string list to number. Here is my
problem. I have a file that contains lines such as:
data_1 1 1 2 3.5
After I read the data from the file by using readlines(), each line contains a
string. I use the re moduel to split the line into ['data_1',
That is not the problem. The problem is that
re.sub('a','\\n','bab')
cannot be the same as
re.sub('a','\n','bab')
This is evaluating the string to be substituted before the substitution.
Massimo
From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Ch
On Oct 16, 4:00 am, Lars Johansen <[EMAIL PROTECTED]> wrote:
> HI are there any recommended books for an sysadmin who has been mostly
> writing shell scripts, but want to move up to create more complex
> programs.
I believe there's a "Python for System Administration" book in the
works, an equival
On 10/16/07, Massimo Di Pierro <[EMAIL PROTECTED]> wrote:
> Even stranger
>
> >>> re.sub('a', '\\n','bab')
> 'b\nb'
> >>> print re.sub('a', '\\n','bab')
> b
> b
>
You called print, so instead of getting an escaped string literal, the
string is being printed to your terminal, which is printing th
Even stranger
>>> re.sub('a', '\\n','bab')
'b\nb'
>>> print re.sub('a', '\\n','bab')
b
b
Massimo
On Oct 16, 2007, at 1:54 AM, DiPierro, Massimo wrote:
> Shouldn't this
>
print re.sub('a','\\n','bab')
> b
> b
>
> output
>
> b\nb
>
> instead?
>
> Massimo
>
> On Oct 16, 2007, at 1:34 AM, G
[EMAIL PROTECTED] wrote:
> I'm using Python + Tkinter for a small gui . . . there are LOTS of
> places inside Tkinter with code like this:
>
> self.tk.call('tkwait', 'variable', name)
>
> (this particular one is from the IntVar class).
>
> I've searched the Tkinter docs with no success;
i have never used proxies, in college it works fine dont know abt ur
wipro settings.
anyway try this http://docs.python.org/lib/urllib2-examples.html
then l8tr try this http://docs.python.org/lib/module-urllib2.html
--
http://mail.python.org/mailman/listinfo/python-list
> Just pack the RGB values into an `int` by shifting and or-ing. Untested:
>
> red, green, blue = img.getpixel(x, y)
> pixel_as_int = red << 16 | green << 8 | blue
>
> Ciao,
> Marc 'BlackJack' Rintsch
thanx Marc
will try that
dn
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 16, 3:00 am, Lars Johansen <[EMAIL PROTECTED]> wrote:
> HI are there any recommended books for an sysadmin who has been mostly
> writing shell scripts, but want to move up to create more complex
> programs.
The Python Cookbook would probably be another good resource. While I
don't like the
danfolkes a écrit :
You already posted the same question here one hour and a half ago.
Please avoid.
--
http://mail.python.org/mailman/listinfo/python-list
On Mon Oct 15 14:24:09 CEST 2007, luca72 wrote:
> Hello i have made anly one test like this:
>
> from time import sleep
> barra = QtGui.QProgressBar()
> barra.setMinimum(0)
> barra.setMaximum(10)
> for a in range(10):
>sleep(1)
>barra.setValue(a)
>app.processEvents()
I'm using Python + Tkinter for a small gui . . . there are LOTS of
places inside Tkinter with code like this:
self.tk.call('tkwait', 'variable', name)
(this particular one is from the IntVar class).
I've searched the Tkinter docs with no success; can someone point me
at the documentation
On Tue, 16 Oct 2007 15:55:31 +, danfolkes wrote:
> Why does the message send only once?
>
> The node sends once, then fails after that.
Because the `Server` just seems to handle the first connection and is done
then. Insert some ``print``\s to see what's going on.
Ciao,
Marc 'Black
danfolkes wrote:
> Why does the message send only once?
Because your server is designed to only accept one connection, wait
forever except there is an exception, and quit thereafter.
> def Server(address):
> [...]
> s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
> s.bind((HOST
Hello group,
I'm writing a C++ based application that embeds the python engine. Now I
have a problem regarding exception/error information. Is there a way to
get the exception message and possibly the traceback into a string for
example? I've been eyeballing the PyErr_ module and it seems fairly
On Oct 15, 6:57 pm, John Machin <[EMAIL PROTECTED]> wrote:
> To "asciify" such text, you need to build a look-up table that suits
> your purpose. unicodedata.decomposition() is (accidentally) useful in
> providing *some* of the entries for such a table.
This is the only approach that can actually
1 - 100 of 182 matches
Mail list logo