Re: Marked-Up Text Viewer for Python/Tkinter

2006-01-31 Thread Fuzzyman
e would use it. It's only HTML 2 though. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode strings and ascii regular expressions

2006-01-31 Thread Fuzzyman
Fredrik Lundh wrote: > Fuzzyman wrote: > > > Can someone confirm that compiled regular expressions from ascii > > strings will always (and safely) yield unicode values when matched > > against unicode strings ? [snip..] > > ascii patterns work just fine on unicod

Unicode Support for ConfigObj (config file reader) Now in SVN

2006-01-31 Thread Fuzzyman
with, but unicode support is hard to get completely right. I'd appreciate it if anyone coul;d check it out and try to break it. :-) There are two remaining questions before I do a beta release. Both relate to the handling of BOM. Again see the blog. Comments/opinions sought. All the best,

Re: urllib2 - My POST Request just isn't working right

2006-02-01 Thread Fuzzyman
That would certainly be an error. *Also*, urllib2 adds the host header for you, no need to set it. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: cgi - secure sessions

2006-02-02 Thread Fuzzyman
ccess to the application if the user isn't logged in - and presents them with a login page). It's a good place to start though. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml > Again, any help is appreciated. > > GazaM -- http://mail.python.org/mailman/listinfo/python-list

Re: changing python script on-the-fly for ActiveX/COM object (win32com)

2006-02-02 Thread Fuzzyman
I don't know if that would rebind external references to objects *within* the module (you'd need to experiment or wait for a more knowledgeable opinion). You'd also have to at least *suspend* operations whilst the update takes place. All the best, Fuzzyman http://www.voidspace.org

Re: webbrowser module + urls ending in .py = a security hole?

2006-02-02 Thread Fuzzyman
efinitely different from its handling of file:// accesses. > It's worth working out if this is down to webbrowser.py *or* Firefox. Try launching firefox with the path to the py file and seeing what it does. If it is webbrowser.py then it is worth fixing. All the best, Fuzzyman htt

Re: cgi - secure sessions

2006-02-02 Thread Fuzzyman
l pages with forms that call the CGI. The CGI will still have to return HTML though. logintools itself uses an *ultra simple* templating system - just replacing special values in the template with the dynamically generated values. There is no logic in the tempaltes whatsoever. All the best,

Re: cgi - secure sessions

2006-02-02 Thread Fuzzyman
l pages with forms that call the CGI. The CGI will still have to return HTML though. logintools itself uses an *ultra simple* templating system - just replacing special values in the template with the dynamically generated values. There is no logic in the templates whatsoever. All the best,

Re: webbrowser module + urls ending in .py = a security hole?

2006-02-02 Thread Fuzzyman
Peter Hansen wrote: > Fuzzyman wrote: > > Blair P. Houghton wrote: > >>webbrowser.py module's handling of http:// accesses > >>is definitely different from its handling of file:// accesses. > > > > It's worth working out if this is down to webb

Re: cgi - secure sessions

2006-02-02 Thread Fuzzyman
nd sites work, such as > reddit and plone etc right? I'm not sure if you can 'include' a CGI and expect the reults to get included in a page (although I think I've heard of PHP being used in that way.) It doesn't sound like it's working for you anyway. All

Movable Python 1.0.0 for Python 2.3 & 2.4

2006-02-03 Thread Fuzzyman
It's finally happened, `Movable Python `_ is finally released. Versions for Python 2.3 & 2.4 are available from `The Movable Python Shop `_. The cost is £5 per distribution, payment by PayPal. £1 from every distr

Re: newbie - script works in PythonWin - fails from Python

2006-02-03 Thread Fuzzyman
exception, and preferably the snippet of code (with relevant context) that caused it. This will give people a better chance of being able to help you. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: would it be feasable to write python DJing software

2006-02-03 Thread Fuzzyman
in as much as doing anything in Python is *really* doing it in C, surely ? Come to that, you're **really** doing it in machine code... All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Control if a input text is IP

