Northampton, UK

2005-04-12 Thread Fuzzyman
Just on the off chance I thought I'd ask if there were any Pythoneers out there local to Northampton UK ? Best Regards, Fuzzy http://www.voidspace.org.uk/python -- http://mail.python.org/mailman/listinfo/python-list

Northampton, UK

2005-04-12 Thread Fuzzyman
Just on the off chance I thought I'd ask if there were any Pythoneers out there local to Northampton UK ? Best Regards, Fuzzy http://www.voidspace.org.uk/python -- http://mail.python.org/mailman/listinfo/python-list

Re: Northampton, UK

2005-04-13 Thread Fuzzyman
Martin Franklin wrote: > Fuzzyman wrote: > > Just on the off chance I thought I'd ask if there were any > > Pythoneers out there local to Northampton UK ? > > > > Best Regards, > > > > Fuzzy > > http://www.voidspace.org.uk/python > > &g

Re: Python Google Server

2005-04-20 Thread Fuzzyman
Thanks Benji, It returns the results using an ip address - not the google domain. This means IPCop bans it :-( Thanks for the suggestion though. In actual fact the googleCacheServer works quite well. Best Regards, Fuzzy http://www.voidspace.org.uk/python/weblog -- http://mail.python.org/mailm

Re: HTML cleaner?

2005-04-25 Thread Fuzzyman
I *just* wrote something that does this. It uses the htmldata module - you can find that using pypi. It only allows a specific set of html tags and attempts to close tags not closed. : from htmldata import tagextract, tagjoin allowed_tags = ['br', 'b', 'strong', 'em', 'i', 'u', 'tt', 'a', 'big',

Re: bytecode non-backcompatibility

2005-04-25 Thread Fuzzyman
Maurice LING wrote: > Hi, > > I've been using Python for about 2 years now, for my honours project and > now my postgrad project. I must say that I am loving it more and more > now. From my knowledge, Python bytecodes are not back-compatible. I must > say that my technical background isn't strong

Re: interactive web graphics

2005-04-28 Thread Fuzzyman
Hello Michael, Eckhoff, Michael A wrote: > Hello, > > I failed to locate a list for pygtk, so I thought I'd > ask my question here. Is it possible to write CGI > scripts that bring up a GUI (as in GTK+, QT, Tk, ...) > or an openGL display that is windowed inside a web > browser? > > The answer wou

Re: Trying to write CGI script with python...

2005-04-29 Thread Fuzzyman
If you just want to wrap an existing python script - but pass arguments from a web interface, it ought to be very easy. You'll need to understand CGI of course. There's a good free article about getting started with CGI over at PyZine ( http://www.pyzine.com ) ;-) Can you confirm that your CGI is

[ANN] Voidspace Python Guestbook 1.4.1 (etc)

2005-04-29 Thread Fuzzyman
My Honoured Guests = Yup... the time has come, **The Voidspace Python Guestbook 1.4.1** has been released into the wild. * `The Guestbook Homepage`__ * `Quick Download Link (120k)`__ * `Plain Guestbook Example`__ * `Voidspace Guestbook`__ [#]_ __ http://www.voidsapce.org.uk/p

Re: Python IDE

2005-12-16 Thread Fuzzyman
SPE is very good - I'd use it, and if you need any features Stani is very quick to add them. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Parser or regex ?

2005-12-16 Thread Fuzzyman
it is a single argument, keyword argument or list constructor. For keyword arguments and lists constructors I use another regular expression (the appropriate part of _paramstring basically) to pull out the values from that. Now this approach works - but it's hardly "optimal" (for some value of optimal). I wondered if anyone could suggest a better approach. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Parser or regex ?

2005-12-16 Thread Fuzzyman
Tim Arnold wrote: > "Fuzzyman" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Hello all, > > > > I'm writing a module that takes user input as strings and (effectively) > > translates them to function calls with arguments and k

Re: Parser or regex ?

2005-12-16 Thread Fuzzyman
Fredrik Lundh wrote: > Fuzzyman wrote: [snip..] > > I'd use some variation of: > > http://online.effbot.org/2005_11_01_archive.htm#simple-parser-1 > > (that version can parse tuples, but it should be too hard to extend > it to handle keyword arguments) > T

ANN: Pythonutils 0.2.5

2005-12-19 Thread Fuzzyman
`Pythonutils 0.2.5 `_ is now available. **Pythonutils** is a pure-Python package containing several modules that help with common programming tasks in Python. This new release updates to : * **ConfigObj** 4.1.0 * **odict** 0.2.1 * **validate**

Re: reading files

2005-12-19 Thread Fuzzyman
ess (for reading or writing) and still read (or write to) it from another process. FIle locking nightmare ahoy... You can obtain locks from the operating system though. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Parsing a date-time string?

2005-12-21 Thread Fuzzyman
Quick response - there is a DateUtil module with a *very* flexible string-to-date parser. It will almost certainly do what you want : http://labix.org/python-dateutil All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido at Google

2005-12-21 Thread Fuzzyman
tware systems. (Summer of Code not-withstanding of course). I wonder if this heralds google finally upgrading from Python 2.2 ;-) All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Which Python web framework is most like Ruby on Rails?

2005-12-21 Thread Fuzzyman
MIT license is even *less* restrictive. I would use one or other of these two. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido at Google

2005-12-21 Thread Fuzzyman
Alex Martelli wrote: > Fuzzyman <[EMAIL PROTECTED]> wrote: > > > That's potentially very good news. (Or slightly sinister -depending on > > your paranoia levels). > > > > You got any references on that ? > > I don't think there was any offici

Re: Guido at Google

2005-12-22 Thread Fuzzyman
ute your contribution to the world of open source in general. I'm hopeful that the employing Guido will lead to a more tangible bias in favour of Python ;-) All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml > Cheers, > -g -- http://mail.python.org/mailman/listinfo/python-list

Re: Detect File System changes

2005-12-23 Thread Fuzzyman
extensions expose this capability for windows. I hope this helps your googling. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: run line or selection

2005-12-29 Thread Fuzzyman
SPE has that - see http://www.stani.be/python/spe/blog/ It's a *very* nice Python IDE, and has recently had some pretty cool features added. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: some suggestions about GUI toolkits?

2005-12-29 Thread Fuzzyman
de to look nice - and has the easiest learning curve (and a much lower installation overhead than the others, because it comes with most distributions of Python). All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: reading files into dicts

2005-12-30 Thread Fuzzyman
ticle suggests a way round that, at the expense of readability of the resulting text file. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Application Portability?

2005-12-30 Thread Fuzzyman
2.4.2 port. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Photogallery written in Python?

2006-01-04 Thread Fuzzyman
application, it is more suited for merging galleries into existing sites. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Spiritual Programming (OT, but Python-inspired)

2006-01-04 Thread Fuzzyman
eive to be our 'self'. c.f. the research that Jung did to demostrate the common unconscious. (The individual psyche has it's roots in something much wider than the individual). All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Win32 Binary-only for 2.3.x?

2006-01-04 Thread Fuzzyman
ies without needing to install Python. http://www.voidspace.org.uk/python/movpy/ It has a funky GUI program launcher and is integrated with SPE to make a portable development environment that will work from a USB key. All the Best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- ht

Re: PyHtmlGUI Project is looking for developers

2006-01-05 Thread Fuzzyman
This is a *great* idea. Shame you've chosen Qt as your GUI API though. ;-) All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: How to Retrieve Data from an HTTPS://URL

2006-01-06 Thread Fuzzyman
It certainly *should* work - have you tried with urllib2 ? I assume the page works when fetched with a browser ? You don't have any proxy settings do you (Python can pick up on these automatically) ? What error are you getting (or what value in data) ? All the best, Fuzzyman

Re: Removing Duplicate entries in a file...

2006-01-06 Thread Fuzzyman
ored_dict file_object = open(filename, 'wb') cPickle.dump(stored_dict, file_object) file_object.close() Any reason why that shouldn't do what you want ? All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Spelling mistakes!

2006-01-06 Thread Fuzzyman
ns to me in practise and is easy to fix. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: How run web software *locally* easily?

2006-01-07 Thread Fuzzyman
older that just has stuff you're working on. It looks in the development folder first. The HTTPServer classes make great base classes for messing around with your own custom implementations for testing. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.pyt

Re: Working Firedrop2 anywhere?

2006-01-07 Thread Fuzzyman
://www.voidspace.org.uk/cgi-bin/voidspace/downman.py?file=firedrop2.zip Let me know if this doesn't work for you. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Win32 Binary-only for 2.3.x?

2006-01-07 Thread Fuzzyman
Out of interest, doesn't the Python binary use the registry (and environment variables) for building sys.path ? Won't you still have conflicting path issues if you use an alternative binary with an existing 'normal' install ? All the best, Fuzzyman http://www.voidspace.org.u

Re: CGI question

2006-01-07 Thread Fuzzyman
. See http://www.voidspace.org.uk/python/cgiutils.html The cgi module handles parsing hte query string for you. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Path and Unicode woes

2006-01-07 Thread Fuzzyman
Not full help - but still a pointer. E%3A/ isn't a unicode issue - but a value that is HTML escaped. MEaning (I presume without looking it up) 'E:/' - your file path. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Quickest way to make py script Web accessible

2006-01-07 Thread Fuzzyman
. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Detecting Python Installs from the Windows Registry

2006-01-07 Thread Fuzzyman
ocation of install) for all versions of Python installed (and also which is the most recent) ? Googling the group didn't quickly turn up the answer, and I thought *someone* was likely to know easily... Thanks Fuzzyman http://www.voidspace.org.uk/python/idnex.shtml -- http://mail.python.org/m

Re: multiple clients updating same file in ftp

2006-01-07 Thread Fuzzyman
ing and attempting to create). If two "mkdir"s occur simultaneously then it is up to the OS to return an error to one of them. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml >-- > Mike Meyer <[EMAIL PROTECTED]>

Re: string to datetime parser?

2006-01-09 Thread Fuzzyman
3-28 >1996.Feb.29 (Thu) 16:45:23.7 > >Is there anything like that out there? My Google can't find anything >useful ... There is a module called DateUtil which will do *most* of what you want. (Possibly all). I can't recall the URL, but google should turn it up for you

Re: Detecting Python Installs from the Windows Registry

2006-01-10 Thread Fuzzyman
Great, I'll work with this. Thanks Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Why keep identity-based equality comparison?

2006-01-10 Thread Fuzzyman
ey aren't of the same type, then the answer to : a == b is obviously False. Otherwise I have to wrap the test in a ``try...except`` block or compare type (and possibly then compare value). Both of which are more verbose. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Why keep identity-based equality comparison?

2006-01-10 Thread Fuzzyman
ch as a spark plug and a cam shaft, it is one thing to > say that the two are not the same object; it is quite another to say > that one is 'greater than' or 'less than' the other. > I agree. If a and b are of incomparable types, then a != b is True but a < b is me

Re: Client side web programming

2006-01-10 Thread Fuzzyman
And this one for cookie handling: http://www.voidspace.org.uk/python/articles/cookielib.shtml All the best, Fuzzyman -- http://mail.python.org/mailman/listinfo/python-list

Re: New Python.org website ?

2006-01-11 Thread Fuzzyman
Now that is a very cool site. I'm not very good with HTML - but can write content... I might see if there is something I can do. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml (and yes I do get referrals from these links...) -- http://mail.python.org/mailman/lis

Re: How can I test if an argument is a sequence or a scalar?

2006-01-11 Thread Fuzzyman
That's a neat little piece of code there. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: New Python.org website ?

2006-01-11 Thread Fuzzyman
Content in ReST - iot ought to be using rest2web then. ;-) Fuzzyman http://www.voidspace.org.uk/python/rest2web/ -- http://mail.python.org/mailman/listinfo/python-list

Re: New Python.org website ?

2006-01-11 Thread Fuzzyman
Steve Holden wrote: > Fuzzyman wrote: > > Now that is a very cool site. > > > > I'm not very good with HTML - but can write content... I might see if > > there is something I can do. > > > > All the best, > > > > Fuzzyman > > http:/

Re: how do "real" python programmers work?

2006-01-13 Thread Fuzzyman
realize this is a pretty newbie question, but it could possibly save > me hours of time if there is a better way to work. > SPE (the IDE) has several nice ways of running code - including launching it as an external file. This is what I use for almost all my development. All the best, Fuz

Re: New Python.org website ?

2006-01-13 Thread Fuzzyman
Tim Parkin wrote: [snip..] > Hi Fuzzyman, > > Thanks for the feedback and volunteering to contribue... The list of > already built sections is not really up to date but I have added a few > tickets to the trac on some sections of content that need working on. If Great - can yo

Re: ConfigParser: writes a list but reads a string?

2006-01-16 Thread Fuzzyman
o create a subsection cfg['test'] = {} cfg['test']['testlist'] = t1 cfg.write() To read it back in : from configobj import ConfigObj cfgfile = "cfgtest.ini" cfg = ConfigObj(cfgfile) print cfg['test']['testlist'] http://ww

Re: Linking to Python for Windows CE

2006-01-16 Thread Fuzzyman
or Windows CE and there was concern about moving the macros required to do this into the main source, which is why it is a separate project. The current latest version is 2.3.5 - but this may change soon. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.

Re: ConfigParser: writes a list but reads a string?

2006-01-16 Thread Fuzzyman
'ini-like' format with an extended syntax for nested sections. The major differences are that you can have values in the root section, and you should use '=' as the ``keyword = value`` divider. All the best, Fuzzyman http://www.voidspace.org.uk/python/configobj.html -- ht

Re: Linking to Python for Windows CE

2006-01-16 Thread Fuzzyman
Hmmm... looks like you're already using this. Sorry. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: recursively removing files and directories

2006-01-16 Thread Fuzzyman
shutil.rmtree You might need an ``onerror`` handler to sort out permissions. There is one for just this in pathutils : 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

ANN: Firedrop2 0.1.3 the Python Blog Client

2006-01-17 Thread Fuzzyman
Firedrop2 has had a new release and a complete docs overhaul. The release is a minor update, but the new tutorial will take you from downloading and installing, through setting up your blog to making entries. http://www.voidspace.org.uk/python/firedrop2/ What's New ? == The new release

Re: Being unjust

2006-01-18 Thread Fuzzyman
till a fundamental philosophy question here. Other frameworks like Django and turbogears can't (as easily) share parts of applications designed for the other framework. It would be very difficult to jsutify including one over the other to include in the standard library. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml > -- http://mail.python.org/mailman/listinfo/python-list

Re: Nit: please don't user "it's" unless you can substitute "it is" without changing your inteded meaning.

2006-01-18 Thread Fuzzyman
posessive of a word per se? > E.g., the first letter of "it" is "i", but can one write that > as "it"'s first letter is "i," or it's first letter is "i" ? ;-) > And how many "it"s (?) are there in the previo

