Re: Initializing the number of slots in a dictionary

2006-08-07 Thread Fuzzyman
ance is also likely to be different for vast data sets, but I understand the hashing algorithm to be very similar for both... Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Projects Continuous Integration

2006-08-07 Thread Fuzzyman
nuous integration. The combination is *great*. I've never had to configure it (I just poke it occassionally), but it *looks* like it should be usable with non .NET projects: we have it running all sorts of batch files and Python scripts as part of the built and test process. All the best, F

Re: hide python code !

2006-08-11 Thread Fuzzyman
buse your source code. Until you have *lots* of users this is probably enough. I never understand the knee-jerk reaction on this mailing list to answer people who ask this question by telling them they don't really want to do it... Fuzzyman http://www.voidspace.org.uk/python/index.shtm

Re: hide python code !

2006-08-11 Thread Fuzzyman
ication. Indeed, I'd recommend that any such > entrepreneur think twice about starting a traditional proprietary > software business in this day and age. > How many users did skype have before that happened... Several orders of magnitude above what is required to earn a li

Re: hide python code !

2006-08-11 Thread Fuzzyman
Paul Boddie wrote: > Fuzzyman wrote: > > Bayazee wrote: > > > can we hide a python code ? > > > if i want to write a commercial software can i hide my source code from > > > users access ? > > > we can conver it to pyc but this file can decompiled ..

Re: hide python code !

2006-08-11 Thread Fuzzyman
er of users gets beyond quite a high level, it's just extremely likely that any of your individual users will have that sort of ability - or anyone else will have the motivation to do it. What you can do with Python is almost certainly *good enough* for most people who ask this question - and tha

Re: hide python code !

2006-08-11 Thread Fuzzyman
source code is more of a gift to your competitors (and potential competitors) than it is to your customers... Fuzzyman http://www.voidspace.org.uk/python/index.shtml > My "%s%0.2f" % (currency_marker, 0.02) on the matter. :) > > -tkc -- http://mail.python.org/mailman/listinfo/python-list

Re: hide python code !

2006-08-11 Thread Fuzzyman
Terry Reedy wrote: > "Fuzzyman" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > I never understand the knee-jerk reaction on this mailing list to > > answer people who ask this question by telling them they don't really > > want to do

Re: sequel to the topic "install patch on windows".....

2006-08-19 Thread Fuzzyman
ch has the patch built > in), but then I'm afraid I would also have to wait for an ungrade of > Enthought. I think that the only thing the Enthought distribution offers, is that it comes with lots of extension modules. Just install the normal Python distribution and all the modules you ac

Re: CONSTRUCT - Module Attributes and Execution Environment

2006-08-22 Thread Fuzzyman
hich would keep th something like > this: > > class ExecutionEnv: > def isMain(self) > if CALLING_MODULE.__name__ == '__main__': > return true > else > return false > > exec = ExecutionEnv() > > How to I get access to

Re: Best IDE?

2006-10-13 Thread Fuzzyman
BartlebyScrivener wrote: > Ahmer wrote: > > What do you guys use? > > Why? > > http://tinyurl.com/ybg6p5 > Hmm... only 31 results over a period of 8 years. That's a couple of orders of magnitude less than I would have guessed. Fuzzyman http://www.voi

Re: SPE for 2.5?

2006-10-13 Thread Fuzzyman
for a long time. Shame as it is a *very* nice IDE, but it had too many quirks (with little chance of them being fixed it seemed) to use it for commercial development at Resolver. Fuzzyman http://www.voidspace.org.uk > Thanks. -- http://mail.python.org/mailman/listinfo/python-list

[ANN] rest2web 0.5.0 Final

2006-10-15 Thread Fuzzyman
At last `rest2web 0.5.0 Final `_ is released. Quick download links: * `rest2web-0.5.0.zip `_ * `rest2web-0.5.0.tar.gz

Re: SPE for 2.5?

2006-10-15 Thread Fuzzyman
ould be. Contact me and I'll help you to make a 2.5 installer, > which I'll gladly provide for download. I use SPE on daily basis > myself. Hello Stani, Work on it does seem to have slowed down. When do you expect your new project to start bearing fruit ? Fuzzyman http://www.voidspa

Re: Decorators and how they relate to Python - A little insight please!

2006-10-21 Thread Fuzzyman
return getinstance @singleton class MyClass: ... :-o Fuzzyman http://www.voidspace.org.uk/ > if you want more examples, see the cookbook > > http://www.google.com/search?q=+site%3Aaspn.activestate.com+decorator+cookbook > > -- http://mail.python.org/mailman/listinfo/python-list

[ANN] Movable IDLE 0.1.0

2006-10-22 Thread Fuzzyman
There is now an experimental version of **Movable IDLE** available, this is an off-shoot of the `Movable Python `_ project. **Movable IDLE**, version 0.1.0 can be downloaded (free) from : `Movable IDLE Download