2006-02-03 Thread Fuzzyman
try: return struct.unpack('!L', socket.inet_aton(ip.strip()))[0] except socket.error: # bug in inet_aton, corrected in Python 2.3 if ip.strip() == '255.255.255.255': return 0xL else: raise ValueError('Not a good dotted-quad IP: %s' % ip) return All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: would it be feasable to write python DJing software

2006-02-06 Thread Fuzzyman
builtin module md5) and a third party extension module written in C. All the logic you actually write is in pure python. If you write *your own extension module* in C, then you could rightly be described as doing it in C. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

UTF16, BOM, and Windows Line endings

2006-02-06 Thread Fuzzyman
for that platform should I make the line endings u'\r\n' ? (This sequence obviously encodes to four bytes in UTF16). I would only do this to ensure compatibility with other programs the user may use to create the text files. All the best, Fuzzyman http://www.voidspace.org.uk/python/in

Detecting line endings

2006-02-06 Thread Fuzzyman
27;\r' in text: text = text.replace('\r', '\n') ending = '\r' My worry is that if '\n' *doesn't* signify a line break on the Mac, then it may exist in the body of the text - and trigger ``ending = '\n'`` prematurely ? All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Detecting line endings

2006-02-06 Thread Fuzzyman
Sybren Stuvel wrote: > Fuzzyman enlightened us with: > > My worry is that if '\n' *doesn't* signify a line break on the Mac, > > then it may exist in the body of the text - and trigger ``ending = > > '\n'`` prematurely ? > > I'd count the

Re: read file problem

2006-02-06 Thread Fuzzyman
re... That line should be : fileHandle = open(filePath, 'r') The '.read()' part returns the full file... so further reads have no effect. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Detecting line endings

2006-02-06 Thread Fuzzyman
Sybren Stuvel wrote: > Fuzzyman enlightened us with: > > My worry is that if '\n' *doesn't* signify a line break on the Mac, > > then it may exist in the body of the text - and trigger ``ending = > > '\n'`` prematurely ? > > I'd count the

Re: UTF16, BOM, and Windows Line endings

2006-02-06 Thread Fuzzyman
Neil Hodgson wrote: > Fuzzyman: > > > How should I handle line-endings for UTF16 ? Is it possible that other > > programs (on windows) will have line endings as u'\r\n' ? > > Yes, try Notepad and save as Unicode. For the text > > Fuzzy > End of li

Re: UTF16, BOM, and Windows Line endings

2006-02-07 Thread Fuzzyman
Neil Hodgson wrote: > Fuzzyman: > > > Thanks - so I need to decode to unicode and *then* split on line > > endings. Problem is, that means I can't use Python to handle line > > endings where I don't know the encoding in advance. > > > > In another thr

Re: Detecting line endings

2006-02-07 Thread Fuzzyman
Alex Martelli wrote: > Fuzzyman <[EMAIL PROTECTED]> wrote: > > > Hello all, > > > > I'm trying to detect line endings used in text files. I *might* be > > decoding the files into unicode first (which may be encoded using > > Open the file with

Re: Detecting line endings

2006-02-07 Thread Fuzzyman
Alex Martelli wrote: > Fuzzyman <[EMAIL PROTECTED]> wrote: > > > Hello all, > > > > I'm trying to detect line endings used in text files. I *might* be > > decoding the files into unicode first (which may be encoded using > > Open the file with

Re: Detecting line endings

2006-02-07 Thread Fuzzyman
Bengt Richter wrote: > On 6 Feb 2006 06:35:14 -0800, "Fuzzyman" <[EMAIL PROTECTED]> wrote: > > >Hello all, > > > >I'm trying to detect line endings used in text files. I *might* be > >decoding the files into unicode first (which may be encoded us

Re: Detecting line endings

2006-02-07 Thread Fuzzyman
Alex Martelli wrote: > Fuzzyman <[EMAIL PROTECTED]> wrote: >... > > > Open the file with 'rU' mode, and check the file object's newline > > > attribute. > > > > Do you know if this works for multi-byte encodings ? Do files have > >

Re: Detecting line endings