Re: Nit: please don't user "it's" unless you can substitute "it is" without changing your inteded meaning.

2006-01-18 Thread Fuzzyman
, Sells Books, and Leaves. > Which is however eminently more readable, except perhaps for the overlong introduction... All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml > rpd -- http://mail.python.org/mailman/listinfo/python-list

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread Fuzzyman
l elements of the lists. In Python the equality operator ('==') compares values. For sequence and mapping type objects this can be a (relatively) expensive operation. You are probably looking for the identity operator which just (effectively) compares pointers ('is'). a is b d

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread Fuzzyman
stract (where you are theoretically comparing objects you haven't specified the type of and *might* want to use '==' and *might* want to use 'is'). For practical purposes '==' will do what you want, unless you deliberately create buggy code to cause a problem wh

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread Fuzzyman
at in Python there is a lack of operator able to compare > values as it is the case in C and Javascript, simply because in Python > there are no really such things as values, so there is no need to > compare them. > Can you provide an example to clarify what you mean ? All the best, Fuzzy

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread Fuzzyman
ible if the object holding the integer value 1 is > created only once when a=[1] and reused when executing b=[1]. > So you're *really* saying that you want this : >>> a = 1 >>> b = 1 >>> a == b False ?? WTF Fuzzyman http://www.voidspace.org.uk/python/index.shtml > Claudio -- http://mail.python.org/mailman/listinfo/python-list

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread Fuzzyman
here ... > b=[1] gives the result : > axx b# False > a[0] xx b[0] # True What you're saying is that you don't consider a and b equal when they are container objects of the same type, with the same contents. That's very counter intuitive. All the best, Fuz

Re: Debugging python 2.2 code with Pydev

2006-01-18 Thread Fuzzyman
tch to SPE of course, which has many other advantages (otehr than being bundled with Movable Python) ;-) http://www.voidspace.org.uk/python/movpy/ http://pythonide.stani.be All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread Fuzzyman
[EMAIL PROTECTED] wrote: > Fuzzyman wrote: > > Claudio Grondi wrote: > > > Steve Holden wrote: > > [snip..] > > > The problem here is, that I mean, that in Python it makes no sense to > > > talk about a value of an object, because it leads to weird thi