Re: Python tools for managing static websites?

2006-10-31 Thread Fuzzyman
e your pages in reStructured Text or HTML format. It gives you full control of the 'shape' (in terms of directories) of both your source files and target files (the html it generates). http://www.voidspace.org.uk/python/rest2web/ Fuzzyman -- http://mail.python.org/mailman/listinfo/python-list

Re: What is the cleanest way to for a module to access objects from the script that imports it?

2006-10-31 Thread Fuzzyman
r should subclass to implement the plugin. The override something like an 'onActivate' method, which when called, is passed in (by the application) all the information they need. They can also optionally override 'onLoad' and 'onUnload' or whatever other methods you want to

Re: The Python Journal

2006-11-02 Thread Fuzzyman
itation of waiting for the document to download and the PDF Reader > from starting up. > > I realise that many of these issues could be limitations of the > cgpublisher website, but those are my gripes with the site in any case. > +1 for HTML content if this is intended to be

Re: Programming Language that is Spreadsheet/Table Based

2006-11-03 Thread Fuzzyman
n. Spreadsheets are effectively interfaces to functional programming, so this request isn't as odd as it may seem to some. You probably want to have a look at the PyCells project which can handle the dependency tracking you will need: which is harder than you might think. Fuzzyman http:

Re: PySchool - Online Python Web Framework Workshop.

2006-11-04 Thread Fuzzyman
idea. Good luck. I hope you make the results of the survey public. Fuzzyman http://www.voidspace.org.uk/python/index.shtml > Thanks > > Rob J -- http://mail.python.org/mailman/listinfo/python-list

Re: wing ide vs. komodo?

2006-11-04 Thread Fuzzyman
its auto-completion. Fuzzyman http://www.voidspace.org.uk > Wing is developed by a small company, focussed on python development, > while komodo supports all the major scripting languages. > > VJ -- http://mail.python.org/mailman/listinfo/python-list

[ANN] Movable Python 2.0.0 Beta 2

2006-11-07 Thread Fuzzyman
I'm pleased to announce the release of `Movable Python 2.0.0 Beta 2 `_. There are now updated versions for Python 2.2 - 2.5, the Mega-Pack [#]_, and the free trial version. The most important changes in this release are : * Fixes for Pythonwin. The 'run

Re: Python deployment options.

2006-11-08 Thread Fuzzyman
cb45b7dae7ddd5/dacec12e300a74d4#dacec12e300a74d4 > I think that is an incorrect reading of the thread. The *Python* developers need a valid Visual Studio license to redistribute msvcr71.dll. When you build an app with py2exe you are just bundling Python with your application and so don't need the license. Fuzzyman http://www.voidspace.org.uk/index2.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Version Testing Tool?

2006-05-30 Thread Fuzzyman
you to switch which version you run your code with just by selecting hte interpreter from the menu. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml > Thanks in advance: > Michael Yanowitz -- http://mail.python.org/mailman/listinfo/python-list

Re: Dr. Dobb's Python-URL! - weekly Python news and links (May 30)

2006-05-30 Thread Fuzzyman
; > Under-invested desiderata: documentation, regression tests, > marketing, serenity, and, as Steve Holden recently discovered, > *benchmarks*: > http://groups.google.com/group/comp.lang.python/msg/903d5ba9745bad5b > > Fuzzyman advertises yet another co

Re: Python + WinCE + serial port

2006-06-03 Thread Fuzzyman
#x27;s great to have Python available.) There is no built in support for the serial port in PythonCE (AFAIK). Your best bet is using ctypes (for which a PythonCE port has been done) and the microsoft API. Fuzzyman http://www.voidspace.org.uk/python/index.shtml > Regards, > > Philippe -- h

[ANN] ConfigObj 4.3.2 Released

2006-06-04 Thread Fuzzyman
`ConfigObj 4.3.2 `_ has just been released. You can download it from `configobj-4.3.2.zip `_. This is a bugfix and minor feature enhancement release. There is a bu