2006-02-08 Thread Fuzzyman
Alex Martelli wrote: > Fuzzyman <[EMAIL PROTECTED]> wrote: >... > > I can't open with a codec unless an encoding is explicitly supplied. I > > still want to detect UTF16 even if the encoding isn't specified. > > > > As I said, I ought to tes

Re: module with __call__ defined is not callable?

2006-02-08 Thread Fuzzyman
ad to code Python so that it raised an error when you try to call > a module object. Is there a reason why module() should not execute > module.__call__()? I would have thought that by the duck typing principle, > it shouldn't matter whether the object was a class, a module or an int, i

Re: Detecting line endings

2006-02-08 Thread Fuzzyman
Alex Martelli wrote: > Fuzzyman <[EMAIL PROTECTED]> wrote: >... > > > Open the file with 'rU' mode, and check the file object's newline > > > attribute. > > Just to confirm, for a UTF16 encoded file, the newlines attribute is ``None``.

Re: Detecting line endings

2006-02-08 Thread Fuzzyman
Fuzzyman wrote: > Alex Martelli wrote: > > Fuzzyman <[EMAIL PROTECTED]> wrote: > >... > > > > Open the file with 'rU' mode, and check the file object's newline > > > > attribute. > > > > > Just to confirm, for a UTF16

Re: module with __call__ defined is not callable?

2006-02-08 Thread Fuzzyman
Steve Holden wrote: > Fuzzyman wrote: > > Steven D'Aprano wrote: > > > >>On Wed, 08 Feb 2006 13:58:13 +1100, Delaney, Timothy (Tim) wrote: > >> > >> > >>>adam johnson wrote: > >>> > >>> > >>>>

Re: line wrapping problem

2006-02-09 Thread Fuzzyman
way is to write to yhour file object using : mytextfile.write( mytextfile, "%s" % mydictionary[x],) All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml > > I am getting line breaks before my explicit line break. Am I > unwittingly copying '\n' c

Re: Determining an operating system's default browser

2006-02-10 Thread Fuzzyman
to have these html help pages open in the default browser when > selected from the application's Help menu > > If python can determine the path to the default browser, I can then just > spawn it. > The module webrowser module does this - and I use it for exactly this purpose. :-)

Re: Downloading Large Files -- Feedback?

2006-02-13 Thread Fuzzyman
lib2.urlopen("http://www.python.org/blah/blah.zip";) g = '' while True: a = f.read(1024*10) if not a: break print 'Read another 10k' g += a file = open("blah.zip", "wb") file.write(g) file.close() All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml > Thanks for any pointers. I'm busily Googling away. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to *Search* with google from inside my programme and get the search result?

2006-02-15 Thread Fuzzyman
need some hints. If you'd like a (simple) example of using the google webservice, have a look at googlerank - htpp://www.voidspace.org.uk/python/recipebook.shtml#google In practise I've found the yahoo web services faster, simpler and less restrictive, so you may want to try that.

[ANN] Movable Python 1.0.1

2006-02-15 Thread Fuzzyman
I'm pleased to be able to announce the release of `Movable Python 1.0.1 `_. This includes the release of **Movable Python** for Python 2.2. To obtain it, visit the `Movable Python Shop `_. Existing users of Movab

Re: Pythonic gui format?

2006-02-15 Thread Fuzzyman
your GUI and Python - but your approach of using XML has the same drawback. Storing your 'GUI configuration' in a text based format is a nice idea, but you will need *something* to do the translation. http://www.voidspace.org.uk/python/configobj.html All the best, Fuzzyman http://w

Re: Pythonic gui format?

2006-02-15 Thread Fuzzyman
bruno at modulix wrote: > Fuzzyman wrote: > (snip) > > > You say you don't want an 'extra layer' between your GUI and Python - > > but your approach of using XML has the same drawback. Storing your 'GUI > > configuration' in a text based for

Re: web crawler in python or C?

2006-02-16 Thread Fuzzyman
type in Python (which will be much more fun than in C) then test. Profile to find your real bottlenecks (if the Python one isn't fast enough - which it may be), and move your bottlenecks to C. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml > should i decide what

Re: HTTP & tcl

2006-02-16 Thread Fuzzyman
xample to accept additional content encodings), specify skip_host or skip_accept_encoding with non-False values. Changed in version 2.4: skip_accept_encoding argument added. In other words - you're creating an HTTP connection and request. You'll need to find an 'equivalent' lib

