On 11 Jan 2007 21:41:26 -0800, Adam Atlas <[EMAIL PROTECTED]> wrote:
> Thanks for the responses; you're right, and I have now posted the
> examples online. I just released version 0.6.0, by the way, which has
> several worthwhile improvements and much better documentation. It also
> includes an exa
On Thu, 2007-01-25 at 15:58 -0300, Sebastian Bassi wrote:
> Hello,
>
> I found http://www2.sfk.nl/svg as a Python module for writing SVG.
> Last update was in 2004 and I am not sure if there is something
> better.
> Any recommendation for generating SVG graphics?
> Best,
> SB.
Cairo ( http://cair
Thanks for your answers, Martin, Wang and Colin!
siggi
"siggi" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
> Hi all,
>
> installing a package with 'setup.py' is easy. But how do I uninstall the
> package, once I want to get rid of it again?
>
> Thanks,
>
> siggi
>
>
>
--
I only want to remove the comments which begin with "//".
I did like this, but it doesn't work.
r=re.compile(ur"//[^\r\n]+$", re.UNICODE|re.VERBOSE)
f=file.open("mycpp.cpp","r")
f=unicode(f,"utf8")
r.sub(ur"",f)
Will somebody show me the right way?
Thanks~~
--
http://mail.python.org/mailman/lis
Alan Isaac a écrit :
> I'm fairly new to Python and I've lately been running a script at
> the interpreter while working on it. Sometimes I only want to
> run the first quarter or half etc. What is the "good" way to do this?
If the point is to debug your script, then import pdb; pdb.set_trace()
Tina I schrieb:
> Another noob question:
> I have written my first linux application that might actually be of
> interest to others. Just for fun I also wrote an install script that put
> the files in the common directories for my distro (Debian). That is in
> /usr/local/. (This particular progr
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] writes:
|>
|> What makes you think Paddy indicated he wouldn't try to solve the problem?
|> Here's what he wrote:
|>
|> What I'm proposing is that if, for example, a process stops running
|> three times in a year at roughly three to four
> * comp.lang.python is not the place to file bug reports
Agreed
> * more detail is needed that what's been given so far
Agreed. I will investigate further when I get a chance and determine if
it's a problem on my end.
Thanks a lot!
--
http://mail.python.org/mailman/listinfo/python-list
Frank Potter wrote:
> I only want to remove the comments which begin with "//".
> I did like this, but it doesn't work.
>
> r=re.compile(ur"//[^\r\n]+$", re.UNICODE|re.VERBOSE)
> f=file.open("mycpp.cpp","r")
> f=unicode(f,"utf8")
> r.sub(ur"",f)
>
> Will somebody show me the right way?
> Thanks~~
>
On 26 Jan, 09:05, [EMAIL PROTECTED] (Nick Maclaren) wrote:
> In article <[EMAIL PROTECTED]>,[EMAIL PROTECTED] writes:|>
> |> What makes you think Paddy indicated he wouldn't try to solve the problem?
> |> Here's what he wrote:
> |>
> |> What I'm proposing is that if, for example, a process st
Diez B. Roggisch wrote:
> These days, it's setuptools. Google for it. It will let you distribute
> your application in a convenient way as so-called EGG (basically a
> ZIP-file), additionally you will get support for installing scripts in
> /usr/bin or wherever you like, and you have versioning
Python 2.4.4
mod_python 3.2.10 + Apache 2.0
def index( req, **params ):
from xml.dom.minidom import parseString
doc = parseString( "whatever" )
=> blank screen, _no_any_exception_; Apache error_log:
[Fri Jan 26 10:18:48 2007] [notice] child pid 17596 exit signal
Segmentation fault (11)
On Jan 26, 5:08 pm, Gary Herron <[EMAIL PROTECTED]> wrote:
> Frank Potter wrote:
> > I only want to remove the comments which begin with "//".
> > I did like this, but it doesn't work.
>
> > r=re.compile(ur"//[^\r\n]+$", re.UNICODE|re.VERBOSE)
> > f=file.open("mycpp.cpp","r")
> > f=unicode(f,"utf8
At Friday 26/1/2007 06:54, Frank Potter wrote:
[CODE]
import re
f=open("show_btchina.user.js","r").read()
f=unicode(f,"utf8")
r=re.compile(ur"//[^\r\n]+$", re.UNICODE|re.VERBOSE)
f_new=r.sub(ur"",f)
open("modified.js","w").write(f_new.encode("utf8"))
[/CODE]
And, the problem is, it seems tha
On Jan 26, 10:41 am, [EMAIL PROTECTED] wrote:
> Python 2.4.4
> mod_python 3.2.10 + Apache 2.0
>
> def index( req, **params ):
> from xml.dom.minidom import parseString
> doc = parseString( "whatever" )
>
> => blank screen, _no_any_exception_; Apache error_log:
> [Fri Jan 26 10:18:48 200
Thank you!
On Jan 26, 6:34 pm, Gabriel Genellina <[EMAIL PROTECTED]> wrote:
> At Friday 26/1/2007 06:54, Frank Potter wrote:
>
> >[CODE]
> >import re
>
> >f=open("show_btchina.user.js","r").read()
> >f=unicode(f,"utf8")
>
> >r=re.compile(ur"//[^\r\n]+$", re.UNICODE|re.VERBOSE)
> >f_new=r.sub(ur"",
Hi, when i mount a share with python...
os.system ("mount -t smbfs -o username=nobody ...")
the problem is that I'll to be root.
Have a comand to send a root password...?
I've tried
os.system ("su")
os.system ("the password")
but it doesn't works.
--
http://mail.python.org/mailman/listinfo/py
Marcpp wrote:
> Hi, when i mount a share with python...
>
> os.system ("mount -t smbfs -o username=nobody ...")
>
> the problem is that I'll to be root.
> Have a comand to send a root password...?
> I've tried
>
> os.system ("su")
> os.system ("the password")
>
> but it doesn't works.
You can
On Jan 26, 2007, at 6:40 AM, Marcpp wrote:
> Hi, when i mount a share with python...
>
> os.system ("mount -t smbfs -o username=nobody ...")
>
> the problem is that I'll to be root.
> Have a comand to send a root password...?
> I've tried
>
> os.system ("su")
> os.system ("the password")
>
> but
Alan Isaac wrote:
> I'm fairly new to Python and I've lately been running a script at
> the interpreter while working on it. Sometimes I only want to
> run the first quarter or half etc. What is the "good" way to do this?
>
> Possible ugly hacks include:
>
> - stick an undefined name at the des
Hello Shelton,
> I am learning Python, and have never worked with HTML. However, I would
> like to write a simple script to audit my 100+ Netware servers via their web
> portal.
Always use the right tool, BeautilfulSoup
(http://www.crummy.com/software/BeautifulSoup/) is best for web
scraping (I
Colin J. Williams schrieb:
> With Windows, a few packages, eg. PythonWin, also modify the registry.
> numpy, the elaboration of numarray/numeric, and PythonWin have
> RemoveXXX.exe in C:\Python25.
>
> I don't know whether this is the standard approach. There doesn't seem
> to be a reference to
Does anyone have any experience having python deal with sleep mode? I'd
love to run something that would hear a sleep event coming and pickle
some data before sleep, then after coming out of sleep, unpickle...
Any thoughts?
--
http://mail.python.org/mailman/listinfo/python-list
> Does anyone have any experience having python deal with sleep mode? I'd
> love to run something that would hear a sleep event coming and pickle
> some data before sleep, then after coming out of sleep, unpickle...
It should, in theory, be possibly by trapping the WMI
Win32_PowerManagementEvent
Matthew Woodcraft a écrit :
> Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
>> Matthew Woodcraft a écrit :
>
>>> Adding the validation code can make your code more readable, in that
>>> it can be clearer to the readers what kind of values are being
>>> handled.
>
>> This is better expressed in
And using the codecs module
[CODE]
import codecs
f = codecs.open("show_btchina.user.js","r","utf-8")
modf = codecs.open("modified.js","w","utf-8")
for line in f:
idx = line.find(u"//")
if idx==0:
continue
elif idx>0:
line = line[:idx]+u'\n'
modf.write(line)
m
Laurent Rahuel wrote:
> And using the codecs module
Why would you de/encode at all?
Peter
--
http://mail.python.org/mailman/listinfo/python-list
On 1/26/07, Bell, Kevin <[EMAIL PROTECTED]> wrote:
> Does anyone have any experience having python deal with sleep mode? I'd
> love to run something that would hear a sleep event coming and pickle
> some data before sleep, then after coming out of sleep, unpickle...
>
> Any thoughts?
>
The whole
i have a memory leak issue with extension function that im working on. it
reads data from a binary file into a stl vector then creates a new list to
pass back to the python interface. the function works the first 1021 times
but then gives a segmentation fault (core dumped). heres the business part
Hello List,
I need the amd64 and the x86 version of Python installed on one Windows
machine. Is there a way to do this? (I think I read about it somewhere, but now
I can't find it anymore)
Cheers,
Simon Hengel
Siemens AG
Medical Solutions
CO CHS CS 2
Mozartstr. 57
91052 Erlangen, Germany
Tel.:
Carl Banks wrote:
> Jan Theodore Galkowski wrote:
>>> We've not had
>>> an excellent dynamic OO language since Smalltalk, IMO.
>
> I would say that "excellence" in object oriented programming is not a
> strong design goal of Python. Python tries to support OOP well, but
> not to enhance OOP to th
Rich Shepard wrote:
> print '%2d $%11.2f $%10.2f $%9.2f $%9.2f' %(nper, pv, diff, ten, bonus)
>
> and I would like to have the output right justified in the specified field.
>>> "%7.2f..%5d" % (2.3, 78)
' 2.30.. 78'
>>> "%-7.2f..%-5d" % (2.3, 78)
'2.30 ..78 '
Regards,
--
. Fa
Gert Cuykens a écrit :
> import MySQLdb
>
> class Db(object):
>
>def __enter__(self):
>pass
>
>def __init__(self,server,user,password,database):
>self._db=MySQLdb.connect(server , user , password , database)
>self._db.autocommit(True)
>self.cursor=self._db
Hello,
I've looked at the swig example in the back of "programming python"
(Lutz). Using gcc to compile a swig wrapper I'm getting lots of
errors. Instead of using the cygwin python, I'm trying to point swig
to my activepython installation. I'm doing this because my modules are
all win32 install
I did the same thing back before I knew about python and com.
I hope this example gets you on the right track.
It is just a simple script that does a dir and returns prints it out.
import os, sys
dCall = "dir"
resultFromCall = os.popen(dCall)
#get data back from the system call
mv = resultFromCal
questions? wrote:
> Are there similar function to sprintf in C?
Meaning to print in a buffer? It's not necessary...
Remember that all the ways that prints on files, actually does not need
to print into *actual* files, but they can print into file-like objects
(see StringIO, or mmap, for example
Good morning,
I store time series data in a SQL database. The results of a typical
query using pyodbc look like this.
DateClose
"2007-01-17" 22.57
Where Date is a datetime.date object and Close is a float.
I'd like to put this data in a NumPy array for processing, but am
unsure as t
Tim Roberts wrote:
> "Ben" <[EMAIL PROTECTED]> wrote:
>> Great - that worked.Thanks!
>> Is that a general method in linux you can always use to redirect
>> standard output to a file?
>
> Works in Windows, too.
For some value of "work" :)
regards
Steve
--
Steve Holden +44 150 684 7255 +
Hello.
I'm trying to display french characters (è -- that's e grave -- or à --
agrave) in python 2.5, with the ncurses wrapper that comes it, and I can't.
My locale is set correctly (fr_FR.iso885915), and my terminal (rxvt-unicode)
is able to display those chars.
What am I missing?
Thanks.
--
<[EMAIL PROTECTED]> escribió en el mensaje
news:[EMAIL PROTECTED]
> I'm just curious, what's the advantage of using itemgetter there
> compared to something simpler like this (untested!)?
None!
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
> class Obj(object):
>pass
>
> toto = tutu = tata = titi = Obj()
>
> What's an "instance name" ?
>
> --
> http://mail.python.org/mailman/listinfo/python-list
i would say __object__.__name__[3] == toto
And if your obj is a argument like
something(Obj())
i would say __object__.__name__[0] ==
BBands wrote:
> Good morning,
>
> I store time series data in a SQL database. The results of a typical
> query using pyodbc look like this.
>
> DateClose
> "2007-01-17" 22.57
>
> Where Date is a datetime.date object and Close is a float.
>
> I'd like to put this data in a NumPy arr
Bruno Desthuilliers wrote:
> abcd a écrit :
>
>>Well my example function was simply taking a string and printing, but
>>most of my cases would be expecting a list, dictionary or some other
>>custom object. Still propose not to validate the type of data being
>>passed in?
>
>
> Yes - unless you
Hi Paul!
Thanks for your suggestions on the default value (I didn't know you
could do that!!) and the use of the makeHTMLtags module!
Steve
On Jan 25, 8:07 pm, "Paul McGuire" <[EMAIL PROTECTED]> wrote:
> On Jan 25, 7:13 pm, "Steve" <[EMAIL PROTECTED]> wrote:
>
> > Hi All,
>
> > I've picked up th
Hi all,
Bit of a python newbie so need a little help with a CGI script I'm
trying to write. I've got it working fine as long as the fields of the
form are filled in correctly, however I need to be able to accept blank
entries. Therefore I want to convert any empty entries to an empty string.
For
On Jan 26, 3:54 am, "Frank Potter" <[EMAIL PROTECTED]> wrote:
>
> I'm very sorry because I was in a hurry when I post this thread.
> I'll post again my code here:
> [CODE]
> import re
>
> f=open("show_btchina.user.js","r").read()
> f=unicode(f,"utf8")
>
> r=re.compile(ur"//[^\r\n]+$", re.UNICODE|re
On Jan 26, 9:29 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> What you could do would be to convert the date-column into a timestamp,
> which is a int/long, and use that. Would that help?
Actually that might help, as all I need the date for is to index
values.
Thanks, I'll give it a spin.
I'm reading a file that has lines like
bcsn; 100; 1223
bcsn; 101; 1456
bcsn; 103
bcsn; 110; 4567
The problem is the line with only the one semi-colon.
Is there a fancy way to get Parts=Line.split(";") to make Parts always
have three items in it, or do I just have
Bob Greschke <[EMAIL PROTECTED]> wrote:
> Is there a fancy way to get Parts=Line.split(";") to make Parts always
> have three items in it, or do I just have to check the length of Parts
> and loop to add the required missing items (this one would just take
> Parts+=[""], but there are other typ
On 2007-01-26 10:54:02 -0700, "BBands" <[EMAIL PROTECTED]> said:
> On Jan 26, 9:29 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>
>> What you could do would be to convert the date-column into a timestamp,
>> which is a int/long, and use that. Would that help?
>
> Actually that might help, a
Christopher Mocock wrote:
> Bit of a python newbie so need a little help with a CGI script I'm
> trying to write. I've got it working fine as long as the fields of the
> form are filled in correctly, however I need to be able to accept blank
> entries. Therefore I want to convert any empty entries
Marcpp wrote:
> Hi, when i mount a share with python...
>
> os.system ("mount -t smbfs -o username=nobody ...")
>
> the problem is that I'll to be root.
> Have a comand to send a root password...?
> I've tried
>
> os.system ("su")
> os.system ("the password")
>
> but it doesn't works.
>
>
I do a
Hendrik van Rooyen wrote:
> "Carl J. Van Arsdall" <[EMAIL PROTECTED]> wrote:
>
>
>> [snip]
>>
>
> Are you 100% rock bottom gold plated guaranteed sure that there is
> not something else that is also critical that you just haven't realised is?
>
100%? No, definitely not. I know myself,
On 2007-01-26 11:13:56 -0700, Duncan Booth <[EMAIL PROTECTED]> said:
> Bob Greschke <[EMAIL PROTECTED]> wrote:
>
>> Is there a fancy way to get Parts=Line.split(";") to make Parts always
>> have three items in it, or do I just have to check the length of Parts
>> and loop to add the required mi
Marcpp wrote:
> Hi, when i mount a share with python...
>
> os.system ("mount -t smbfs -o username=nobody ...")
>
> the problem is that I'll to be root.
Consider modifying /etc/fstab.
> Have a comand to send a root password...?
> I've tried
>
> os.system ("su")
> os.system ("the password")
>
Steven D'Aprano <[EMAIL PROTECTED]> wrote:
> The less your function does, the more constrained it is, the less
> testing you have to do -- but the less useful it is, and the more work
> you put onto the users of your function. Instead of saying something
> like
> a = MyNumericClass(1)
> b = MyNum
Diez B. Roggisch wrote:
> I'm pretty sure you're out of luck here - even _if_ NumPy would handle
> arbitrary data-types (AFAIK it doesn't, but then I'm not a total expert
> there), it certainly won't be able to make its hi-performance functions
> work on them.
Yes, one can make numpy arrays with
Christopher Mocock wrote:
>
> Bit of a python newbie so need a little help with a CGI script I'm
> trying to write. I've got it working fine as long as the fields of the
> form are filled in correctly, however I need to be able to accept blank
> entries. Therefore I want to convert any empty entrie
There is a million dollar reward for ANY fascist bastard to disprove
this assertion by giving a consistent theory of ALL the major observed
effects on that day about the related events.
Dick faced Cheney sprayed his own lawyer with BB's.
See the video by Alex Jones on the Forensics, why the claim
On 2007-01-26, Fabrice DELENTE <[EMAIL PROTECTED]> wrote:
> I'm trying to display french characters (è -- that's e grave --
> or à -- agrave) in python 2.5, with the ncurses wrapper that
> comes it, and I can't. My locale is set correctly
> (fr_FR.iso885915), and my terminal (rxvt-unicode) is able
In article <[EMAIL PROTECTED]>,
"Miki" <[EMAIL PROTECTED]> wrote:
> Hello Shelton,
>
> > I am learning Python, and have never worked with HTML. However, I would
> > like to write a simple script to audit my 100+ Netware servers via their web
> > portal.
> Always use the right tool, Beautilful
> What have you tried?
I've tried
stdscr.addstr(0,0,"aéïoù")
or
stdscr.addstr(0,0,"leçon")
The ASCII chars show correctly, but the accented characters don't, so I see
'ao' or 'leon' on the screen.
The term in which I display is 8-bit-able, so the problem is either on
ncurses side, or on pytho
I have been playing around with this issue for a while and seen some
previous posting trying to address the problem but I haven't seen any
answers to the problem so I am reposting it in my quest for a solution.
I am using python 2.2.3, because I am using some dSpace software
(controldesk/autom
bearophile:
> I don't like your solution, this class was already slow enough. Don't
> use unbound methods with this class :-)
Sorry for raising this discussion after so much time. Another possibile
solution is to use the normal methods for the normal case, and replace
them only if key is present (
Company has switched to MS Team Foundation Server from VSS. Need a
programmers text editor that interfaces with TFS or SCC providers to
visually provide checkin/out status on project files. So far, in all of
the editors I have used, some support SCC interfaces, but do not show
the file status.
The
Hi,
Does anyone know of any Unicode encode/decode error handler that does a
better replace job than the default replace error handler?
For example I have an iso-8859-1 string that has an 'e' with an accent
(you know, the French 'e's). When I use s.encode('ascii', 'replace') the
'e' will be rep
Rares Vernica wrote:
> Is there an encode/decode error handler that can replace all the
> not-ascii letters from iso-8859-1 with their closest ascii letter?
A mapping, not an error handler, but it might do the job:
http://effbot.org/zone/unicode-convert.htm
Peter
--
http://mail.python.org/mail
Rares Vernica wrote:
> Is there an encode/decode error handler that can replace all the
> not-ascii letters from iso-8859-1 with their closest ascii letter?
No, but IBM's ICU library can transform one script to another in very flexible
and capable ways. One such configuration can do what you ask.
Is there a better way to make a call from C than
PyRun_SimpleString("import
foo_in_python\nfoo_in_python.bar(whatever)\n");
?
I already imported the foo_in_python using PyImport_ImportModule
and wonder why do I need to keep importing it every time I'm
calling a python function in that module.
I
On 2007-01-26, Fabrice DELENTE <[EMAIL PROTECTED]> wrote:
>> What have you tried?
>
> I've tried
>
> stdscr.addstr(0,0,"aéïoù")
>
> or
>
> stdscr.addstr(0,0,"leçon")
>
> The ASCII chars show correctly, but the accented characters
> don't, so I see 'ao' or 'leon' on the screen.
>
> The term in which
On Jan 26, 10:00 pm, "Ziga Seilnacht" <[EMAIL PROTECTED]>
wrote:
> On Jan 26, 10:41 am, [EMAIL PROTECTED] wrote:
>
> > Python 2.4.4
> >mod_python3.2.10 + Apache 2.0
>
> > def index( req, **params ):
> > from xml.dom.minidom import parseString
> > doc = parseString( "whatever" )
>
> > =>
Hi, I've been searching for a .resize()-like function to overload much
like can be done for the delete window protocol as follows:
toplevel.protocol("WM_DELETE_WINDOW", callback)
I realize that the pack manager usually handles all of the resize
stuff, but I've found an arrangement that the pack m
http://www.cbsnews.com/stories/2007/01/24/tech/main2395958.shtml
Military Develops Non-Lethal Ray Gun TO ENSLAVE THE SHEEPLE
New Weapon Makes Human Targets Feel Like They're About To Catch Fire
MOODY AIR FORCE BASE, Ga., Jan. 24, 2007
Airmen pretending to be rioters scatter after being zapped by
> What happens when you try this?
> stdscr.addstr(0,0, u"leçon".encode('iso8859-15'))
> I don't really expect it to work
And it doesn't...
As support for 8-bit (and even unicode) is important for my script, is there
any hope? Should I switch to slang instead of curses?
--
Fabrice DELENTE
--
On Jan 26, 10:18 am, Bob Greschke wrote:
> You're using the Python-MySQL module mysqldb, right?
Actually I using MySQL with pyodbc as the mysqldb Windows binaries for
Python 2.5 aren't out yet. :-(
> You can select the data from the database and have
> MySQL do the conversion with an SQL command
On Jan 26, 10:46 am, Robert Kern <[EMAIL PROTECTED]> wrote:
> Yes, one can make numpy arrays with "object" as its type. One can even extend
> the C-level parts as well. For example, we have an experimental package in the
> scipy sandbox for uniform time series that uses mx.DateTime.
>
> http://www
Yeah, listen to wise counsel of klein. As a member of conquered races
and still under occupation, namely Jewish, French, German, Japanese,
Korean ... dont mess in the crimes of the anglo-saxon yanks. You should
remember the beating you got from the Anglo-Saxon Yanks and just keep
quiet ... As for t
What did Dick Faced Cheney told Honorable Senator Patrick Leahy ? "Fuck
yourself".
So much for politeness and vulgarity at the top level.
Proof:
http://www.capitolhillblue.com/news2/2007/01/the_madness_of.html
On Jan 26, 2:53 pm, [EMAIL PROTECTED] wrote:
> Yeah, listen to wise counsel of klein. A
> The new 1.6 release of markup.py is available for download:
>
> http://sourceforge.net/project/showfiles.php?group_id=161108
>
> What is it?
>
> Markup.py is an intuitive, lightweight, easy-to-use, customizable and
> pythonic HTML/XML generator.
>
> Where is the documentation?
>
> http://markup.s
Hey Genius -- I'm probably further to the left and even more
vehemently opposed to the Bush/Cheney regime than you are. But could
you *please* take your unwelcome ranting elsewhere? You're not
winning any converts here. And you're alienating your ideological
allies to boot. Give it a rest,
Neil Cerutti <[EMAIL PROTECTED]> wrote:
> I don't really expect it to work, but if anything will, that is
> it. Curses supports only ASCII and a some special symbol codes
> defined by curses.
un - no. Curses supports whatever the flavor of curses you have does.
Often that's the 8-bit flavor of n
Yea, that guy sucks. Is there a list mod who can just ban this guy?
Sean Schertell wrote:
> Hey Genius -- I'm probably further to the left and even more
> vehemently opposed to the Bush/Cheney regime than you are. But could
> you *please* take your unwelcome ranting elsewhere? You're not
>
On Fri, 26 Jan 2007 17:25:37 +0100, Bruno Desthuilliers wrote:
>>def __del__(self):
>>try:
>>self.close()
>>finally:
>>pass
>>except:
>>pass
>
> The finally clause is useless here.
In principle, closing a file could raise an except
On Fri, 26 Jan 2007 18:28:32 +, Matthew Woodcraft wrote:
> I have a question for you. Consider this function:
>
> def f(n):
> """Return the largest natural power of 2 which does not exceed n."""
> if n < 1:
> raise ValueError
> i = 1
> while i <= n:
> j = i
>
It does the job.
Thanks a lot,
Ray
Peter Otten wrote:
> Rares Vernica wrote:
>
>> Is there an encode/decode error handler that can replace all the
>> not-ascii letters from iso-8859-1 with their closest ascii letter?
>
> A mapping, not an error handler, but it might do the job:
>
> http://effb
Hey spook,
you trying to be clever. All my contempt is directed at you. Your
attempts to drag in "Mr. Klien" as you typed it are rather failing and
contemptible. We posted a general warning that other "conquered races
or nationalities" who are never really treated equally by the
anglo-saxon race st
Here is the supporting evidence about these contemptible spook bastards
commiting heinous crimes using official positions. Just minutes ago hot
from the internet press:
http://www.nytimes.com/2007/01/26/washington/26nsa.html?ei=5094&en=9044950dc6386d92&hp=&ex=1169874000&partner=homepage&pagewanted
"Peter Otten" <[EMAIL PROTECTED]> escribió en el mensaje
news:[EMAIL PROTECTED]
> Laurent Rahuel wrote:
>
>> And using the codecs module
>
> Why would you de/encode at all?
I'd say the otherwise: why not? This is the recommended practice: decode
inputs as soon as possible, work on Unicode, encod
Hi
I am new to python and hence need some help
i have a process A that posts events as XML docs.
I need to create a listener to this process that subscribes to the
process A and as and when a XML doc is posted parse it.
I have creted an interface where if I specify the port number on which
the li
The PEP 3100:
http://www.python.org/dev/peps/pep-3100/
says:
Return iterators instead of lists where appropriate for atomic type
methods (e.g. dict.keys(), dict.values(), dict.items(), etc.); iter*
methods will be removed. Better: make keys(), etc. return views ala
Java collections???
...
To be re
Hi everyone,
I'm trying to make my apps more informative to the user, so I want to know
if its possible to get the output of the execution of a console command
while it's been generated, I mean, I want to get the output from
commands.getstatusoutput('CMD') while CMD it's been executed and not wai
"Raúl Gómez C." <[EMAIL PROTECTED]> escribió en el mensaje
news:[EMAIL PROTECTED]
> I'm trying to make my apps more informative to the user, so I want to know
> if its possible to get the output of the execution of a console command
> while it's been generated, I mean, I want to get the output fr
<[EMAIL PROTECTED]> escribió en el mensaje
news:[EMAIL PROTECTED]
> I am using python 2.2.3, because I am using some dSpace software
> (controldesk/automationdesk) that is based upon that version of python. I
> have some pre-compiled python modules that come with the dspace
> applications. I am p
<[EMAIL PROTECTED]> escribió en el mensaje
news:[EMAIL PROTECTED]
> Is there a better way to make a call from C than
>
> PyRun_SimpleString("import
> foo_in_python\nfoo_in_python.bar(whatever)\n");
>
> I already imported the foo_in_python using PyImport_ImportModule
> and wonder why do I need to
[EMAIL PROTECTED] wrote:
> Hi, I've been searching for a .resize()-like function to overload much
> like can be done for the delete window protocol as follows:
>
> toplevel.protocol("WM_DELETE_WINDOW", callback)
>
> I realize that the pack manager usually handles all of the resize
> stuff, but I'
"Steven D'Aprano" <[EMAIL PROTECTED]> escribió en el
mensaje
news:[EMAIL PROTECTED]
> On Fri, 26 Jan 2007 17:25:37 +0100, Bruno Desthuilliers wrote:
>>>def __del__(self):
>>>try:
>>>self.close()
>>>finally:
>>>pass
>>>except:
>>>pas
On Jan 22, 2:58 am, "Gert Cuykens" <[EMAIL PROTECTED]> wrote:
> http://www.faqts.com/knowledge_base/view.phtml/aid/16824
There is a factual mistake on that reference. The last sentence
> One final note: the single most common use for classmethod is probably
> in overriding __new__(). It is alway
Patch / Bug Summary
___
Patches : 421 open ( -2) / 3549 closed (+10) / 3970 total ( +8)
Bugs: 943 open (-17) / 6471 closed (+25) / 7414 total ( +8)
RFE : 260 open ( +2) / 250 closed ( +1) / 510 total ( +3)
New / Reopened Patches
__
rlcomplet
hi
can someone explain strip() for these :
[code]
>>> x='www.example.com'
>>> x.strip('cmowz.')
'example'
[/code]
when i did this:
[code]
>>> x = 'abcd,words.words'
>>> x.strip(',.')
'abcd,words.words'
[/code]
it does not strip off "," and "." .Why is this so?
thanks
--
http://mail.python.org/m
On Fri, 26 Jan 2007 20:27:29 -0800, Michele Simionato wrote:
> On Jan 22, 2:58 am, "Gert Cuykens" <[EMAIL PROTECTED]> wrote:
>
>> http://www.faqts.com/knowledge_base/view.phtml/aid/16824
>
> There is a factual mistake on that reference. The last sentence
>
>> One final note: the single most com
1 - 100 of 116 matches
Mail list logo