[ANN] ConfigObj 4.3.2 Released

2006-06-04 Thread Fuzzyman
`ConfigObj 4.3.2 `_ has just been released. You can download it from `configobj-4.3.2.zip `_. ConfigObj is a config file reader and writer. It has *many* features,

Re: Python to C converter

2006-06-05 Thread Fuzzyman
it *can* compile some Python to C - although with very little speed advantage if you don't use native C types. Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: C# equivalent to range()

2006-06-05 Thread Fuzzyman
lifes. > FWIW I agree. If anyone didn't want to answer the question they didn't need to. Why be rude to someone asking a polite question. It's not as if there isn't much more *worse* noise on this group. Fuzzyman http://www.voidspace.org.uk/python/index.shtml > À bientôt, > Neuruss -- http://mail.python.org/mailman/listinfo/python-list

Re: Python + WinCE + serial port

2006-06-05 Thread Fuzzyman
pcm wrote: > Fuzzyman wrote: > > > > > pcm wrote: > >> Hi, > >> > >> Has anyone ever worked on a Python-WinCE-based program that involved > >> serial port management ? > >> > > > > Because of the size of the runti

Re: C# equivalent to range()

2006-06-05 Thread Fuzzyman
Erik Max Francis wrote: > Fuzzyman wrote: > > > FWIW I agree. If anyone didn't want to answer the question they didn't > > need to. > > > > Why be rude to someone asking a polite question. It's not as if there > > isn't much more *worse* noi

Re: C# equivalent to range()

2006-06-05 Thread Fuzzyman
Robert Kern wrote: > Fuzzyman wrote: > > Erik Max Francis wrote: > > >>Here were the "harsh" and "whining" responses to his question he's > >>complaining about: > > > > Fair enough. Maybe they weren't "harsh" and

Re: Use of Python in .NET

2006-06-07 Thread Fuzzyman
/www.google.com/search?q=python+.net There are at least two individual projects in the top ten results that may work for you... :-) Fuzzyman http://www.voidspace.org.uk/python/index.shtml > Thanks in Advamce -- http://mail.python.org/mailman/listinfo/python-list

Re: CENSORSHIP - Django Project (Schema Evolution Support)

2006-06-07 Thread Fuzzyman
you're a troll with your own wikipedia entry. That's impressive - you should put it on your CV. Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

[ANN] Firedrop 0.2.2

2006-06-07 Thread Fuzzyman
`Firedrop 2 0.2.2 `_ is now available. You can download it from : `Firedrop-0.2.2.zip `_ This is an important release with several new features, and contributions

Tkinter - Button Overrelief

2006-06-27 Thread Fuzzyman
rovide an example of using the equivalent of a 'mouseover' event to change the image used by a button in Tkinter ? I'm afraid google has not helped me much here. Much Appreciated, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter - Button Overrelief

2006-06-27 Thread Fuzzyman
Eric Brunel wrote: > On Tue, 27 Jun 2006 14:06:05 +0200, Fuzzyman <[EMAIL PROTECTED]> wrote: > > > Hello all, > > > > I have some Tkinter buttons that display images. I would like to change > > these to 'active' images when the mouse is over the bu

Re: Howto or Tutorial for tokenize module for a newbie?

2006-07-11 Thread Fuzzyman
TY wrote: > Hi, > > Can someone point me to a Howto or Tutorial for tokenize module for a > newbie? I read the documentation but it doesn't have a lot of info... Here's another useful example : http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52298 All th

win32 and System Font Size

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

[ANN] StandOut 3.0.0 Released

2006-08-27 Thread Fuzzyman
There is a new release of `StandOut `_, the flexible output object. This version is a complete rewrite, with a *full* set of `unit tests `_. *standout* is a mod

Re: Persistent Session in CGI

2006-08-27 Thread Fuzzyman
ll for my tiny project. You could try my 'logintools' CGI module (mini framework really, but very mini). It handles authentication for you, and provides a mechanism that you could use to create persistent sessions. http://www.voidspace.org.uk/python/logintools.html (It uses cookies). Fuzzy

Re: How ahead are you guys in the (Python) real world?

2006-08-29 Thread Fuzzyman
of Python on many web-hosts (and Linux distros). Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: python for flash drives