Re: question about scope

2006-02-16 Thread Fuzzyman
m could raise a NameError. if False: test = 'something' print test All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Evil, evil wxPython (and a glimmer of hope)

2006-02-17 Thread Fuzzyman
jects with it. The code is relatively simple - so it would be easy to maintain the parts you use if that was necessary. Certainly easier than duplicating it yourself from scratch. :-) Once you start using Wax, it really is simple and friendly. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Evil, evil wxPython (and a glimmer of hope)

2006-02-17 Thread Fuzzyman
[EMAIL PROTECTED] wrote: > [EMAIL PROTECTED] wrote: > > Fuzzyman wrote: > > > > > The code is relatively simple - so it would be easy to maintain the > > > parts you use if that was necessary. Certainly easier than duplicating > > > it yourself from sc

[ANN] Movable python Trial Version

2006-02-18 Thread Fuzzyman
etail.php/734815>`_. You can obtain the full version from the `Groups Page <http://voidspace.tradebit.com/groups.php>`_. It is set to expire on the 22nd May, and displays a nag screen on startup. Other than that, it is the full version. Have fun. Fuzzyman http://www.voidspace.org.uk/

Re: Movable python Trial Version

2006-02-18 Thread Fuzzyman
Felipe Almeida Lessa wrote: > Em Sáb, 2006-02-18 às 04:24 -0800, Fuzzyman escreveu: > > It is set to expire on the 22nd May, and displays a nag screen on > > startup. Other than that, it is the full version. Have fun. > > Attached is the cracked version with no expira

[ANN] ConfigObj 4.2.0

2006-02-19 Thread Fuzzyman
`ConfigObj 4.2.0 `_ is now available. The main improvements are *full* Unicode support,a s well as the addition of the 'convenience' `Section Methods `_ * *as_bool* * *as_int* * *

Re: Format file size for printing

2006-02-20 Thread Fuzzyman
does this. http://www.voidspace.org.uk/python/pathutils.html All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Komodo - Will it Lock Me In?

2006-02-20 Thread Fuzzyman
tions you could consider Movable Python. You'll need to buy a license per *target* machine, but it's a full distribution of Python - so doesn't need the 'build' phase of deploying with py2exe. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml > Thanks, > Matt -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie question: Multiple installations of Python on Windows machines

2006-02-21 Thread Fuzzyman
e.org.uk/python/movpy/ You'll still have to get at the application files though. I have a VMWare install with Python 2.3 on it, so I may be able to help. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml > Thanks, > > Don. -- http://mail.python.org/mailman/listinfo/python-list

Re: changing value of 'self' when subclassing int

2006-02-21 Thread Fuzzyman
nt done as a method call which returns the new value. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml > Thanks for your help, > David Coffin > > -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie question: Multiple installations of Python on Windows machines

2006-02-22 Thread Fuzzyman
Don Taylor wrote: > Fuzzyman wrote: > > > A lot of 'exe' installers are special types of zip archvies. You might > > be able to open it using winzip or winrar and do a manual install. > > Interesting suggestion that would never have occured to me. One of the &g

Re: ConfigParser and unicode: a simple solution?

2006-02-22 Thread Fuzzyman
e.org.uk/python/configobj.html > http://sourceforge.net/projects/configobj > Hey cool, I didn't even have to promote it myself ;-) The 4.2.0 release has full unicode support, this isn't *yet* up on sourceforge, but will be as soon as I get a moment. In the meantime the new relea

Re: Multiple versions of Python / PythonWin on the same machine?

2006-02-24 Thread Fuzzyman
e to machine on a USB key. http://www.voidspace.org.uk/python/movpy/ All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: An isalpha() that accepts underscores as well