Re: pythonic way of making a config module

2006-01-18 Thread Fuzzyman
natively, my usual reccomendation for a config file reader is ConfigObj... ;-) All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread Fuzzyman
, comparing strings using '==' compares for identity not equality (IIUC), giving *plenty* of room for confusion. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread Fuzzyman
;] a == b False (probably) Incorrectly using Python syntax for a C example of course :-) All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread Fuzzyman
Fuzzyman wrote: > I'm not familiar with the C basic datatypes - I assume it has an array > or list like object. > > Would it contain a sequence of poitners to the members ? In which case > they would only be equal if the pointers are the same. > > In this case : &

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread Fuzzyman
So you're no longer wanting to test for equality (as Fredrik has pointed out). All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread Fuzzyman
ld do just what C is doing in the > case of comparing two lists which are the same, but then the following > code could not be written: > [snip..] What you could do is define a subclass of list that compared for identity rather than comparing the contents of the list. Alternatively you could test the contents by identity. All the best, Fuzzyman http://www.voidspace.org.uk/python/idnex.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-18 Thread Fuzzyman
Fredrik Lundh wrote: > Fuzzyman wrote: > > > I'm not familiar with the C basic datatypes - I assume it has an array > > or list like object. > > > > Would it contain a sequence of poitners to the members ? In which case > > they would only be equal if t

