John Henry schrieb:
> If I have a list of say, 10 elements and I need to slice it into
> irregular size list, I would have to create a bunch of temporary
> variables and then regroup them afterwords, like:
>
> # Just for illustration. Alist can be any existing 10 element list
> a_list=("",)*10
> (
John Henry wrote:
>
> Further, if splitUp is a sub-class of string, then I can do:
>
> alist, blist, clist, dlist = "ABCDEFGHIJ".slice((1,1,3,None))
>
> Now, can I override the slice operator?
Maybe like:
alist, blist, clist, dlist = newStr("ABCDEFGHIJ")[1,1,3,None]
where newStr is a sub-class
Hi all,
When using Python 2.4.x on a Win32 box,
marshal.loads(marshal.dumps(1e6)) returns 1.0 instead of infinity
as it should and does under Python 2.5 (also running on Win32 ).
This problem was reported in another thread here by Peter Hansen
http://groups-beta.google.com/group/comp.lang.py
Thomas Ploch wrote:
>
> I had a little bit of fun while writing this:
>
> itemList = (a,b,c1,c2,c3,d1,d2,d3,d4,d5) and
> itemList2 = (a1,a2,a3,b,c,d1,d2,d3,d4,d5) the next time.
>
Huh? What's a,b,d5?
> def getSlices(aCount, bCount, cCount, dCount, items):
> a,b,c,d = (items[0:aCount],
On 2006-11-30, Pierre Rouleau <[EMAIL PROTECTED]> wrote:
> When using Python 2.4.x on a Win32 box,
> marshal.loads(marshal.dumps(1e6)) returns 1.0 instead of infinity
> as it should and does under Python 2.5 (also running on Win32 ).
>
> This problem was reported in another thread here by Pet
Pierre Rouleau schrieb:
> Is this considered an important enough bug to fix it in Python 2.4?
To the contrary - it's not considered a bug at all. Python didn't
make any promises about "unregular" floating point values, so things
like that just may happen.
The fix that made Python offer stronger g
John Henry schrieb:
> Thomas Ploch wrote:
>
>> I had a little bit of fun while writing this:
>>
>> itemList = (a,b,c1,c2,c3,d1,d2,d3,d4,d5) and
>> itemList2 = (a1,a2,a3,b,c,d1,d2,d3,d4,d5) the next time.
>>
>
> Huh? What's a,b,d5?
>
John Henry schrieb:
> > Thomas Ploch wrote:
> >
>> >> I
Thomas Ploch wrote:
>
> John Henry schrieb:
> > > Thomas Ploch wrote:
> > >
> >> >> I had a little bit of fun while writing this:
> >> >>
> >> >> itemList = (a,b,c1,c2,c3,d1,d2,d3,d4,d5) and
> >> >> itemList2 = (a1,a2,a3,b,c,d1,d2,d3,d4,d5) the next time.
> >> >>
> > >
> > > Huh? What's a,b,
Hello,
I want to extract some image links from different html pages, in
particular i want extract those image tags which height values are
greater than 200. Is there an elegant way in BeautifulSoup to do this?
--
http://mail.python.org/mailman/listinfo/python-list
Chuck Rhode schrieb:
> I couldn't find a routine to clean up, regularize, and reformat Python
> code, so I wrote one:
>
> http://www.lacusveris.com/PythonTidy/PythonTidy.python
>
> Now, I'm looking for beta-testers. Compensation is a bit on the low
> side. In fact it's limited to the satisfac
Is it possible to change the icon "Tk" of the windows popped up ?
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
> Boneh wrote:
> >> The module is not found on the system, althouhg I can use python2.4. i
> >> am using fedoralinux5
> >
> >
>
> I see lots of question marks, but I don't see a question. are you
> asking why a module you haven't installed
Boneh wrote:
> Is it possible to change the icon "Tk" of the windows popped up ?
I am using tkinter for widgets, thanks :-)
--
http://mail.python.org/mailman/listinfo/python-list
Klaus Alexander Seistrup wrote:
> Pekka Karjalainen wrote:
>
> > You can omit the call to math.sqrt if you test this instead.
> >
> > y*y > x
> >
> > in place of if y > maxfact: .
>
> Or use
>
> sqrt = lambda x: x ** .5
Test it:
$ python -m timeit -s "from math import sqrt" "sqrt(5.6)"
On 30 Nov 2006 12:43:45 -0800, PicURLPy <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I want to extract some image links from different html pages, in
> particular i want extract those image tags which height values are
> greater than 200. Is there an elegant way in BeautifulSoup to do this?
>
Most imag
In article <[EMAIL PROTECTED]>,
Thomas Heller <[EMAIL PROTECTED]> wrote:
>Aahz schrieb:
>>
>> Anyone else getting "Python-related" spam? So far, I've seen messages
>> "from" Barry Warsaw and Skip Montanaro (although of course header
>> analysis proves they didn't send it).
>
>I'm getting spam not
[Aahz]
>>> Anyone else getting "Python-related" spam? So far, I've seen messages
>>> "from" Barry Warsaw and Skip Montanaro (although of course header
>>> analysis proves they didn't send it).
[Thomas Heller]
>> I'm getting spam not only from Barry, but also from myself ;-) with
>> forged headers
Sorry if i did not make myself clear. let me try again.
1. I have a series of servers running windows server 2003.
2 on each server there is an application running that communicates
with remote devices using email.
3. this application is made up from a series of modules that also
extract data fr
Hello,
i would like to write a piece of code to help me to align some sequence
of words and suggest me the ordered common subwords of them
s0 = "this is an example of a thing i would like to have".split()
s1 = "another example of something else i would like to have".split()
s2 = 'and this is anot
"John Henry" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> John Henry wrote:
>
>>
>> Further, if splitUp is a sub-class of string, then I can do:
>>
>> alist, blist, clist, dlist = "ABCDEFGHIJ".slice((1,1,3,None))
>>
>> Now, can I override the slice operator?
>
> Maybe like:
>
>
Robert R. schrieb:
> Hello,
>
> i would like to write a piece of code to help me to align some sequence
> of words and suggest me the ordered common subwords of them
>
> s0 = "this is an example of a thing i would like to have".split()
> s1 = "another example of something else i would like to hav
I've been asking all over the place, namely different forums. I even
e-mailed [EMAIL PROTECTED] about my problem, but they couldn't assist me too
much.
My problem is..the GUI for versions 2.3, 2.4, and 2.5 of Python run very
sluggishly. When I type in them or move them around my desktop, it's v
Robert R. wrote:
> Hello,
>
> i would like to write a piece of code to help me to align some sequence
> of words and suggest me the ordered common subwords of them
>
> a trouble i have if when having many different strings my results tend
> to be nothing while i still would like to have one of th
As part of the Python initialization, C:\Windows\System32\Python25.zip
is set up in the path.
I haven't seen any documentation on the use or purpose of the zip file.
Colin W.
--
http://mail.python.org/mailman/listinfo/python-list
Ron Garret schrieb:
> One of the things I find annoying about Python is that when you make a
> change to a method definition that change is not reflected in existing
> instances of a class (because you're really defining a new class when
> you reload a class definition, not actually redefining i
Paul McGuire wrote:
> "John Henry" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> >
> > John Henry wrote:
> >
> >>
> >> Further, if splitUp is a sub-class of string, then I can do:
> >>
> >> alist, blist, clist, dlist = "ABCDEFGHIJ".slice((1,1,3,None))
> >>
> >> Now, can I override
> i would like to write a piece of code to help me to align some sequence
> of words and suggest me the ordered common subwords of them
Im not sure what you want, but in case you are guy who knows how
quicksort and Djikstra algorithms work :) and wants to find out more.
There are many algorithms
"It's clear Brad is being a jerk. This blog is for people who want to think
about how they manage people, projects, and risk. For me, project management
planning is the identification of release criteria and other prose about the
project. But we don't always have all the clues, as I didn't in t
Robert R.:
> i would like to write a piece of code to help me to align some sequence
> of words and suggest me the ordered common subwords of them [...]
> a trouble i have if when having many different strings my results tend
> to be nothing while i still would like to have one of the, or maybe,
>
In article <[EMAIL PROTECTED]>,
Laurent Pointal <[EMAIL PROTECTED]> wrote:
>Fred Bayer a écrit :
>>
>> Tony Belding wrote:
>>> I'm interested in using an off-the-shelf interpreted language as a
>>> user-accessible scripting language for a MUCK. I'm just not sure if I
.
I've been trying to get the string formatting operator (%) to work with
more arguments than the format string requires, but I can find no way to
do that. For example:
>>> "%i" % 10
'10'
>>> "i" % 10
Traceback (most recent call last):
File "", line 1, in ?
TypeError: not all arguments converted d
Concerning #2, Microsoft has released a tool for XSD Inference. It
can't generate the exact XSD file, but it can guess what it was...
http://download.microsoft.com/download/8/0/f/80fca9f1-292e-4b50-b512-ccf004d4b58e/xsdinference.exe
Paddy wrote:
> (That is bloom as in http://www.wmhelp.com/xmlpad
How do you know which ones to use? Your best bet is to write a handler
for the TypeError and give a meaningful error message.
Fredrik Tolf wrote:
> I've been trying to get the string formatting operator (%) to work with
> more arguments than the format string requires, but I can find no way to
> d
Fredrik Tolf wrote:
> I've been trying to get the string formatting operator (%) to work with
> more arguments than the format string requires, but I can find no way to
> do that. For example:
>
> >>> "%i" % 10
> '10'
> >>> "i" % 10
> Traceback (most recent call last):
> File "", line 1, in ?
> T
> This is my first solution try, surely there are faster, shorter, better
> solutions...
> It creates a graph with the paths of words, then sorts the graph
> topologically,
Beside possible inefficiencies, this "solution" breaks if words aren't
in the correct order, the topological sort can't work.
I have taken a look at the code that dose one download at time, in
multi threaded manner:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/465531
What I wanted to do is, make it download multiple files at the same
time. I am new to python and have gone over "Dive In To Python"
yesterday.
John Machin wrote:
> Fredrik Tolf wrote:
> > I've been trying to get the string formatting operator (%) to work with
> > more arguments than the format string requires, but I can find no way to
> > do that. For example:
> >
> > >>> "%i" % 10
> > '10'
> > >>> "i" % 10
> > Traceback (most recent cal
911 WAS AN INSIDE JOB. YOU WILL GET ALL SCIENTIFIC EVIDENCE ON
st911.org
The written apology reads:
"The United States of America apologizes to Mr. Brandon Mayfield and
his family for the suffering caused by the FBI's misidentification of
Mr. Mayfield's fingerprint and the resulting investigatio
On Thu, 2006-11-30 at 16:26 -0800, John Machin wrote:
> Fredrik Tolf wrote:
[...]
> > The thing is, I want to get format strings from the user, and I don't
> > want to require the user to consume all the arguments. docs.python.org
> > doesn't seem to have any clues on how to achieve this, and I can
No one can help? This is seriously bugging me to no end.
g4rlik wrote:
>
> I've been asking all over the place, namely different forums. I even
> e-mailed [EMAIL PROTECTED] about my problem, but they couldn't assist me too
> much.
>
> My problem is..the GUI for versions 2.3, 2.4, and 2.5 of P
In article <[EMAIL PROTECTED]>,
"Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> Ron Garret schrieb:
> > One of the things I find annoying about Python is that when you make a
> > change to a method definition that change is not reflected in existing
> > instances of a class (because you're real
> Could it be as I fear, that it is impossible?
p'shaw, you underestimate the power of the Python...
I think this is a poor solution (I would go with the solution in John
Machin's second post) but here it is anyway since it does essentially
what you asked for:
[code]
def print_data(fmtstr):
Fredrik Tolf wrote:
> On Thu, 2006-11-30 at 16:26 -0800, John Machin wrote:
> > Fredrik Tolf wrote:
> [...]
> > > The thing is, I want to get format strings from the user, and I don't
> > > want to require the user to consume all the arguments. docs.python.org
> > > doesn't seem to have any clues o
Cameron Walsh wrote:
> Hi all,
>
> I'm trying to extract the data from a bitmap or .pnm file using the
> following code:
>
> import Image
> img = Image.open("test.bmp","r")
> data=img.getdata()
>
> Unfortunately I get the following exception on Linux, but not on Windows:
>
data=img.getdata
Hello,
I've been able to use makepy to create a wrapper around flash8.ocx and
I have a wx app that serves as a container. I can get this simple case
to run a flash swf, and I can also receive fscommands from the flash
movie to the container. However, I've seen commercial flash containers
that pr
"kdotsky" <[EMAIL PROTECTED]> writes:
> > I didn't try looking at your example, but I think it's likely a bug
> > both in that site's HTTP server and in httplib. If it's the same one
> > I saw, it's already reported, but nobody fixed it yet.
> >
> > http://python.org/sf/1411097
> >
> >
> > John
>
On Thursday 30 November 2006 12:35, Croteam wrote:
> Hello,
>
> Can somebody give me shtoom examples or source
> code for making PC2Phone calls and pc to pc
> calls. (if you give me source code,please give
> me full url to that source or send me to email:
>[EMAIL PROTECTED])
>
>
Forgot to include,
Check out pyserial-2-2 at sourceforge.net/
by Chris Liechti
On Thursday 30 November 2006 21:07, jim-on-linux
wrote:
> On Thursday 30 November 2006 12:35, Croteam
wrote:
> > Hello,
> >
> > Can somebody give me shtoom examples or
> > source code for making PC2Phone calls a
Robert R. wrote:
> Hello,
>
> i would like to write a piece of code to help me to align some sequence
> of words and suggest me the ordered common subwords of them
>
> s0 = "this is an example of a thing i would like to have".split()
> s1 = "another example of something else i would like to have"
Is it defined behaviour that all files get implicitly closed when not
assigning them?
Like:
def writeFile(fName, foo):
open(fName, 'w').write(process(foo))
compared to:
def writeFile(fName, foo):
fileobj = open(fName, 'w')
fileobj.write(process(foo))
fileobj.clo
Hi,
I am trying to send keystrokes to the NES emulator nester[1]. The idea
was to be able to use a standard NES controller whose "state" I can
read in using Python and then conveying that to the emulator.
Unfortunately, all the attempts I have made so far have failed. It
looks like the emulator is
Noah Rawlins wrote:
>
> >>> strList = []
> >>> strList.append('this is an example of a thing i would like to have')
> >>> strList.append('another example of something else i would like to
> have')
> >>> strList.append('and this is another " example " but of something ;
> now i would still li
Thomas Heller wrote this on Thu, Nov 30, 2006 at 09:50:25PM +0100. My
reply is below.
> The two things that bother me at the moment are how the comments are
> formatted (dunno if that can be customized or changed easily), and
> it would be good if the script took command line args instead of
> wo
http://www.monitor.net/monitor/9905a/jbcointelpro.html
just search google for cointelpro
A Short History of FBI COINTELPRO
by Mike Cassidy and Will Miller
The FBI and police used secret and systematic methods of fraud and
force
[Editor's note: More information on COINTELPRO in t
Ron Garret wrote:
> In article <[EMAIL PROTECTED]>,
> "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>
> > Ron Garret schrieb:
> > > One of the things I find annoying about Python is that when you make a
> > > change to a method definition that change is not reflected in existing
> > > instances of
Hi there,
I'm trying to open a 256-colour windows BMP and a 24-bit windows BMP
with PIL usiing the following command:
Image.open("image.bmp")
When I try and open the 24-bit BMP the error I get is:
Traceback (most recent call last):
File "", line 1, in
im = Image.open("lightbulb.bmp")
F
Thomas Ploch wrote:
> Is it defined behaviour that all files get implicitly closed when not
> assigning them?
>
> Like:
>
> def writeFile(fName, foo):
> open(fName, 'w').write(process(foo))
>
> compared to:
>
>
> def writeFile(fName, foo):
> fileobj = open(fName, 'w')
> fileobj.w
John Machin wrote:
> Thomas Ploch wrote:
> > Is it defined behaviour that all files get implicitly closed when not
> > assigning them?
> >
> > Like:
> >
> > def writeFile(fName, foo):
> > open(fName, 'w').write(process(foo))
> >
> > compared to:
> >
> >
> > def writeFile(fName, foo):
> > f
On Thu, 2006-11-30 at 08:58 -0800, [EMAIL PROTECTED] wrote:
> And if talking about dates, then I suggest NEVER use 2006-12-31
> 23:59:59 in data, always 2007-01-01 00:00:00 instead.
Forgive me for my ignorance, but isn't "2006-12-31 23:59:59" actually
one entire second earlier than "2007-01-01 00
"Carl Banks" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> A straightforward, Pythonic way to do it would be to create an
> intermediate representation that understands both the existing class
> interfaces and the RDB stuff, but that could lead to synchronizing
> problems and a b
It's not slow for me. It's not like Python's inherently slow.
Try turning off your virus scanner (temporarily and while not doing
anything dangerous, of course).
Cheers,
-T
g4rlik wrote:
> No one can help? This is seriously bugging me to no end.
>
> g4rlik wrote:
> >
> > I've been asking all o
Hello all,
I'm writing a python script which fetches a HTML-page (using wget),
and then parses the retrieved page using a custom htmllib HTMLParser.
The page I fetch is encoded in utf8, and my text-handler currently
looks like this:
def handle_data(self, text):
if self.inOption:
Jan Danielsson wrote:
> Hello all,
>
>I'm writing a python script which fetches a HTML-page (using wget),
> and then parses the retrieved page using a custom htmllib HTMLParser.
>
>The page I fetch is encoded in utf8, and my text-handler currently
> looks like this:
>
>def handle_dat
Jan Danielsson wrote:
>However, I would like to convert the "text" (which is utf8)
> to latin-1. How do I do that?
How about:
latin = unicode(text, 'utf-8').encode('iso-8859-1')
Please see help(u''.encode) for details about error handling. You
might also want to trap errors in a
Christoph Haas <[EMAIL PROTECTED]> writes:
> On Thursday 23 November 2006 21:29, robert wrote:
> > When a LAMP programmer comes to Python, there are so many different
> > confusing things. It starts with a 'non-documented' cgi module - a
> > 'High-Level-Interface', that cannot even iterate over th
Chris Mellon wrote:
>> I want to extract some image links from different html pages, in
>> particular i want extract those image tags which height values are
>> greater than 200. Is there an elegant way in BeautifulSoup to do this?
>
> Most image tags "in the wild" don't have height attributes, y
"Thomas Ploch" <[EMAIL PROTECTED]> wrote:
> Nick schrieb:
> > http://www.sciencedaily.com/releases/2006/11/061130081347.htm
> >
> > World's Oldest Ritual Discovered -- Worshipped The Python 70,000 Years
> > Ago
> >
> > Nick
> >
>
> That's really interesting since there is an indio tribe in the a
"Ron Garret" <[EMAIL PROTECTED]> wrote:
>
> One of the things I find annoying about Python is that when you make a
> change to a method definition that change is not reflected in existing
> instances of a class (because you're really defining a new class when
> you reload a class definition, not
"Aahz" <[EMAIL PROTECTED]> wrote:
> Anyone else getting "Python-related" spam? So far, I've seen messages
> "from" Barry Warsaw and Skip Montanaro (although of course header
> analysis proves they didn't send it).
> --
not like that - just the normal crud from people giving me get rich quick tip
Colin J. Williams wrote:
> As part of the Python initialization, C:\Windows\System32\Python25.zip
> is set up in the path.
>
> I haven't seen any documentation on the use or purpose of the zip file.
http://docs.python.org/lib/module-zipimport.html
http://www.python.org/peps/pep-0273.html
--
I got attracted to python since I heard about PythonCAD,
while I used Fortran and Basic during graduation
days & VBA for some macros in Office.
I liked the python as it seems smart. But without compiling it is
a trouble to end user.
I downloaded PythonCAD and am still searching for the libraries
Michael Torrie wrote:
> Forgive me for my ignorance, but isn't "2006-12-31 23:59:59" actually
> one entire second earlier than "2007-01-01 00:00:00"? Hence they are
> two different dates are they not?
given the context, maybe the poster meant that he's storing date
*ranges* as [start, stop) (i.
Tim Peters wrote:
> It's been going on for years. The most frequent forged "Python
> related" sender address I've seen is actually [EMAIL PROTECTED],
> followed (but not closely) by /F's [EMAIL PROTECTED] Spammers
> harvest legit addresses to forge via scraping web pages and via
> Trojans scouri
yndesai wrote:
> Is it that no compiling facility is hindering the growth of python
> in commercial circuit . . . ?
good thing most commercial Python developers haven't noticed this, then.
if you don't know that some random guy on the internet thinks that
some- thing doesn't exist, there's no
[EMAIL PROTECTED] schrieb:
>
> I'm no expert, but it sounds like you associated the .py file extension
> with the pythonwin program, so that's what's being used to open it
> (instead of the desired python.exe). See
> http://support.microsoft.com/kb/320033 for more information.
>
> hth,
> Don
Tha
In article <[EMAIL PROTECTED]>,
"Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote:
> "Ron Garret" <[EMAIL PROTECTED]> wrote:
>
>
> >
> > One of the things I find annoying about Python is that when you make a
> > change to a method definition that change is not reflected in existing
> > instances
In article <[EMAIL PROTECTED]>,
Ron Garret <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>,
> "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote:
>
> > "Ron Garret" <[EMAIL PROTECTED]> wrote:
> >
> >
> > >
> > > One of the things I find annoying about Python is that when you make a
>
In article <[EMAIL PROTECTED]>,
"Paul McGuire" <[EMAIL PROTECTED]> wrote:
> "Carl Banks" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> >
> > A straightforward, Pythonic way to do it would be to create an
> > intermediate representation that understands both the existing class
>
Wow! That must have been a pretty early beta.
> -Original Message-
> From: Nick [mailto:[EMAIL PROTECTED]
> Sent: 30 November 2006 17:16
> To: python-list@python.org
> Subject: Python Worship
>
> http://www.sciencedaily.com/releases/2006/11/061130081347.htm
>
> World's Oldest Ritual D
Patch / Bug Summary
___
Patches : 407 open ( +1) / 3484 closed ( +5) / 3891 total ( +6)
Bugs: 936 open ( +5) / 6363 closed (+14) / 7299 total (+19)
RFE : 246 open ( +1) / 244 closed ( +0) / 490 total ( +1)
New / Reopened Patches
__
sys.id()
101 - 180 of 180 matches
Mail list logo