2006-08-29 Thread Fuzzyman
f a USB flash drive, but you could just copy the distribution onto the PC each time you use it. http://www.voidspace.org.uk/python/movpy/ Fuzzyman -- http://mail.python.org/mailman/listinfo/python-list

Re: Python blogging software

2006-09-13 Thread Fuzzyman
http://www.voidspace.org.uk/python/firedrop2/ You can see a feed of some blogs created with Firedrop2 at : http://www.voidspace.org.uk/planetfiredrop/ Fuzzyman http://www.voidspace.org.uk/python/index.shtml > > Regards, > Cliff > > -- -- http://mail.python.org/mailman/listinfo/python-list

Re: Python blogging software

2006-09-13 Thread Fuzzyman
Cliff Wells wrote: > On Wed, 2006-09-13 at 08:22 -0700, Fuzzyman wrote: > > Cliff Wells wrote: > > > On Wed, 2006-09-13 at 00:29 -0700, Cliff Wells wrote: > > > > > > > Anyone aware of any functional (doesn't need to be complete, beta is &

Re: Delete items in nested dictionary based on value.

2006-09-13 Thread Fuzzyman
y whilst iterating over its items ? Fuzzyman http://www.voidspace.org.uk/python/index.shtml > > a = {1: {2: 2, 3: {1: None, 2: 2}}, 2: 2, 3: None} > print clean(a) # Out: {1: {2: 2, 3: {2: 2}}, 2: 2} > b = {1: {1: {1: None, 2: {1: None}}}, 2: 2, 3: None} > print clean(b) # Out:

Re: How to build extensions on Windows?

2006-09-13 Thread Fuzzyman
terpretation of the C standards in VC 8, but it looks like there are major benefits to switching... Fuzzyman http://www.voidspace.org.uk/python/index.shtml > Regards, > Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: How to build extensions on Windows?

2006-09-14 Thread Fuzzyman
Martin v. Löwis wrote: > Fuzzyman schrieb: > > More interestingly, someone reported on Python-dev recently a speed > > improvement of around 30% (from memory) by compiling with VC 8. I know > > the grumble (almost certainly correctly) about Microsoft's 'odd' &

Re: lxml Windows binaries

2006-09-14 Thread Fuzzyman
tp://www.zlatkovic.com/libxml.en.html Which in turn points to : http://www.zlatkovic.com/pub/libxml/ The latest binaries on this page are from July. Fuzzyman http://www.voidspace.org.uk/python/index.shtml > Thanks, > Jan -- http://mail.python.org/mailman/listinfo/python-list

Re: Check if variable is an instance of a File object

2006-09-15 Thread Fuzzyman
ss def function(myFile): if not isinstance(myFile, file): raise ProgrammerError for line in myFile: print myFile try: function('something') except ProgrammerError: print 'I did something wrong' Writing tests that check your code do

Re: Pythondocs.info : collaborative Python documentation project

2006-09-17 Thread Fuzzyman
> make it grow quickly. Help and contributions are welcome; Please > register and start posting your own documentation on it. > There is *already* an online collaborative project for the Python tutorial and reference : http://pytut.infogami.com/ http://pyfaq.infogami.com/ http://pyr

[ANN] Movable Python 2.0.0 Beta 1

2006-09-17 Thread Fuzzyman
There is a new version of `Movable Python `_ available. This is available for **Movable Python** for Python 2.2.3, 2.3.5, 2.4.3 and 2.5rc2 from : `The Movable Python Groups Page `_ What is Movable Python =

[ANN] Movable Python Mega-Pack and MovablePython.NET

2006-09-17 Thread Fuzzyman
One of the most important new features of `Movable Python `_ is that it can work with multiple interpreters. That can be other distributions of **Movable Python**, an installed version of Python, IronPython, or in fact any executable (or batch file or a Py

Re: does anybody earn a living programming in python?

2006-09-25 Thread Fuzzyman
walterbyrd wrote: > If so, I doubt there are many. > > I wonder why that is? I earn a living programming with IronPython - at http://www.resolversystems.com A very cool place to work. :-) Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman

Re: does anybody earn a living programming in python?

2006-09-26 Thread Fuzzyman
his spare time but uses Java at work. He has got Jython fairly deeply embedded though. Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: AN Intorduction to Tkinter

2006-09-26 Thread Fuzzyman
amples are this ? are you sure it's not a problem with your IDE > rather than a problem with Tkinter ? I told you so. ;-) Tis question was just asked on the py2exe mailing list. I predicted that if it was asked here, you would respond asking exactly which examples didn't wo

Re: 2.5 updates for syntax file

2006-09-26 Thread Fuzzyman
but wasn't sure if there > >> were other important things to add for highlight. > >> > > > > Great :) > > > > - Two new built-in functions, any() and all() > > - A new warning, UnicodeWarning > > > > > Who is using FAR and isn't ha

Re: for: else: - any practical uses for the else clause?

2006-09-26 Thread Fuzzyman
print "a matching item was found" > break > else: > print "no matching item" > return False > > # ... continue with value Me too... Same with while loops. Fuzzyman http://www.voidspace.org.uk/python/index.shtml > > -- > Amaury -- http://mail.python.org/mailman/listinfo/python-list

Re: a different question: can you earn a living with *just* python?

2006-09-26 Thread Fuzzyman
e've done at Resolver is use the PLY toolkit to write a fairly extensive language parser (no compiler, just the parser and a rewriter), and I think I've read widely enough to understand a fair bit about programming language theory. I'm certainly going to learn more - but it has almost all

Re: Mark Lutz Python interview

2006-09-29 Thread Fuzzyman
in the third person ? ;-) Fuzzyman http://www.voidspace.org.uk > For more details about the show, see Tech Talk's website > at http://techtalk.imi-us.com. You can also listen to > the live webcast of the show on KFNX's website, > http://www.1100kfnx.com. > > --Python Trainin

Re: AN Intorduction to Tkinter

2006-10-01 Thread Fuzzyman
wing resources useful for Tkinter : http://www.ferg.org/thinking_in_tkinter/index.html http://www.python.org/doc/life-preserver/ http://infohost.nmt.edu/tcc/help/pubs/tkinter/ http://tkinter.unpythonic.net/wiki/ http://www.3dartist.com/WP/python/tknotes.htm All the best, Fuzzyman http://www.voidspa

Re: What do I look for in a shared Python host?

2006-11-18 Thread Fuzzyman
o and Turbogears), try webfaction. They used to be known as Python-hosting.com and offer great support for Python. Fuzzyman http://www.voidspace.org.uk/index2.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: decompiler