2006-02-26 Thread Fuzzyman
ethod 'isalpha' is implemented in C, and so will be quicker than any pure Python alternative. The following will work, and probably only be twice as slow as 'isalpha' :-) : def alfa(w): return w.replace('_', '').isalpha() Fuzzyman http://www.voidspace.org.uk/python/index.shtml > -- > lg -- http://mail.python.org/mailman/listinfo/python-list

SyntaxError: can't assign to a function call

2006-02-26 Thread Fuzzyman
What gives ? >>> a = [] >>> def f(): return a >>> f() [] >>> a.append(3) >>> f() [3] >>> a += [3] >>> a [3, 3] >>> f() [3, 3] >>> f() += [4] SyntaxError: can't assign to function call >>>

Re: SyntaxError: can't assign to a function call

2006-02-26 Thread Fuzzyman
Alex Martelli wrote: > Fuzzyman <[EMAIL PROTECTED]> wrote: > > > What gives ? >... > > >>> a = [] > > >>> def f(): > > return a >... > > >>> f() += [4] > > SyntaxError: can't assign to function c

Re: Default Section Values in ConfigParser

2006-03-01 Thread Fuzzyman
'teamnumber': 'team number here', 'update_interval' : 'update interval'} } # user_values = ConfigObj(filename) cfg = ConfigObj(default_values) cfg.merge(user_values) All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml > Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Voidspace Python Guestbook 1.4.1 (etc)

2005-05-03 Thread Fuzzyman
#~$%"£&# Very sorry about that. Fuzzyman http://www.voidspace.org.uk/python -- http://mail.python.org/mailman/listinfo/python-list

Re: sorting list and then return the index of the sorted item

2005-05-03 Thread Fuzzyman
I'd map the values to their index in a dictionary, then sort the list, and from the sorted list fetch all the indexes from the dictionary. Something like : >>> a = [2,3,1,4,5] >>> b = list(a) >>> b.sort() >>> b [1, 2, 3, 4, 5] >>> indexDict = dict([ (value, index) for index, value in enumerate(a)]

[ANN] Voidspace Guestbook 1.4.2

2005-05-05 Thread Fuzzyman
.html Example : http://www.voidspace.org.uk/cgi-bin/voidspace/guestbook2.py Quick Download : http://www.voidspace.org.uk/cgi-bin/voidspace/downman.py?file=guestbook.zip I might even have spelt my domain name right this time... Best Regards, Fuzzyman http://www.voidspace.org.uk/python --

Re: path(file)

2005-05-09 Thread Fuzzyman
Can you give us an example of the way the 'list of files' is stored in. import os print os.path.abspath(filename) Will do *something*... so long as 'filename' contains a path relative to the current working directory. What you want is undoubtably in the os and os.path modules. Regards, Fuzzy ht

ANN: rest2web 0.1.0

2005-05-09 Thread Fuzzyman
, over the next few months it will take over Lots of other features, tested on Linux and Windoze. Fuzzyman http://www.voidspace.org.uk/python -- http://mail.python.org/mailman/listinfo/python-list

Re: Serving binary data from a cgi-script

2005-05-11 Thread Fuzzyman
Yeah... I once spent ages going round in circles trying to track that down. A happy way to spend an evening... Regards, Fuzzy http://www.voidspace.org.uk/python -- http://mail.python.org/mailman/listinfo/python-list

Re: Just remember that Python is sexy

2005-05-24 Thread Fuzzyman
Scott Kirkwood wrote: > I often can't remember that to remove spaces from a string whether it's > strip() or trim(), and when finding patterns with the re library > whether it's find() or search() and when iterating over key, values of > a dictionary whether it's items() or entries(). > But then I

Re: how to convert string to list or tuple

2005-06-01 Thread Fuzzyman
flyaflya wrote: > a = "(1,2,3)" > I want convert a to tuple:(1,2,3),but tuple(a) return ('(', '1', ',', > '2', ',', '3', ')') not (1,2,3) Probably a bit late... but there's always listquote - It's part of the pythonutils module. http://www.voidspace.org.uk/python/pythonutils.html It will turn st

Re: help with sending mail in Program