Re: Debugging python 2.2 code with Pydev

2006-01-18 Thread Fuzzyman
I didn't mean the same *instance* of the interpreter - same executable would have been more appropriate I 'spose.. Fuzzy http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: web crawling.

2006-01-19 Thread Fuzzyman
Use BeautifulSoup to get all the image tags out of the html. You'll need to join the urls of the images to the url of the page (urlparse.urljoin off the top of my head). If you look at BeautifulSoup you will see how to get the 'src' reference of each image tag. All the best,

Re: Efficient implementation of deeply nested lists

2006-01-19 Thread Fuzzyman
you can't avoid the copy operation - but it is *probably* quicker than recomputing hte list. You should test this - as it might not be the case. Fuzzyman http://www.voidspace.org.uk/python/index.shtml > Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-19 Thread Fuzzyman
ent stupidity. Python doesn't have a comparison operator analagous to his reference languages - but IMHO Python is better here. He can achieve what he wants by subclassing the built in datatypes and overriding the comparison methods to behave as he desires. All the best, Fuzzyman http:/

Re: PyHtmlGUI Project is looking for developers

2006-01-19 Thread Fuzzyman
cation could be created for the Web or the desktop, just using the appropriate GUI toolkit (web or desktop). This wasa what I thought you were doing. With appropriate AJAX type calls it's not unfeasible. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml > Have a nice day, > > Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Can a simple a==b 'hang' in and endless loop?