2006-11-18 Thread Fuzzyman
John Bokma wrote: > "jim" <[EMAIL PROTECTED]> wrote: > > > Is there such thing as a free decompile that I can run in windows xp > > You asked the same Q in comp.lang.perl.misc... That's terrible. You read comp.lang.perl.misc *as well* ? ;-) Fuzzyman h

Re: The Python Papers Edition One

2006-11-25 Thread Fuzzyman
for your publication? if not, I > suggest ignoring them. any bozo with a keyboard can contribute stop > energy to a project, but at the end, it's always the people *doing* > things that matters. > +1 You guys are doing a great job and the CC license is fine for

Re: The Python Papers Edition One

2006-11-25 Thread Fuzzyman
t. :-) You're mixing your own moral ethics with an incorrect understanding of what copyright means... Fuzzyman http://www.voidspace.org.uk/index2.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Importing module of data dicts and constants

2006-11-25 Thread Fuzzyman
you should : import data print data.__file__ In general it is better to use the following import form. This way you can explicitly see where your names are coming from : from data import _seqType Storing constants in a data module is fine if you don't expect end users to edit the file. &#x

Re: case insensitive dictionary

2006-11-27 Thread Fuzzyman
that approach is that they lowercase the keys > immediately when you create the dictionary and so the true identity of > the key is lost. A later version of this class does give you access to the original case : http://www.voidspace.org.uk/python/archive.shtml#caseless Fuzzyman http://

Re: Calling a thread asynchronously with a callback

2006-11-27 Thread Fuzzyman
a > asynchronous callback strikes me as dangerous. But then maybe I'm just a > whimp :) > I've used them with Windows Forms,. The callback puts a message in the event loop. It doesn't actually interrupt the code. Fuzzyman http://www.voidspace.org.uk/python/index.shtml > Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: SPE (Stani's Python Editor) web site?

2006-11-28 Thread Fuzzyman
y Stani > wherein he said he might move the site, but I can't find it... > He posted a request for free hosting for the project. Looks like maybe he didn't get it... Fuzzyman http://www.voidspace.org.uk/index2.shtml > John -- http://mail.python.org/mailman/listinfo/python-list

odict the Ordered Diction 0.2.2

