Why the CLI hang using pyjwt ?

2017-10-12 Thread will
Not sure why the CLI command "pyjwt decode --no-verify ..." will hang at sys.stdin.read() even though I provided all the input. Any ideas on how to work around the problem? $ pyjwt -v pyjwt 1.5.3 $ pyjwt decode --no-verify eyJhbGciOiJIUzI1NiIsInR5cC

Python added to PATH, cannot be directly accessed, cannot install pip

2021-09-27 Thread Will
7;t find Python directly through the Command Prompt, and I cannot install get-pip.py to Python. For reference, I have Python version 3.9.6 and I installed Python directly from the site (I did not use Anaconda). Can you guys help me with this? Or do I need to delete Python and

subprocess exiting in an incomprehensible fashion

2005-10-21 Thread Will
as looking to get something simple working first. Any help would be much appreciated. I have been hunting quite a bit for he answer to no avail. Will Holcomb -- http://mail.python.org/mailman/listinfo/python-list

Re: subprocess exiting in an incomprehensible fashion

2005-10-22 Thread Will
Well, I'll be damned... Thank you very much. I'm still getting a little tripped up with blocking IO and whatnot, but I think I can work that out. This was a real help, thanks again. #!/usr/bin/python # -*- coding: UTF-8 -*- import subprocess import random import re import os import time import se

Re: Game programming in Python

2005-01-11 Thread Will
nd then you can put this knowledge to use elsewhere). It comes with a CD that has Python 2.2.3, Pygame 1.5.6 and Livewires 2.0, the source code for the projects in the book, & useful links (as well as The Gimp for Windows and a demo version of the Cool Edit Pro multitrack recording studio). HTH.

Re: PUG in Melbourne Australia?

2005-01-17 Thread Will
a (Zope being built in Python). Have a look at http://www.ozzope.org and you'll find a couple of contacts there who'll be able to refine your search even further. HTH, Will :) ** From the shameless propaganda file: Need a Saatchi-quality copywriter, art director and concepts person

Any affordable Python-based CRM & ERP solutions?

2004-12-02 Thread Will
If so, have you encountered any other open source solutions that cover part of the above with Python handling the rest (and being easily integrated)? I look forward to any feedback. Thanks very much in advance. Cheers, Will :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python on Vista installation issues

2007-05-22 Thread will
Vista is a 64 bit OS and there is no port of pywin32 for either Vista or 64-bit XP -- http://mail.python.org/mailman/listinfo/python-list

IDLE

2021-02-16 Thread Will Anderson
Hi, I hope you are having a good day. I have a small IDLE problem and can’t seem to fix it. I have a .py file that I want to open using IDLE but there is no option I have even tried totally wiping python and reinstalling it nothing seems to work. Please help.     Will

proposal for slice hashing

2020-05-11 Thread Will Bradshaw
the numpy style but is computes it's values on __getitem__ calls as it represents an infinite field of numbers. However this operation is expensive. In many cases the same slice of the field will be needed repeatedly. This lends itself to using an lru cache on __getitem__() however this doe

Re: proposal for slice hashing

2020-05-11 Thread Will Bradshaw
On Monday, May 11, 2020 at 4:10:56 PM UTC-4, Chris Angelico wrote: > On Tue, May 12, 2020 at 6:01 AM Will Bradshaw wrote: > > The only options as of now are: > > 1. use 3 layers of wrappers to pack the slices into a custom type that > > supports hashing pass this m

Re: proposal for slice hashing

2020-05-11 Thread Will Bradshaw
On Monday, May 11, 2020 at 4:45:55 PM UTC-4, Chris Angelico wrote: > On Tue, May 12, 2020 at 6:31 AM Will Bradshaw wrote: > > > > On Monday, May 11, 2020 at 4:10:56 PM UTC-4, Chris Angelico wrote: > > > On Tue, May 12, 2020 at 6:01 AM Will Bradshaw > > > wrot

Re: proposal for slice hashing