2006-01-19 Thread Fuzzyman
Loops tend to be caused by function or method calls - so they add frames to the stack and get detected as recursion. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml > Claudio -- http://mail.python.org/mailman/listinfo/python-list

Re: Being unjust

2006-01-19 Thread Fuzzyman
ee as suitable candidates for inclusion in the standard library ? All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Finding the relative path of a file from a dir

2006-01-20 Thread Fuzzyman
pathutils has a function to do this (actually extracted from the path module). 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

Redirecting standard out in a single namespace

2006-01-20 Thread Fuzzyman
t my idea until later : __import = __import__ def __import__(name): if name == 'sys': return __import('newsys') else: return __import(name) import sys Is there another way to shadow the sys module from a single namespace ? All the best, Fuzzyman

Re: ConfigParser: writes a list but reads a string?

2006-01-21 Thread Fuzzyman
ard drive). Thanks > for the configObj suggestion, I'll look into that. > > making the config file XML and using xml.dom is another option, > although XML is a bit ugly to edit by hand. On the cookbook there is a serialize and de-serialize function that works with the basic datatypes,

Re: Redirecting standard out in a single namespace

2006-01-21 Thread Fuzzyman
wouldn't have a problem. :-) Changing the module will mean a great deal more to maintain, not less. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: How to generate graphics dynamically on the web using Python CGI script?

2006-01-21 Thread Fuzzyman
mage to output. Either that or the script can generate static images (and maybe do a cyclic cleanup) and put the correct URL into the image tags. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml > regards > Steve > -- > Steve Holden +44 150 684 7255 +1

Re: How to generate graphics dynamically on the web using Python CGI script?