2006-11-29 Thread Fuzzyman
After a break of almost a year there has been an update to `odict the Ordered Dictionary `_. The latest version is 0.2.2, with changes implemented by Nicola Larosa. Despite over 700 downloads since May (plus 1300 as part of `pythonutils

Re: Detecting recursion loops

2006-12-01 Thread Fuzzyman
and stop it by > user-Exception (after N passes or some complex criteria) without passing a > recursion counter parameter through all the funcs? > Could you not store a set/list of nodes/points already visited and do an early return if they recur ? Fuzzyman http://www.voidspace.org.

Re: newb: Join two string variables

2006-12-05 Thread Fuzzyman
) For these situations it is better to collect the strings in a list and then join them using : ''.join(list_of_strings) But for just two strings, plus is fine. Fuzzyman http://www.voidspace.org.uk/python/index.shtml > download_dir=r'c:/download/' > filename =r'log.t

Re: One module per class, bad idea?

2006-12-12 Thread Fuzzyman
coupled to another. It allows you to be very specific in the naming of files and isolate functionality. We also have files with 'helper functions', which often have several functions. Fuzzyman http://www.voidspace.org.uk/index2.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: MySQLdb windows binaries for Python 2.5?? Yes, but from a World of Warcraft guild.

2006-12-14 Thread Fuzzyman
ython community. Perl and PHP come > > with MySQL support built in. Python is out to lunch on this. > > > > John Nagle > > Animats > I couldn't disagree more. That fact that no Database drivers are built-in > makes Python stronger - allowing Python to access any D

[ANN] rest2web 0.5.1

2006-12-19 Thread Fuzzyman
`rest2web 0.5.1 `_ is now available. This is a minor feature enhancement release. * `Download rest2web-0.5.1.zip `_ * `Download rest2web-0.5.1.tar.gz

Re: merits of Lisp vs Python

2006-12-23 Thread Fuzzyman
uses for anything of relevance anymore and it is continuing it's geriatric decline into obscurity. ;-) Python is dull, except to the ever increasing group of programmers who use it for practical purposes. Hmm... a fitting. EOF. Fuzzyman http://www.voidspace.org.uk/python/articles.shtml >

Re: merits of Lisp vs Python

2006-12-23 Thread Fuzzyman
defcon8 wrote: > All of you are nazis! Hmmm... that might work. :-) Fuzzyman http://www.voidspace.org.uk/python/articles.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Why does Python never add itself to the Windows path?

2007-01-02 Thread Fuzzyman
and allow you to explicitly disallow > this: changing from the current behaviour is the right thing to do > because the current behaviour is wrong, in terms of cross-platform > compatibility and usability. > I strongly agree with these sentiments. Fuzzyman http://www.voidspace.org.uk/pytho

Re: (newbie) Is there a way to prevent "name redundancy" in OOP ?

2007-01-05 Thread Fuzzyman
this be achieved without redundancy ? > Uhm.. if your code can work with a constant then creating an object to hold it as an attribute is redundant. If on the other hand you want an object to hold several attributes, and methods for working with them, and then want to pass these objects

Re: What is proper way to require a method to be overridden?

2007-01-05 Thread Fuzzyman
k in the constructor that the attribute exists and that it is of type FunctionType ? Fuzzyman http://www.voidspace.org.uk/python/articles.shtml -- http://mail.python.org/mailman/listinfo/python-list

Capturing stderr and stdout of a subprocess as a single stream

2007-01-07 Thread Fuzzyman
while True: output = pipe.read(1) if not output: break display(output) Thread(target=DisplayOutput).start() All the best, Fuzzyman http://www.voidspace.org.uk/python/articles.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Capturing stderr and stdout of a subprocess as a single stream

2007-01-07 Thread Fuzzyman
Gabriel Genellina wrote: > On 7 ene, 16:33, "Fuzzyman" <[EMAIL PROTECTED]> wrote: [snip..] > > My current code works, but *doesn't* capture stderr : > > > > from threading import Thread > > > > pipe = os.popen(executable) > > >

Re: Redirecting standard out in a single namespace

2006-01-23 Thread Fuzzyman
Bengt Richter wrote: > On 20 Jan 2006 07:37:15 -0800, "Fuzzyman" <[EMAIL PROTECTED]> wrote: > > >Hello, > > > >I'm trying to redirect standard out in a single namespace. > > > >I can replace sys.stdout with a custom object - but that aff

Re: Redirecting standard out in a single namespace