2020-05-16 Thread Will Bradshaw
as I made the post. I've also done a bit of work on the proposal to make the key function changeable in functools.lru_cache though that is a bit more complex and will take a bit of refactoring to do right. -- https://mail.python.org/mailman/listinfo/python-list

Re: Getting a number out of a string

2005-09-27 Thread Will McGugan
Claudio Grondi wrote: > what about: > >>>>lst = [digit for digit in '06897'] >>>>lst > > ['0', '6', '8', '9', '7'] Or.. >>> list('06897') ['0', '6', &

New Python chess module

2005-09-29 Thread Will McGugan
mainly for the fun of it. I wrote a chess game in C++ a while back (http://www.chesscommander.com) and I thought it would be interesting to re-implement the chess library part in Python. Regards, Will McGugan -- http://www.willmcgugan.com -- http://mail.python.org/mailman/listinfo/python-list

Re: New Python chess module

2005-09-30 Thread Will McGugan
gt; > >>>>[x for x in range(10) if 2 > [3, 4, 5, 6] > > Read about it in the reference: > http://www.python.org/doc/2.4.2/ref/comparisons.html > Thanks. I was aware of that, I've just never got in to the habbit of using it.. Will McGugan -- http://www.will

Re: New Python chess module

2005-09-30 Thread Will McGugan
There is a new version if anyone is interested... http://www.willmcgugan.com/chess.py It contains optimizations and bugfixes. Can anyone suggest a name for this module? pyChess is already taken... Will McGugan -- http://www.willmcgugan.com "".join({'*':'@',

Re: ASCII

2005-09-30 Thread Will McGugan
Tuvas wrote: > Is there a function that will take a char. and return the ascii value? > Thanks! > ord Will McGugan -- http://www.willmcgugan.com "".join({'*':'@','^':'.'}.get(c,0) or chr(97+(ord(c)-84)%26) for c in "jvyy*jvyy

Re: "no variable or argument declarations are necessary."

2005-10-02 Thread Will McGugan
James A. Donald wrote: > I am contemplating getting into Python, which is used by engineers I > admire - google and Bram Cohen, but was horrified to read > > "no variable or argument declarations are necessary." > > Surely that means that if I misspell a va

Re: Contest snub?

2005-10-08 Thread Will McGugan
.. an irrational fear of snakes perhaps? Its not irrational if you are a gator! Will McGugan -- http://www.willmcgugan.com "".join({'*':'@','^':'.'}.get(c,0) or chr(97+(ord(c)-84)%26) for c in "jvyy*jvyyzpthtna^pbz") -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython question

2005-10-13 Thread Will McGugan
vpr wrote: > Hi > > Does anyone have some example code to create a wx dialog that apears > off screen on the bottom right hand corner and slides up into the > screen ? > Andrea Gavana does.. http://xoomer.virgilio.it/infinity77/eng/freeware.html#toasterbox Wil

Re: 1-liner to iterate over infinite sequence of integers?

2005-10-13 Thread Will McGugan
n itertools.count(): print i Will McGugan -- http://www.willmcgugan.com "".join({'*':'@','^':'.'}.get(c,0) or chr(97+(ord(c)-84)%26) for c in "jvyy*jvyyzpthtna^pbz") -- http://mail.python.org/mailman/listinfo/python-list

Re: 1-liner to iterate over infinite sequence of integers?

2005-10-13 Thread Will McGugan
Will McGugan wrote: > Neal Becker wrote: > >> I can do this with a generator: >> >> def integers(): >> x = 1 >> while (True): >> yield x >> x += 1 >> >> for i in integers(): >> Is the

Re: wxPython question

2005-10-18 Thread Will McGugan
better for the animation. HTH, Will McGugan -- http://www.willmcgugan.com "".join({'*':'@','^':'.'}.get(c,0) or chr(97+(ord(c)-84)%26) for c in "jvyy*jvyyzpthtna^pbz") -- http://mail.python.org/mailman/listinfo/python-list

Re: Converting a List into a String

2005-11-05 Thread Will McGugan
a, > > the output is > > f e d c b a > > How can i remove the spaces b/w each letter? print "".join(list) BTW list isnt a good name for a list, it hides the built in type. Will McGugan -- http://www.willmcgugan.com "".join({'*':'@','^':'.'}.get(c,0) or chr(97+(ord(c)-84)%26) for c in "jvyy*jvyyzpthtna^pbz") -- http://mail.python.org/mailman/listinfo/python-list

Piecewise-cubic lookup table generator

2005-11-21 Thread Will Ware
I needed to generate some C code for a fast lookup table using piecewise-cubic interpolation. If anybody else needs this, the Python code for it is at http://tinyurl.com/92zcs (alt.source, Google Groups). Will Ware -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie q

2005-01-13 Thread Will Stuyvesant
mystring')) . .print add_string_to_all(['d:', 'c:\windows\\','something/']) this outputs: ['d:mystring', 'c:\\windows\\mystring', 'something/mystring'] -- look Ma, no for and no lambda! -- Will Stuyvesant -- http://mail.python.org/mailman/listinfo/python-list

delay and force in Python

2005-01-19 Thread Will Stuyvesant
Here is a question for people who are more comfortable than I am with new Python stuff like generators. I am having fun implementing things from the Wizard book (Abelson, Sussman, "Structure and Interpretation of Computer Programs") in Python. In chapter 3.5 it is about streams as delayed lists.

Re: delay and force in Python

2005-01-19 Thread Will Stuyvesant
Yes you are right, if you just want to carry an expression around then lambda does it; but delay was not intended as a top-level function. Perhaps you think that my silly stream implementation in the original post builds the whole list, but it does not: >>> o = stream_enumerate_interval(11,121)

Re: a question

2005-01-19 Thread Will Stuyvesant
Andrew Koenig wrote: > how about writing this instead? > > ('this is a ' > 'long string') Yes, nice. And to make that possible we have to write ('one-string-item',) instead of ('one-string-item') if we want a tuple with one string inside. Sometimes that feels like a wart to me, but now

Funny Python error messages

2005-01-21 Thread Will Stuyvesant
Add your funny or surprising Python error messages to this thread. A requirement is that you should also show (minimal) code that produces the message. Put the code below, so people can think about how to generate the message first, a little puzzle if you like. Perhaps this will even be a

Re: delay and force in Python

2005-01-24 Thread Will Stuyvesant
add_33 == 3400) . . assert(stream_hd(stream_tl(stream_filter( . is100some, . # infinite stream 1,2,... . make_stream(1 == 200) . . def mod_2(x): return x % 2 == 0 . # this will need more evaluations than the recursion limit count . infinite_fil

Re: Help With Python

2005-01-26 Thread Will McGugan
am completely new to programming! Thanks in advance! >>> print "Spam, " * 510 + "Spam" Will McGugan -- http://mail.python.org/mailman/listinfo/python-list

Re: Help With Python

2005-01-26 Thread Will McGugan
>>> print "Spam, " * 510 + "Spam" Or if you have 2.4.. >>> print ", ".join( "Spam" for _ in xrange( 511 ) ) Although, the replys with links will ultimately be more helpful! Will McGugan -- http://mail.python.org/mailman/listinfo/python-list

Re: stop program in komodo

2005-01-31 Thread Will McGugan
was just that the buffer had filled up with a squillion "helo"'s and was busy scrolling away.. Regards, Will McGugan -- http://mail.python.org/mailman/listinfo/python-list

Database recommendations for Windows app

2005-06-22 Thread Will McGugan
have googled and found plenty of information on databases, its just that I dont have enough experience with databases to know which one is best for my task! Thanks in advance, Will McGugan -- http://www.willmcgugan.com "".join({'*':'@','^':'.&#x

Re: Database recommendations for Windows app

2005-06-22 Thread Will McGugan
Thanks for the replies. I think I'm going to go with sqllite for now. For the curious, Im writing an interface to a nutritional database. So you can type in a foodstuff and it will tell you whats in it.. Will McGugan -- http://www.willmcgugan.com "".join({'*':'

Re: PIL question: keeping metadata

2005-06-29 Thread Will McCutchen
ackage that does it? Try jpegtran: http://sylvana.net/jpegcrop/jpegtran/ You might also be interested in jhead: http://www.sentex.net/~mwandel/jhead/ Will. -- http://mail.python.org/mailman/listinfo/python-list

Re: Graphs/statistics using wxPython

2005-06-29 Thread Will McGugan
ures. Feel free to make requests or enhancements. [*] There are some size/offset bugs which I am aware of, but they are easily fixed. I just haven't got around to it yet. If you ever want to add an extra dimension, then using OpenGL with wxWindows is a breeze. See attached file for

frozenset question

2005-07-06 Thread Will McGugan
Hi, Are there any benefits in using a frozenset over a set, other than it being immutable? Will McGugan -- http://www.willmcgugan.com "".join({'*':'@','^':'.'}.get(c,0) or chr(97+(ord(c)-84)%26) for c in "jvyy*jvyyzpthtna^pbz") -- http://mail.python.org/mailman/listinfo/python-list

Re: frozenset question

2005-07-06 Thread Will McGugan
Qiangning Hong wrote: > On 7/6/05, Will McGugan <[EMAIL PROTECTED]> wrote: > >>Hi, >> >>Are there any benefits in using a frozenset over a set, other than it >>being immutable? > > > A frozenset can be used as a key of a dict: Thanks, but I meant

Re: frozenset question

2005-07-06 Thread Will McGugan
le idea. Get your program working first. Then when it > works, measure how fast it runs. If, and ONLY if, it is too slow, > identify the parts of the program that make it too slow. That means > profiling and timing. Then optimize those parts, and nothing else. > > Otherwise, you will b

dictionary that discards old items

2005-07-22 Thread Will McGugan
here I read about it. Can anyone enlighten me? Regards, Will McGugan -- http://www.willmcgugan.com "".join({'*':'@','^':'.'}.get(c,0) or chr(97+(ord(c)-84)%26) for c in "jvyy*jvyyzpthtna^pbz") -- http://mail.python.org/mailman/listinfo/python-list

Re: dictionary that discards old items

2005-07-22 Thread Will McGugan
Michael Hoffman wrote: > Will McGugan wrote: > >> I need a collection class that behaves like a dictionary but when it >> reaches 'n' items it discards the oldest item so that the length never >> goes above 'n'. (Its for caching search results) >&

Re: First app, thanks people

2005-07-25 Thread Will McGugan
ortable way, since I assume that F1 doesn't have > the same code on a Sparc Ultra10. (?) Is there a way to get "key codes" > in wxPython in a portable manner? Hi, You should use the keycode constants. http://www.wxwidgets.org/manuals/2.6.1/wx_keycodes.html#keycodes Wil

Re: Idempotent XML processing

2005-08-19 Thread Will McCutchen
mpty elements were represented uniformly. Again, I'm sorry because I didn't provide any real useful information, I just tried to poke holes in your current project. Will. [1] Unless all of your whitespace is significant -- http://mail.python.org/mailman/listinfo/python-list

Re: Idempotent XML processing

2005-08-19 Thread Will McCutchen
ml implented it (or that it had an abbreviation), so that's good to know. Thanks! Will. -- http://mail.python.org/mailman/listinfo/python-list

Re: Doubt C and Python

2005-08-23 Thread Will McGugan
praba kar wrote: > Dear All, >I want to know the link between c and python. >Some people with C background use Python instead > of programming in C.why? > Because I can create software many times faster. And its more fun. Will McGugan -- http://www.kelpieso

Re: aproximate a number

2005-08-28 Thread Will McGugan
>>> import math >>> math.ceil(5.7) 6.0 Will McGugan -- http://www.willmcgugan.com "".join({'*':'@','^':'.'}.get(c,0) or chr(97+(ord(c)-84)%26) for c in "jvyy*jvyyzpthtna^pbz") -- http://mail.python.org/mailman/listinfo/python-list

Re: how to join two Dictionary together?

2005-08-30 Thread Will McGugan
DENG wrote: > dict1={...something...} > > dict2={...somethind else ..} > > dict1 + dict2 > > > that's does works ..:(, it's not like List... I think you want.. dict1.update(dict2) Will McGugan -- http://www.willmcgugan.com "".join({'*'

Replacing large number of substrings

2005-09-04 Thread Will McGugan
.. >>> dict_replace( "a b c", dict(a="x", b="y") ) "x y c" Regards, Will McGugan -- http://www.kelpiesoft.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Has anybody tried to make a navigation like Google?

2005-09-05 Thread Will McGugan
e-invent the wheel. > Thank you for help I did something like that recently. http://www.foodfileonline.com Its not so complicated, you just need to know how many search results you have returned and how many are shown on each page. You will also need a search page that can start at a parti

Re: which is more 'pythonic' / 'better' ?

2005-09-12 Thread Will McGugan
the code to _not_ throw the exception the majority of times. Otherwise the simple condition is better. Although I expect there is not much difference either way.. Will McGugan -- http://www.kelpiesoft.com -- http://mail.python.org/mailman/listinfo/python-list

Re: which is more 'pythonic' / 'better' ?

2005-09-12 Thread Will McGugan
> text = (line[n:n+1] or ['nothing'])[0] I was assuming that 'line' would be a string, not a list. Seems more likely give the name and context. Will McGugan -- http://www.kelpiesoft.com -- http://mail.python.org/mailman/listinfo/python-list

Re: which is more 'pythonic' / 'better' ?

2005-09-12 Thread Will McGugan
line' would suggest there was just one of them, so I assumed it was string. Will McGugan -- http://www.willmcgugan.com "".join({'*':'@','^':'.'}.get(c,0) or chr(97+(ord(c)-84)%26) for c in "jvyy*jvyyzpthtna^pbz") -- http://mail.python.org/mailman/listinfo/python-list

Re: Removing duplicates from a list

2005-09-14 Thread Will McGugan
'count' which must make a pass through every element of the list, which would be slower than the efficient hashing that set does. I'm also not sure about removing an element whilst iterating, I think thats a no-no. Will McGugan -- http://www.willmcgugan.com "".join

Re: Removing duplicates from a list

2005-09-14 Thread Will McGugan
;t know, and > I'll bet you don't either. Sure. But if I'm not currently optimizing I would go for the method with the best behaviour, which usualy means hashing rather than searching. Since even if it is actualy slower - its not likely to be _very_ slow. Will McGugan -- http:

Re: Python Search Engine app

2005-09-14 Thread Will McGugan
ery high speed operations on highly compressed binary > structures - which is not Python's forte. > > You might be able to put a Python interface over an engine written > in another language. Wasn't Google's first search engine actualy written in Python? Will McGugan -- h

Re: Create and display an email

2005-09-15 Thread Will McGugan
gt; There has to be something obvious that I'm missing here. Any > suggestions? > I dont think there is anything in the standard library to help you here. Windows has an api called 'MAPI' which does this sort of thing. There may be bindings to it somewhere, or you

Re: Creating Pie Chart from Python

2005-09-15 Thread Will McGugan
ached piechartwindow.py). It can also be used to pre-generate images such as this.. http://www.foodfileonline.com/static/piecharts/pie01009.jpg Code is public domain. Will McGugan -- http://www.willmcgugan.com "".join({'*':'@','^':'.'}.get(c,0) or chr(97+

Re: Britney Spears nude

2005-09-15 Thread Will McGugan
Tim Peters wrote: > [john basha] > >>send me the britney nude photos > > > Because they're a new feature, you'll have to wait for Python 2.5 to > be released. She has just spawned a child process. Give her to Python 2.6 to get back in shape. Will McGu

Re: Creating Pie Chart from Python

2005-09-16 Thread Will McGugan
version of pyOpenGL / wxPython? Its only been tested on Windows, but it just uses basic OpenGL so there is not that much to go wrong.. Will McGugan -- http://www.willmcgugan.com "".join({'*':'@','^':'.'}.get(c,0) or chr(97+(ord(c)-84)%26) for c in "jvyy*jvyyzpthtna^pbz") -- http://mail.python.org/mailman/listinfo/python-list

Creating properties with decorator like syntax

2005-02-17 Thread Will McGugan
setx(self, value): self.__x = value def delx(self): del self.__x Regards, Will McGugan -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating properties with decorator like syntax

2005-02-17 Thread Will McGugan
Will McGugan wrote: Hi, Is there any way of making properties using a decorator? The current way of creating a property seems inelegant. Something like this imaginary snippit would be nice, IMHO. class C(object): @make_property def x(self): def getx(self): return self.__x

namespace collisions

2005-02-17 Thread Will McGugan
it in a common location in my Python path, should I call it willsutil.py? TIA, Will McGugan -- http://mail.python.org/mailman/listinfo/python-list

Re: PIL Expand Canvas

2005-02-19 Thread Will McGugan
wide - I will want to pad it left and right by 10 pixels with white space to make it a 200x200 square. Is this possible? You could create a new canvas of the larger dimensions, then copy the smaller one to the centre of it.. Will McGugan -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Online Programming Contest

2005-02-24 Thread Will Stuyvesant
> [Varun] > For details about samhita http://www.samhita.info/ "The Madras Institute of Technology (MIT)" it says there. The MIT acronym is taken already guys.. -- no scheme no glory -- http://mail.python.org/mailman/listinfo/python-list

Googlewhacker

2005-02-27 Thread Will McGugan
Hi folks, Has anyone seen 'Googlewhack Adventure'? http://www.davegorman.com/googlewhack.htm I wrote a script to generate Googlewhacks - thought I'd share it with you. I'd better stop running it as I fear Google may ban my IP for making 20 searches a seconds.. Will McGugan

Re: Googlewhacker

2005-02-27 Thread Will McGugan
Will McGugan wrote: Hi folks, Has anyone seen 'Googlewhack Adventure'? http://www.davegorman.com/googlewhack.htm I wrote a script to generate Googlewhacks - thought I'd share it with you. I'd better stop running it as I fear Google may ban my IP for making 20 searches a s

Re: Text To Speech with pyTTS

2005-02-27 Thread Will McGugan
/2005/1/19/266813.html and immediately tried it out. All I did was download the PyTTS package for Python (2.4, not 2.3), and install it, then ran Joey's sample above. It worked as advertised. This was on Windows XP SP2. I experience the same thing as Mike P. Im running on Windows 2K. Will Mc

Re: Faster way to do this...

2005-03-01 Thread Will McGugan
Harlin Seritt wrote: I've got the following code: nums = range(0) for a in range(100): nums.append(a) Is there a better way to have num initialized to a list of 100 consecutive int values? Isn't that equivalent to simply.. nums= range(100) Will McGugan -- http://mail.python.org/mailma

Re: Faster way to do this...

2005-03-02 Thread Will McGugan
Warren Postma wrote: Will McGugan wrote: Isn't that equivalent to simply.. nums= range(100) I remember the day I first realized that 900 lines of some C++ program I was working on could be expressed in three lines of python. Ahh. Lately I've found myself commenting C++ code with the

Hash of integers for use in Random module

2005-03-06 Thread Will McGugan
Hi, If I retrieve the hash of an integer, will it always return the same value across platforms? This reason I ask is that I want to produce a sequence of pseudo random numbers using the random module, that I can re-create later on. So I'll need to store the seed value, but Random.seed ta

Re: Hash of integers for use in Random module

2005-03-06 Thread Will McGugan
Will McGugan wrote: Hi, If I retrieve the hash of an integer, will it always return the same value across platforms? This reason I ask is that I want to produce a sequence of pseudo random numbers using the random module, that I can re-create later on. So I'll need to store the seed value

Re: Creating desktop icons for Innosetup file

2005-03-13 Thread Will McGugan
.. WorkingDir: {app}; HTH, Will McGugan -- http://mail.python.org/mailman/listinfo/python-list

Re: computing a weighted sum

2005-03-16 Thread Will McGugan
lists are large. Will McGugan -- http://mail.python.org/mailman/listinfo/python-list

html escape sequences

2005-03-18 Thread Will McGugan
Hi, I'd like to replace html escape sequences, like   and ' with single characters. Is there a dictionary defined somewhere I can use to replace these sequences? Thanks, Will McGugan -- http://mail.python.org/mailman/listinfo/python-list

Re: html escape sequences

2005-03-18 Thread Will McGugan
Leif K-Brooks wrote: Will McGugan wrote: I'd like to replace html escape sequences, like   and ' with single characters. Is there a dictionary defined somewhere I can use to replace these sequences? How about this? import re from htmlentitydefs import name2codepoint _entity_re = re

Re: PIL and antialiasing problem

2004-12-02 Thread Will McGugan
would be great to have it working with those colorful smudged images. It will be terribly slow to separate them by hand. There are almost 15000 of them... Try running ImageFilter.MinFilter on the image before you thumbnail it. This should make dark lines thicker. HTH, Will McGugan -- http

Re: PIL and antialiasing problem

2004-12-02 Thread Will McGugan
Laszlo Zsolt Nagy wrote: Try running ImageFilter.MinFilter on the image before you thumbnail it. This should make dark lines thicker. HTH, Will McGugan You are my man! It worked perfectly! Statement: Sometimes PIL is better than Adobe Photoshop. :-) Happy to help :) I also found these with the

Python compared with Xen (for XML)

2004-12-03 Thread Will Stuyvesant
Here is a comment on the paper "Programming with Circles, Triangles and Rectangles" by Erik Meijer, Wolfram Schulte and Gavin Bierman. Google will find it quickly if you try. In the paper they introduce Xen, an extension to C# for better XML support. They show how Lifting, Filtering

Re: Fun with Outlook and MAPI

2004-12-10 Thread Will McGugan
Chris wrote: I'm trying to send an e-mail through outlook. So far I've gotten it to work with the mail script at http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/149461 My only problem is that when I call Resolve() and Send(), I get confirmation dialogs. I will be sending o

Re: Fun with Outlook and MAPI

2004-12-10 Thread Will McGugan
esn't. There is actually a workaround. You're using Simple MAPI which has a I stand corrected. Will McGugan -- http://mail.python.org/mailman/listinfo/python-list

Re: handy stacktrace class

2004-12-12 Thread will . ware
Oh. Never mind, then. -- http://mail.python.org/mailman/listinfo/python-list

do you master list comprehensions?

2004-12-13 Thread Will Stuyvesant
t. How to do this with [lc] instead of for-loops? I tried funnies like [[w for w in L] for L in data], that is correct syntax, but you'd never guess. I know, silly! No need for [lc]! So there's my question. I am sure a one-liner using [lc] will be very enlightening. Like studying LI

Re: do you master list comprehensions?

2004-12-13 Thread Will Stuyvesant
Okay that was fun. Enlightening as I hoped. unroll() in Python, for arbitrary depth, _flatten in Tkinter (what else is in Tkinter!), sum() abuse. The sum(data,[]) was funniest, it works like ((['foo','bar'] + []) + ['my','your']) + ['holy','grail']. Before I think of such things I have already

handy stacktrace class

2004-12-11 Thread Will Ware
I was fooling with some Python code, and starting to miss the Exception.printStackTrace() feature in Java. Here is a stab at something roughly analogous, which puts together a stacktrace as an XML document. import xml.dom.minidom class Stacktrace(xml.dom.minidom.Document): def __init__(self):

Python Cookbook 2nd Ed

2005-03-28 Thread Will McGugan
Hi, Is the second edition of the Python Cookbook worth getting if you have the first edition? How much new material is there in the 2nd edition? Thanks, Will McGugan -- http://mail.python.org/mailman/listinfo/python-list

BF interpreter in Python

2005-03-29 Thread Will McGugan
expert to give a one line generator expression with the same functionality.. Will McGugan -- http://mail.python.org/mailman/listinfo/python-list

Re: Retrieve Icons Associated To An Extension?

2005-03-29 Thread Will McGugan
e Windows/Controls). That seems to do what you want.. Will McGugan -- http://mail.python.org/mailman/listinfo/python-list

Re: BF interpreter in Python

2005-03-30 Thread Will McGugan
Do Re Mi chel La Si Do wrote: Hi ! Good idea. I take this interpreter with jubilation. Can I add your URL at http://mclaveau.com/esolang ? Certainly, be my guest. Other question : do you know PATH ? (http://pathlang.sourceforge.net) Yes, a wonderfully expressive language! Will McGugan -- http

Re: Counting iterations

2005-04-08 Thread Will McGugan
Derek Basch wrote: Is there a better way to count iterations that this?: pets = 0 for i in pets: pets += 1 print "pet" + "#" + pets You can use 'enumerate' to get the index, but the code above wont work - you are trying to iterate over a non-sequ

Re: World First Cancer Immune Booster

2005-04-12 Thread Will McGugan
s is really low. Scamming money out of people with potentially fatal illnesses. I hope there's a level of hell devoted to spammers like this! Will McGugan -- http://www.willmcgugan.com "".join( [ {'*':'@','^':'.'}.get(c,None) or chr(97+(ord(c)-

Re: Codig style: " or """

2005-04-13 Thread Will McGugan
t of any length, that way I dont need to change anything if I do need to insert a quote. I dont think its a matter of coding style, its purely a practical issue. If your PHB insists on consistency, I would just use """ Will McGugan -- http://www.willmcgugan.com "".join( [ {'*':'@','^':'.'}.get(c,None) or chr(97+(ord(c)-84)%26) for c in "jvyy*jvyyzpthtna^pbz" ] ) -- http://mail.python.org/mailman/listinfo/python-list

Re: Supercomputer and encryption and compression @ rate of 96%

2005-04-14 Thread Will McGugan
lease implement this as a Python module. I would like to compress my mp3 collection to single bits. Will McGugan -- http://www.willmcgugan.com "".join( [ {'*':'@','^':'.'}.get(c,None) or chr(97+(ord(c)-84)%26) for c in "jvyy*jvyyzpthtna^pbz" ] ) -- http://mail.python.org/mailman/listinfo/python-list

Re: Supercomputer and encryption and compression @ rate of 96%

2005-04-14 Thread Will McGugan
Fredrik Lundh wrote: Will McGugan wrote: Please implement this as a Python module. I would like to compress my mp3 collection to single bits. here's the magic algorithm (somewhat simplified): def algorithm(data): m = 102021 # magic constant d = [int(c) for c in str(1*2*3*4*5*m+5+

Behaviour of str.split

2005-04-18 Thread Will McGugan
Hi, I'm curious about the behaviour of the str.split() when applied to empty strings. "".split() returns an empty list, however.. "".split("*") returns a list containing one empty string. I would have expected the second example to have also returned an empty

Re: random number between 0 and 20

2005-04-20 Thread Will McGugan
[EMAIL PROTECTED] wrote: How can I generate a random number between 0 - 20 and store the number in nrrandom? Assuming its inclusive.. >>> from random import randint >>> nrrandom = randint(0,20) Will McGugan -- http://www.willmcgugan.com "".join( [ {'*':'@

Re: What is rstrip() in python?

2014-11-11 Thread Will Acheson
On Sunday, November 9, 2014 6:12:24 AM UTC-5, satish...@gmail.com wrote: > What is rstrip() in python? > > What does it do in the following piece of code? > > import sqlite3 > conn = sqlite3.connect('dbase1') > curs = conn.cursor() > > file = open('data.txt') > rows = [line.rstrip().split(',') f

Re: Python modules

2014-11-11 Thread Will Acheson
On Sunday, November 9, 2014 11:51:41 PM UTC-5, Steve Hayes wrote: > I have a book on Python that advocates dividing programs into modules, and > importing them when needed. > > I have a question about this. > > I can understand doing that in a compiled language, where different modules > can be

  1   2   3   >