2005-06-07 Thread Fuzzyman
Ivan Shevanski wrote: > Hey i'm new here and relatively new to python. I've made a few small > programs and now I'm making a program for my friends that at the end has a > feedback form. I want to send the feedback back to my email adress. I know > I should use the SMTP module and I have figur

Re: Saving/retrieving user preferences

2005-06-09 Thread Fuzzyman
ConfigObj is a nice way of reading/writing text config files. It's case insensitive and handles quoting of keywords/values. Reading and writing config files are single line commands. You get access to keyword values using a dicitionary interface. Values can be single values or lists (including

ANN: rest2web, firedrop2, textmacros

2005-06-15 Thread Fuzzyman
s than you could possibly want. __ http://docutils.sourceforge.net __ http://www.voidspace.org.uk/python/rest2web Best Regards, Fuzzyman http://www.voidspace.org.uk/python -- http://mail.python.org/mailman/listinfo/python-list

Re: log in to a website

2005-06-17 Thread Fuzzyman
dspace.org.uk/python/articles/authentication.shtml Best Regards, Fuzzyman http://www.voidspace.org.uk/python -- http://mail.python.org/mailman/listinfo/python-list

Re: Using httplib to read a file online

2005-06-17 Thread Fuzzyman
Why are you using httplib rather than urllib2 ? Best Regards, Fuzzy http://www.voidspace.org.uk/python -- http://mail.python.org/mailman/listinfo/python-list

Re: configparser shuffles all sections ?

2007-06-22 Thread Fuzzyman
> self._defaults = odict() > > This might be good alternative, > I'll check that. > > thank you all for the answers, > it's always good to know that I've not missed the simple solution ;-) There's one simple solution - ConfigObj. It is a config f

Re: configparser shuffles all sections ?

2007-06-22 Thread Fuzzyman
On Jun 23, 1:14 am, Fuzzyman <[EMAIL PROTECTED]> wrote: > On Jun 22, 8:28 pm, Stef Mientki <[EMAIL PROTECTED]> > wrote: > > > > > Nick Craig-Wood wrote: > > > stef <[EMAIL PROTECTED]> wrote: > > >> I just used configparser for the first

Re: eggs considered harmful

2007-06-25 Thread Fuzzyman
ways round this. For most non-esoteric eggs it should be possible to create an ordinary installation tarball from an egg. If you do easy_install of a project into a bare Python installation (a VM instance for example) then you should be able to see which dependencies are fetched. If this is too m

Re: CGI Script using Python

2007-04-19 Thread Fuzzyman
sents files for download. http://www.voidspace.org.uk/python/cgi.shtml#downman You will want to copy the part that sends the right headers (etc)... Fuzzyman > Thanx > Ralf -- http://mail.python.org/mailman/listinfo/python-list

Re: When are immutable tuples *essential*? Why can't you just use lists *everywhere* instead?

2007-04-20 Thread Fuzzyman
*is* used in practice. > Yup - using tuples as dictionary keys is very common. Fuzzyman http://www.voidspace.org.uk/python/index.shtml > Regards, > > Björn > > -- > BOFH excuse #14: > > sounds like a Windows problem, try calling Microsoft support -- http://mail.python.org/mailman/listinfo/python-list

Re: No speedup on multi-processor machine?

2007-04-21 Thread Fuzzyman
Don't use the common "CPython" (eg, the Python built from C-language > source using the C-runtime library). Jython (a version that runs on the > JVM, using Java libraries) may not be afflicted with the GIL. > IronPython is *definitely* not restricted by the GIL. Fuzzyman http://www.voidspace.org.uk/ironpython/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: CGI Script using Python

2007-04-21 Thread Fuzzyman
script can send a file in response to an automated request from a client application, without ever needing a browser to be involved. Sending the right headers means that existing libraries (urllib2 I guess) will know how to handle the response. Fuzzyman http://www.voidspace.org.uk/python/ar

Re: No speedup on multi-processor machine?

2007-04-21 Thread Fuzzyman
On Apr 22, 1:03 am, Neil Hodgson <[EMAIL PROTECTED]> wrote: > Fuzzyman: > > > IronPython is *definitely* not restricted by the GIL. > > IronPython is currently mostly slower than CPython although the > particular problem should be tested to see if IronPython