2006-01-21 Thread Fuzzyman
mage to output. Either that or the script can generate static images (and maybe do a cyclic cleanup) and put the correct URL into the image tags. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml > regards > Steve > -- > Steve Holden +44 150 684 7255 +1

Re: Python shell interpreting delete key as tilde?

2006-01-21 Thread Fuzzyman
Fredrik Lundh wrote: [snip..] > > this page might help: > > http://www.ibb.net/~anne/keyboard.html > > or you could switch to a less lame operating system ;-) (duck). Not like you to duck when sending flames Fredrik ;-) Fuzzy > > -- http://mail.python.org/mailman/listinfo/python-list

Re: ValueError: need more than 3 values to unpack

2006-01-21 Thread Fuzzyman
unpack > >>> > > > > How do I solve this problem and change the program so it does not stop > if a data record has less than three DEPART values. > > Thanks for your help! > Sounds like homework ;-) if you do : values = line.split('\t') Then you have a list with all the separate values in it. You can then do the first line : f.write("" +values[0].strip() +"\n") Then the rest... for entry in values[1:]: f.write(">> " +entry.strip() +"\n") This will work whatever the number of values. It won't report any badly formed lines to you though. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml > Elezar -- http://mail.python.org/mailman/listinfo/python-list

sys.modules and __main__ obscureness

2006-07-16 Thread Fuzzyman
] This code behaves differently when entered into an interactive interpreter session. When run as a program you will see that module and namespace have both become None !! However the code works, but to get access to the namespace again I have to import __main__. I just wondered why ? All the best,

Re: sys.modules and __main__ obscureness

2006-07-16 Thread Fuzzyman
K.S.Sreeram wrote: > Fuzzyman wrote: > > This code behaves differently when entered into an interactive > > interpreter session. When run as a program you will see that module and > > namespace have both become None !! > > Thats because the reference count to the cur

Re: How to lock files (the easiest/best way)?

2006-07-17 Thread Fuzzyman
empts to create a directory will fail if the directory already exists - so pathutils does *slightly* more, but it's the same idea. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml > > Sybren > -- > The problem with the world is stupidity. Not saying there

Re: IronPython and scipy/pyExcelerator

2006-07-22 Thread Fuzzyman
re (currently) confusing. See http://groups.google.com/group/comp.lang.python/browse_frm/thread/842a8011a1a2a26c/9d7e157124943e9f and also search the IronPython mailing lists. Alternatively you could use interprocess communication between cPython and IronPython ;-) All the best, Fuzzyman

Functions and code objects

2006-07-27 Thread Fuzzyman
ount 1 >>> c.co_argcount = 0 Traceback (most recent call last): File "", line 1, in ? TypeError: readonly attribute >>> Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Functions and code objects

2006-07-27 Thread Fuzzyman
Fuzzyman wrote: > Hello all, > > I'm trying to extract the code object from a function, and exec it > without explicitly passing parameters. > > The code object 'knows' it expects to receive paramaters. It's > 'arg_count' attribute is read

Re: Functions and code objects

2006-07-27 Thread Fuzzyman
Fuzzyman wrote: > Fuzzyman wrote: > > Hello all, > > > > I'm trying to extract the code object from a function, and exec it > > without explicitly passing parameters. > > > > The code object 'knows' it expects to receive paramaters. It'

Re: Functions and code objects

2006-07-27 Thread Fuzzyman
Simon Forman wrote: > Fuzzyman wrote: [snip..] > > I was hoping I could get to the code object for the *body* of the > > function. Looks like that won't be possible without dis-assembling the > > bytecode or other tricks even more hackish than what I've already do

Re: Functions and code objects

2006-07-27 Thread Fuzzyman
Duncan Booth wrote: > Fuzzyman wrote: [snip..] > > Does this do what you wanted? Instead of messing about with the code object > just work out which values from the namespace the function actually > expects. > > >>> def callfromnamespace(fn, namespace): >

Re: Proposal for new option -U extending -u

2006-07-29 Thread Fuzzyman
Other than that I have no opinion (don't think I'd use it...). All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

[ANN] rest2web 0.5.0 Beta 1 Released

2006-08-06 Thread Fuzzyman
After five months there is finally a new release of `rest2web `_. This is **0.5.0 Beta 1**. There are an awful lot of changes and improvements, but there shouldn't be any backward compatability issues with previous versions. * `rest2web 0.5.0Beta1 zip

<    1   2   3   4   5   6   7   8   9   >