2006-01-23 Thread Fuzzyman
Bengt Richter wrote: > On 20 Jan 2006 07:37:15 -0800, "Fuzzyman" <[EMAIL PROTECTED]> wrote: > > >Hello, > > > >I'm trying to redirect standard out in a single namespace. > > > >I can replace sys.stdout with a custom object - but that aff

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

2006-01-23 Thread Fuzzyman
/articles/configobj_for_data_persistence.shtml It is easy to use a validating configspec, and then extend it - without obsoleting earlier code or data files. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml > -- > Jeffrey Barish -- http://mail.python.org/mailman/listinfo/python-list

Re: Redirecting standard out in a single namespace

2006-01-24 Thread Fuzzyman
ere. > Maybe we can get something more specific from the author of the above doc > snippet ;-) > ``inspect.currentframe`` has no such warning. The equivalent would then be : inspect.currentframe().f_back.f_globals['__name__'] I guess unless the implementation of Python changes that will continue to work. :-) Thanks Fuzzyman http://www.voidspace.org.uk/python/index.shtml > Regards, > Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list

ActivePython & SSL

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

Re: Dynamic pull down menus (CGI)

2006-01-25 Thread Fuzzyman
think* from the guy who wrote releaseforge... All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: logging into secure website with script

2006-01-25 Thread Fuzzyman
authentication.shtml If it is through a form, you can use ClientForm. Alternatively just manually do the POST from urllib2. You may want to use ClientCookie/cookielib for (automatic) cookie handling : http://www.voidspace.org.uk/python/articles/cookielib.shtml All the best, Fuzzyman http

Re: append to the end of a dictionary

2006-01-25 Thread Fuzzyman
ike > >orderedDict = [(k,mydict[k]) for k in mydict.keys().sort()] > You can do all this and more from the OrderedDict in pythonutils : http://www.voidspace.org.uk/python/odict.html http://www.voidspace.org.uk/python/pythonutils.html from odict import OrderedDict our_dict = OrderedDict(some_dict.items()) our_dict.sort() All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml > Unfortunately, the version I've got here doesn't seem to support > a sort() method for the list returned by keys(). :( > > -tim -- http://mail.python.org/mailman/listinfo/python-list

Re: Best way to extract an item from a set of len 1

2006-01-25 Thread Fuzzyman
That's cute. :-) Fuzzyman -- http://mail.python.org/mailman/listinfo/python-list

Re: www.mywebsite.py

2006-01-26 Thread Fuzzyman
k ( http://www.nic.py/) but I don't speak spanish... > > > > If someone has more informations... > Last time I saw, the domains were very expension (about $500) and only available to those resident in Paraguay... :-( All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Loading a Python collection from an text-file

2006-01-27 Thread Fuzzyman
than Yaml, but it's not as flexible. http://www.voidspace.org.uk/python/configobj.html All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Print dict in sorted order

2006-01-29 Thread Fuzzyman
: from odict import OrderedDict my_dict = OrderedDict(some_dict.keys()) my_dict.sort() *Or* you can do : from odict import SequenceOrderedDict my_dict = SequenceOrderedDict(some_dict.keys()) keys = my_dict.keys() keys.sort() my_dict.keys = keys print my_dict All the best, Fuzzyman http

Re: Find directory name of file?

2006-01-30 Thread Fuzzyman
if main_is_frozen(): return os.path.abspath(os.path.dirname(sys.executable)) return os.path.abspath(os.path.dirname(sys.argv[0])) just call ``get_main_dir()`` and it works consistently with py2exe'd scripts and normal scripts. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml > -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: seperating directories from files

2006-01-30 Thread Fuzzyman
are images. I'm sure PIL will have ways of checking image metadata (if this is all you are specifically after here). All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

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

2006-01-30 Thread Fuzzyman
It sounds like you're running on windows *and* that webbrowser.py just uses ``os.startfile``. For html files (associated with your default browser) this will *do the right thing*. For everything else, it will *do the wrong thing*. I could well be wrong though... All the best, Fuzzyman

Unicode strings and ascii regular expressions

2006-01-30 Thread Fuzzyman
x27;.decode('cp1252') # yields a unicode string that can't be >>> encoded as ascii >>> c = r.match(s) >>> c.groups() # yields two unicode strings (u'\xa3\xa3\xa3', u'\xa3\xa3\xa3') >>> print c.groups()[0].encode('cp1252&#

<    1   2   3   4   5   6   7   8   9   >