Re: No speedup on multi-processor machine?

2007-04-22 Thread Fuzzyman
On Apr 22, 1:03 am, Neil Hodgson <[EMAIL PROTECTED]> wrote: > Fuzzyman: > > > IronPython is *definitely* not restricted by the GIL. > > IronPython is currently mostly slower than CPython although the > particular problem should be tested to see if IronPython

[ANN] Pythonutils 0.3.0

2007-04-22 Thread Fuzzyman
There is a new (and long overdue) release of the `Pythonutils module `_. This is version **0.3.0**. * `Quick Download: Pythonutils 0.3.0.zip `_ What

Re: No speedup on multi-processor machine?

2007-04-24 Thread Fuzzyman
On Apr 23, 9:52 pm, Klaas <[EMAIL PROTECTED]> wrote: > On Apr 21, 5:14 pm, Fuzzyman <[EMAIL PROTECTED]> wrote: > > > Additionally, extending IronPython from C# is orders of magnitude > > easier than extending CPython from C. > > Given the existence of Pyrex, t

Re: EuroPython vs PyconUK

2007-04-26 Thread Fuzzyman
y though, it is *great* to see the UK Python scene flourishing (and the Italian one). The more events that happen the better, and I don't think they need be in competition with each other... I *hope* the Europython guys don't see it like that. Fuzzyman http://www.voidspace.org.uk/ironpyth

Re: My python annoyances so far

2007-04-26 Thread Fuzzyman
4). > I can understand this one. I don't have a problem with this myself, but a lot of people find the proliferation of underscores in Python bewildering. All I can say about it is that you soon get used to it - and the separation is a good enough reason for me. Fuzzyman http://www.voidspa

Re: Microsoft's Dynamic Languages Runtime (DLR)

2007-05-02 Thread Fuzzyman
version of VB) The DLR provides a dynamic type system and hosting environment for dynamic languages. The nice part is that the DLR runs on top of the 'Core CLR' which ships with Silverlight. This means that apps. that run in Silverlight are secure - so you can run an IronPython console i

Re: Microsoft's Dynamic Languages Runtime (DLR)

2007-05-04 Thread Fuzzyman
release, and that it also runs on top of the core CLR shipped with SilverLight meaning that for the first time sandboxed Python scripts can run in the browser... It would seem entirely on topic for a Python newsgroup very on- topic... Fuzzyman http://www.voidspace.org.uk/ironpython/index.shtml >

Re: How do I get type methods?

2007-05-04 Thread Fuzzyman
On May 3, 8:33 pm, [EMAIL PROTECTED] wrote: > Hello! > > If I do > > import uno > localContext=uno.getComponentContext() > dir(type(localContext)) Perhaps ? Fuzzyman http://www.voidspace.org.uk/ironpython/index.shtml > then localContext is of type > I guess it

Re: Microsoft's Dynamic Languages Runtime (DLR)

2007-05-04 Thread Fuzzyman
On May 4, 10:39 pm, Steven Howe <[EMAIL PROTECTED]> wrote: > Fuzzyman wrote: [snip ...] > > >> You are childishly beckoning Usenet etiquette to be gone so that you > >> may do whatever you wish. But I trust that you will not, out of spite > >> for being re

Re: Microsoft's Dynamic Languages Runtime (DLR)

2007-05-04 Thread Fuzzyman
itive move from them. As for SilverLight, there will probably be a fully open implementation by the end of the year. Fuzzyman http://www.voidspace.org.uk/ironpython/index.shtml > but it remains on-topic for > comp.lang.python, I guess. > > Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I use the config parser?

2007-05-05 Thread Fuzzyman
You could do it simply with ConfigObj ( http://www.voidspace.org.uk/python/configobj.html ): from configobj import ConfigObj config = ConfigObj(filename) section = config['Section Name'] value = section['value'] section['value'] = newValue confi

Re: Wing IDE for Python v. 3.0 beta1 released

2007-08-01 Thread Fuzzyman
> > I had no problems with their support whatsoever, really good in my > opinion. They were very responsive and addressed all my questions > over about a 3 or 4 day email conversation. > > -- > Greg Donaldhttp://destiney.com/ I'll third that. I have had excellent and extended

Which will come first: Perl 6 or Python 3000?

2007-04-01 Thread Fuzzyman
http://home.inklingmarkets.com/market/show/4018 (Interesting site by the way - although a bit heavily weighted towards US politics for my tastes). Anyway, I know which way my money is going :-) Fuzzyman http://www.voidspace.org.uk/python/articles.shtml -- http://mail.python.org/mailman

Re: Why NOT only one class per file?

2007-04-04 Thread Fuzzyman
eping stub classes (exceptions for example) in the same file is a good thing. Diffing classes doesn't seem like a terribly good use-case: classes that are *that* similar badly need refactoring into less classes... Fuzzyman http://www.voidspace.org.uk/python/articles.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Why NOT only one class per file?

2007-04-04 Thread Fuzzyman
are > limited to a single module object per file (modulo extreme trickery). > > If you want to define a bunch of utility functions in python, you > write a file containing a single module with functions. > So Python has one less level of enforced nesting. :-) Fuzzyman http://www.voidspace.org.uk/python/articles.shtml > -Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: What happened to http://www.pythonware.com/daily and http://mechanicalcat.net/pyblagg.html?

2007-04-08 Thread Fuzzyman
On Apr 7, 3:44 pm, "asker" <[EMAIL PROTECTED]> wrote: > These sites are not updated since almost one month. > Does anybody knows why? I assume the pythonware folk are busy. I notice that Fredrik Lundh hasn't blogged for some time either. Fuzzyman http://www.

Re: newbie question: how to read back the dictionary from a file?

2007-04-16 Thread Fuzzyman
bj and its 'unrepr' mode gives you a useful (and simple) way of preserving and restoring basic Python datatypes. The file format is a very readable 'ini' format - and the basic interface is like a dictionary, for both writing and retrieving values. http://www.voidspace.org.uk/python/configobj.html Fuzzyman -- http://mail.python.org/mailman/listinfo/python-list

Re: Using python to create windows apps that everyone can use?

2007-09-20 Thread Fuzzyman
On Sep 20, 10:08 am, "exhuma.twn" <[EMAIL PROTECTED]> wrote: > On Sep 19, 9:46 pm, Simon Hibbs <[EMAIL PROTECTED]> wrote: > > > > > On 9/18/07, Thomas Harding <[EMAIL PROTECTED]> wrote: > > > > Hi guys, sorry to post another topic on this, as I am aware that it > > has > > > already been posted

Re: How to unload a module after I've imported it.

2007-09-30 Thread Fuzzyman
On Sep 29, 9:32 pm, marvinla <[EMAIL PROTECTED]> wrote: > Have you tried a del? > > >> import socket > >> dir() > > ['__builtins__', '__doc__', '__name__', 'socket']>> del socket > >> dir() > > ['__builtins__', '__doc__', '__name__'] > > See you! >>> import socket >>> import sys >>> 'socket' in sy

Re: Python Windows Installation

2007-10-26 Thread Fuzzyman
On Oct 25, 6:36 pm, TheFlyingDutchman <[EMAIL PROTECTED]> wrote: > On Oct 24, 11:22 pm, Tim Roberts <[EMAIL PROTECTED]> wrote: > > > TheFlyingDutchman <[EMAIL PROTECTED]> wrote: > > > >I am trying to install Python 2.5 on Windows XP. It installs into the > > >root directory on C:\ instead of C:\Pyt

Re: Automatic Generation of Python Class Files

2007-10-29 Thread Fuzzyman
On Oct 22, 6:43 pm, Steven Bethard <[EMAIL PROTECTED]> wrote: > Sunburned Surveyor wrote: > > Contents of input text file: > > > [Name] > > Fire Breathing Dragon > > > [Properties] > > Strength > > Scariness > > Endurance > > > [Methods] > > eatMaiden argMaiden > > fightKnight argKnight > > > Gener

<    1   2   3   4   5   6   7   8   9   >