Re: Python and Flaming Thunder

2008-05-21 Thread Fuzzyman
On May 14, 10:30 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > Dave Parker schrieb: > > > All of the calculators and textbooks that elementary school students > > > use, use "^" for powers. > > I've never seen this symbol in textbooks. In textbooks, powers are > written using superscript.

Re: unittest: Calling tests in liner number order

2008-05-24 Thread Fuzzyman
On May 23, 10:36 am, Antoon Pardon <[EMAIL PROTECTED]> wrote: > Some time ago I asked whether is would be possible that unittest would > perform the test in order of appearence in the file. > > The answers seemed to be negative. Since I really would like this > behaviour I took the trouble of looki

Re: unittest: Calling tests in liner number order

2008-05-24 Thread Fuzzyman
On May 24, 2:44 pm, Roy Smith <[EMAIL PROTECTED]> wrote: > In article > <[EMAIL PROTECTED]>, > > Fuzzyman <[EMAIL PROTECTED]> wrote: > > Also, like others, I have had wonderful experiences of trying to track > > down test failures that dep

Re: Why does python not have a mechanism for data hiding?

2008-05-24 Thread Fuzzyman
On May 24, 2:58 pm, Ben Finney <[EMAIL PROTECTED]> wrote: > Sh4wn <[EMAIL PROTECTED]> writes: > > first, python is one of my fav languages, and i'll definitely keep > > developing with it. But, there's 1 one thing what I -really- miss: > > data hiding. I know member vars are private when you prefix

Re: Why does python not have a mechanism for data hiding?

2008-05-24 Thread Fuzzyman
On May 24, 4:56 pm, [EMAIL PROTECTED] (Ville M. Vainio) wrote: > Fuzzyman <[EMAIL PROTECTED]> writes: > > The 'we told you not to use that' approach, when applied to paying > > customers doesn't really work... all they see is that you broke > > their spre

Re: unittest: Calling tests in liner number order

2008-05-24 Thread Fuzzyman
On May 24, 3:57 pm, Roy Smith <[EMAIL PROTECTED]> wrote: > In article > <[EMAIL PROTECTED]>, > >  Fuzzyman <[EMAIL PROTECTED]> wrote: > > Whilst I understand your point, I think the danger is that you end up > > with hidden dependencies on the test orde

Re: Why does python not have a mechanism for data hiding?

2008-05-24 Thread Fuzzyman
On May 24, 6:18 pm, [EMAIL PROTECTED] wrote: > Ben Finney: > > >In Python, the philosophy "we're all consenting adults here" applies.< > > Michael Foord: > > > They will use whatever they find, whether it is the best way to > > achieve a goal or not. Once they start using it they will expect us to

Re: Why does python not have a mechanism for data hiding?

2008-05-25 Thread Fuzzyman
On May 25, 2:28 am, "Terry Reedy" <[EMAIL PROTECTED]> wrote: > "Benjamin Kaplan" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > | On Sat, May 24, 2008 at 10:14 AM, Fuzzyman <[EMAIL PROTECTED]> wrote: > || > For examp

Re: Why does python not have a mechanism for data hiding?

2008-05-25 Thread Fuzzyman
On May 25, 9:47 am, [EMAIL PROTECTED] (Ville M. Vainio) wrote: > Fuzzyman <[EMAIL PROTECTED]> writes: > >> Perhaps a lint-like validation tool would be optimal for this > >> problem... > > > So we can refuse to execute their code if they use private APIs? >

Re: unittest: Calling tests in liner number order

2008-05-25 Thread Fuzzyman
On May 25, 3:13 pm, Roy Smith <[EMAIL PROTECTED]> wrote: > In article > <[EMAIL PROTECTED]>, >  John Roth <[EMAIL PROTECTED]> wrote: > > > I really don't care what the OP does in his own projects. My objection > > is that, if it goes into the standard library, is that it passes a > > signal that it

Re: 22.800000 and a 1 on the end!!??

2008-05-25 Thread Fuzzyman
On May 25, 8:58 pm, [EMAIL PROTECTED] wrote: > >>> x = 5 > >>> x /= 2 > >>> x > 2 > >>> x *=11.4 > >>> x > > 22.801 > > ok where does the 1 in the come from? Floating point arithmetic. Michael Foord http://www.ironpythoninaction.com/ -- http://mail.python.org/mailman/listinfo/python-l

Re: Good grid + calendar, etc.?

2008-06-01 Thread Fuzzyman
On Jun 1, 1:43 pm, Gilles Ganault <[EMAIL PROTECTED]> wrote: > On Sun, 1 Jun 2008 21:27:30 +0900, "Ryan Ginstrom" > > <[EMAIL PROTECTED]> wrote: > >For your stated needs, I'd advise checking out IronPython or Python.NET > >(which allow use of .NET GUI libraries). > > Thanks but I forgot to say that

Re: Good grid + calendar, etc.?

2008-06-03 Thread Fuzzyman
On Jun 2, 3:36 am, Michael Torrie <[EMAIL PROTECTED]> wrote: > Gilles Ganault wrote: > >> Thegridcan be quite advanced. Did you look at the wxPython demo? Or > >> Dabo? > > > Yes, but although the basic wigets are just fine, wxGrid looks a bit > > like the basic TStringGrid in Delphi, ie. it's pret

Re: Creating A Tuple From A List, Adding To Tuple As You Do

2008-06-05 Thread Fuzzyman
On Jun 5, 1:41 pm, Jeff Nyman <[EMAIL PROTECTED]> wrote: > Greetings all. > > The subject line of this thread is probably one of the worst ever. I > was trying to encapsulate what I am doing. Based on my new-found > knowledge from another thread, I'm able to get a list of directories > and they com

Re: Why does python not have a mechanism for data hiding?

2008-06-05 Thread Fuzzyman
On Jun 3, 6:54 pm, sturlamolden <[EMAIL PROTECTED]> wrote: > On May 24, 3:41 pm, Sh4wn <[EMAIL PROTECTED]> wrote: > > > first, python is one of my fav languages, and i'll definitely keep > > developing with it. But, there's 1 one thing what I -really- miss: > > data hiding. I know member vars are p

Re: How to kill a thread?

2008-06-09 Thread Fuzzyman
On Jun 9, 9:20 pm, Rhamphoryncus <[EMAIL PROTECTED]> wrote: > On Jun 9, 5:33 am, Antoon Pardon <[EMAIL PROTECTED]> wrote: > > > > > On 2008-06-07, Rhamphoryncus <[EMAIL PROTECTED]> wrote: > > > > On Jun 6, 12:44 pm, The Pythonista <[EMAIL PROTECTED]> wrote: > > >> It's always been my understanding

Re: Why does python not have a mechanism for data hiding?

2008-06-09 Thread Fuzzyman
On Jun 9, 10:23 am, Bruno Desthuilliers wrote: > Mark Wooding a écrit : > > > > > Fuzzyman <[EMAIL PROTECTED]> wrote: > > >> So, you are stating that no API programmer using Python *ever* has a > >> valid or genuine reason for wanting (even if he can

Re: proposal: give delattr ability to ignore missing attribute

2008-06-10 Thread Fuzzyman
On Jun 10, 4:55 pm, Lie <[EMAIL PROTECTED]> wrote: > On Jun 10, 10:06 pm, Gary Wilson <[EMAIL PROTECTED]> wrote: > > > > > I would like to propose that functionality be added to delattr to > > handle the case when the attribute does not exist. > I've never once needed that functionality. In fact I

Re: How to kill a thread?

2008-06-10 Thread Fuzzyman
On Jun 10, 2:03 am, Rhamphoryncus <[EMAIL PROTECTED]> wrote: > On Jun 9, 2:52 pm, Fuzzyman <[EMAIL PROTECTED]> wrote: > > > > > On Jun 9, 9:20 pm, Rhamphoryncus <[EMAIL PROTECTED]> wrote: > > > > On Jun 9, 5:33 am, Antoon Pardon <[EMAIL PROTEC

Re: How to kill a thread?

2008-06-11 Thread Fuzzyman
On Jun 11, 6:56 am, Rhamphoryncus <[EMAIL PROTECTED]> wrote: > On Jun 10, 3:41 pm, Fuzzyman <[EMAIL PROTECTED]> wrote: > > > On Jun 10, 2:03 am, Rhamphoryncus <[EMAIL PROTECTED]> wrote: > > > So how does .NET deal with the sys.stdout corruption? Does it? &g

Re: How to kill a thread?

2008-06-11 Thread Fuzzyman
On Jun 11, 6:49 pm, Rhamphoryncus <[EMAIL PROTECTED]> wrote: > On Jun 11, 7:56 am, Fuzzyman <[EMAIL PROTECTED]> wrote: > > > > > On Jun 11, 6:56 am, Rhamphoryncus <[EMAIL PROTECTED]> wrote: > > > > On Jun 10, 3:41 pm, Fuzzyman <[EMAIL PROTECTED]&

Re: How to kill a thread?

2008-06-11 Thread Fuzzyman
On Jun 11, 8:41 pm, Rhamphoryncus <[EMAIL PROTECTED]> wrote: > On Jun 11, 1:17 pm, Fuzzyman <[EMAIL PROTECTED]> wrote: > > > > > On Jun 11, 6:49 pm, Rhamphoryncus <[EMAIL PROTECTED]> wrote: > > > On Jun 11, 7:56 am, Fuzzyman <[EMAIL PROTECTED]&g

Re: Plotting Graphs using Gnuplot

2008-06-12 Thread Fuzzyman
On Jun 12, 12:30 pm, [EMAIL PROTECTED] wrote: > Hello. Was trying to create a simple plotting function. Wasnt working > however. If i write the same code without putting it inside a function > it works. :S. Could some1 tell me the problem? Heres the code: > > # File name Plotting2 > > import Gnuplo

Re: Fast and easy GUI prototyping with Python

2008-06-21 Thread Fuzzyman
On Jun 21, 1:36 pm, [EMAIL PROTECTED] wrote: > Which tools would you use? I want the interface design to be as easy > and fast as possible, all ideology aside. I'm considering > eitherIronPython+Visual Studio or Python+Qt -- but I'm open for other > suggestions. > > Visual Studio seems to offer th

Re: Fast and easy GUI prototyping with Python

2008-06-21 Thread Fuzzyman
On Jun 21, 6:15 pm, [EMAIL PROTECTED] wrote: > Thanks for your input. The prototype will be running on Windows only. > Portability  and being able to develop on other platforms would be a > bonus, but is not a requirement. I guess the choice is going to be > between Visual Studio and Qt. Of importa

Re: installed 3.0, rebind winprompt to 2.5?

2008-06-23 Thread Fuzzyman
On Jun 23, 6:53 pm, cirfu <[EMAIL PROTECTED]> wrote: > i installed python 3.0. now when im laucnhing from the dos prompt in > win vista it searches in python3.0 > > i want to rebind it to 2.5, what do i need to change? Reinstalling 2.5 should work. Michael Foord http://www.ironpythoninaction.com/

Re: An idiom for code generation with exec

2008-06-23 Thread Fuzzyman
On Jun 21, 7:52 am, Peter Otten <[EMAIL PROTECTED]> wrote: > eliben wrote: > > On Jun 20, 2:44 pm, Peter Otten <[EMAIL PROTECTED]> wrote: > >> eliben wrote: > >> > Additionally, I've found indentation to be a problem in such > >> > constructs. Is there a workable way to indent the code at the level

Re: URLLIb2 problem

2008-06-30 Thread Fuzzyman
On Jun 30, 9:11 pm, [EMAIL PROTECTED] wrote: > I am trying to write somecode of this kind :) > > opener = urllib2.build_opener(urllib2.HTTPCookieProcessor()) > opener.addheaders = [('User-Agent','Mozilla/5.0 (Windows; U; Windows > NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14'), > ('A

Re: Freesoftware for auto/intelligent code completing in Python

2008-06-30 Thread Fuzzyman
On Jun 30, 10:46 pm, Ali Servet Dönmez <[EMAIL PROTECTED]> wrote: > I don't want to be so mean here, but how hard it could be be writing a > freesoftware which would automatically/intelligently auto complete > Python code? (I mean something that really does the job, like > Microsoft's Visual Studio

Re: Freesoftware for auto/intelligent code completing in Python

2008-07-03 Thread Fuzzyman
On Jul 2, 9:33 am, Ali Servet Dönmez <[EMAIL PROTECTED]> wrote: > On Jul 1, 12:15 am, Fuzzyman <[EMAIL PROTECTED]> wrote: > > > > > On Jun 30, 10:46 pm, Ali Servet Dönmez <[EMAIL PROTECTED]> wrote: > > > > I don't want to be so mean here, but

Re: Freesoftware for auto/intelligent code completing in Python

2008-07-03 Thread Fuzzyman
On Jul 2, 9:33 am, Ali Servet Dönmez <[EMAIL PROTECTED]> wrote: > On Jul 1, 12:15 am, Fuzzyman <[EMAIL PROTECTED]> wrote: > > > > > On Jun 30, 10:46 pm, Ali Servet Dönmez <[EMAIL PROTECTED]> wrote: > > > > I don't want to be so mean here, but

Re: Freesoftware for auto/intelligent code completing in Python

2008-07-03 Thread Fuzzyman
On Jun 30, 11:25 pm, Ali Servet Dönmez <[EMAIL PROTECTED]> wrote: > On Jul 1, 12:15 am, Fuzzyman <[EMAIL PROTECTED]> wrote: > > > > > On Jun 30, 10:46 pm, Ali Servet Dönmez <[EMAIL PROTECTED]> wrote: > > > > I don't want to be so mean here, but

Re: ANN: P4D 1.1

2008-07-11 Thread Fuzzyman
On Jul 11, 10:09 am, Kay Schluehr <[EMAIL PROTECTED]> wrote: > P4D = E4X style embedded DSL for Python but without E and X. > > For more information see: > > http://pypi.python.org/pypi/P4D/1.1-py2.5 That looks a lot like YAML. Any reason to use it over YAML? Michael Foord http://www.ironpythonin

Re: Why is this blowing the stack, thought it was tail-recursive...

2008-07-13 Thread Fuzzyman
On Jul 13, 7:56 am, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Sat, 12 Jul 2008 19:25:18 -0400, Terry Reedy wrote: > > ssecorp wrote: > >> def fib(n): > >>     def fibt(a, b, n): > >>         if n <= 1: > >>             return b > >>         else: > >>             return fib

Re: win32api not found?

2008-07-19 Thread Fuzzyman
On Jul 19, 8:45 pm, Michiel Overtoom <[EMAIL PROTECTED]> wrote: > On Saturday 19 July 2008 21:13:04 Lamonte Harris wrote: > > > Where can I get the win32api module? I been searching all day on google and > > nothing, i installed > >https://sourceforge.net/project/showfiles.php?group_id=78018which r

Re: Attack a sacred Python Cow

2008-07-25 Thread Fuzzyman
On Jul 24, 6:41 am, Jordan <[EMAIL PROTECTED]> wrote: > Hi everyone, > > I'm a big Python fan who used to be involved semi regularly in > comp.lang.python (lots of lurking, occasional posting) but kind of > trailed off a bit. I just wrote a frustration inspired rant on my > blog, and I thought it w

ANN: PyCon UK Talks and Tutorials List Up

2008-07-28 Thread Fuzzyman
PyCon UK 2008 is the second PyCon event in the UK, and is being held on 12th to 14th September at the Birmingham Conservatoire. We have a bevy of national and international Python stars speaking as well as a host of members of the Python community. The conference starts with a day of tutorials on

Re: interpreter vs. compiled

2008-07-28 Thread Fuzzyman
On Jul 27, 6:02 am, castironpi <[EMAIL PROTECTED]> wrote: > On Jul 24, 11:04 pm, Tim Roberts <[EMAIL PROTECTED]> wrote: > > > > > castironpi <[EMAIL PROTECTED]> wrote: > > > >Compiling a program is different than running it.  A JIT compiler is a > > >kind of compiler and it makes a compilation step

Re: ironpython, exception in mscorlib when reading .py file from network share

2008-07-29 Thread Fuzzyman
On Jul 29, 9:34 am, mindmind <[EMAIL PROTECTED]> wrote: > Hello, > > I have a ironpython 1.1.1.0 host in my c# app, and When doing a >   engine.ExecuteFile(file); > i often get the error below, when "file" is on a network share : > (winXp client , windows ??? server) > > 21-07-2008 12:47:28 : Trace

Re: Questions on 64 bit versions of Python

2008-07-29 Thread Fuzzyman
On Jul 26, 8:02 pm, Rob Williscroft <[EMAIL PROTECTED]> wrote: > Martin v. Löwis wrote innews:[EMAIL PROTECTED] > comp.lang.python: > > >> I just tested, I built a default C# forms app using the "AnyCPU" > >> option and it ran as a 64 bit app (no *32 in Task Manager), this is > >> on XP64. > > >> I

Re: Decimals not equalling themselves (e.g. 0.2 = 0.2000000001)

2008-08-03 Thread Fuzzyman
On Aug 3, 3:02 pm, CNiall <[EMAIL PROTECTED]> wrote: > I am very new to Python (I started learning it just yesterday), but I > have encountered a problem. > > I want to make a simple script that calculates the n-th root of a given > number (e.g. 4th root of 625--obviously five, but it's just an exa

Buffer Overflow with Python 2.5 on Vista in import site

2008-03-29 Thread Fuzzyman
A very odd error with Python 2.5 (both 2.5.1 and 2.5.2 from the official msi installers and running on Vista under Parallels on the Mac). 'import site' fails due to a string in sys.path that contains a huge number of null bytes. The error is actually in ntpath - I adjusted it to print the paths i

Re: Buffer Overflow with Python 2.5 on Vista in import site

2008-03-30 Thread Fuzzyman
On Mar 30, 3:53 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Sat, 29 Mar 2008 17:34:27 -0300, Fuzzyman <[EMAIL PROTECTED]> escribió: > > > A very odd error with Python 2.5 (both 2.5.1 and 2.5.2 from the > > official msi installers and running

Re: Python Success stories

2008-04-29 Thread Fuzzyman
On Apr 22, 11:25 am, azrael <[EMAIL PROTECTED]> wrote: > Hy guys, > A friend of mine i a proud PERL developer which always keeps making > jokes on python's cost. > > Please give me any arguments to cut him down about his commnets > like :"keep programing i python. maybe, one day, you will be able t

Re: Cancel instance create

2008-09-09 Thread Fuzzyman
On Sep 6, 1:23 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Mohamed Yousef schrieb: > > > ðWhat about no Constructor , and a custom instancing function that can > > return either None or the instance wanted > > That doesn't solve the underlying problem - the instance is created. > Just becau

Re: How to kill threading.Thread instance?

2008-09-21 Thread Fuzzyman
On Sep 21, 4:04 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Diez B. Roggisch wrote: > >> I wonder why something like myThread.exit() or myThread.quit() or > >> threading.kill(myThread) can't be implemented? > >> Is something like that present in Python 3000? > > > Not that I'm aware of it (which

Python 2.6: Determining if a method is inherited

2008-10-05 Thread Fuzzyman
Hello all, I may well be being dumb (it has happened before), but I'm struggling to fix some code breakage with Python 2.6. I have some code that looks for the '__lt__' method on a class: if hasattr(clr, '__lt__'): However - in Python 2.6 object has grown a default implementation of '__lt__', s

Python 2.6 / 3.0: Determining if a method is inherited

2008-10-05 Thread Fuzzyman
Hello all, I may well be being dumb (it has happened before), but I'm struggling to fix some code breakage with Python 2.6. I have some code that looks for the '__lt__' method on a class: if hasattr(clr, '__lt__'): However - in Python 2.6 object has grown a default implementation of '__lt__', s

Python 2.6 / 3.0: Determining if a method is inherited (Fixed)

2008-10-05 Thread Fuzzyman
Hello all, Sorry - my messages aren't showing up via google groups, so I'm kind of posting on faith... Anyway, I solved my problem (I think)... import sys if sys.version_info[0] == 3: def _has_method(cls, name): for B in cls.__mro__: if B is object: conti

Re: Python 2.6: Determining if a method is inherited

2008-10-05 Thread Fuzzyman
On Oct 5, 8:15 pm, [EMAIL PROTECTED] (Valentino Volonghi aka Dialtone) wrote: > Fuzzyman <[EMAIL PROTECTED]> wrote: > > So how do I tell if the X.__lt__ is inherited from object? I can look > > I don't have python 2.6 installed so I can't try but what I think cou

Re: why use special config formats?

2006-03-10 Thread Fuzzyman
py with a hardwired config file, you don't need a config file at all. Fuzzyman http://www.voidspace.org.uk/python/index.shtml > > -tomer -- http://mail.python.org/mailman/listinfo/python-list

Re: Xah's Edu Corner: The Concepts and Confusions of Pre-fix, In-fix, Post-fix and Fully Functional Notations

2006-03-17 Thread Fuzzyman
gt; >=E2=80=9D, where the > > Not that Mr. Lee has ever shown much interest in feedback, but you > pretty well have stick to vanilla ASCII to get your notation through > unmangled on newsgroups. Hmmm... it displays fine via google groups. Maybe it's the reader which is 'no

Re: split() can help to read UTF-16 encoded file without codecs support, why?

2006-03-17 Thread Fuzzyman
t;d:\python24\lzjtest.xml", 'r').read().split('\r\n'): > i = i.decode("utf-16") > print i > === > Then it worked (echo the file). > You will probably find that '\r\n' never occurs in the byte-string, so th

Re: Writing web bots in python

2006-03-18 Thread Fuzzyman
want Mechanize *or* something like FormEncode. Google for these. All the best, Fuzzyman > Sudharshan S -- http://mail.python.org/mailman/listinfo/python-list

compile function and future statements

2006-03-20 Thread Fuzzyman
Hello all, The following is a copy of a blog entry. It's asking a question about future statements and the built in compile function. I'd appreciate any pointers or comments about possible approaches. `Movable Python `_ supports running both Python scrip

compile function and future statements

2006-03-20 Thread Fuzzyman
Hello all, The following is a copy of a blog entry. It's asking a question about future statements and the built in compile function. I'd appreciate any pointers or comments about possible approaches. `Movable Python `_ supports running both Python scrip

Re: path to modules per import statement

2006-03-24 Thread Fuzzyman
x27;t be shy of it. Another is to add an empty file called ``__init__.py`` to each of these directories. This makes each directory a 'package'. You can then do : import app1.module My module `pathutils <http://www.voidspace.org.uk/python/pathutils.html>`_ contains a third approach

Re: Suggestion for Web App

2006-03-24 Thread Fuzzyman
hy not just use static HTML for the static content ? You can serve RSS and mp3s as static content too. Do you need CMS capabilities via the web interface ? Then you can just use a separate forum program. Fuzzyman http://www.voidspace.org.uk/python/index.shtml > They have some other suggestion

Re: What's The Best Editor for python

2006-03-24 Thread Fuzzyman
PythonStudent wrote: > Hi, > Can one of you say to me what's the best editor for editing the python > programs ( for linux or windows ), and if you can send it to me to the > adresse [EMAIL PROTECTED] > `SPE <http://pythonide.stani.be>`_ :-) Fuzzyman http://w

[ANN] Firedrop 0.2.0 - The Python Blog Client

2006-03-26 Thread Fuzzyman
It has finally happened, the release of `Firedrop 0.2.0 `_. The impatient can download the new release here : `Firedrop 0.2.0 (1.3mb) `_ .. note:: The first

Re: New development windows, IronPython or PythonWin

2006-03-26 Thread Fuzzyman
to a full Python 2.4 implementation , and the list of bugs shrinks daily. It's not a project that's about to disappear either. Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Firedrop 0.2.0 - The Python Blog Client

2006-03-26 Thread Fuzzyman
Kent Johnson wrote: > Fuzzyman wrote: > > It has finally happened, the release of `Firedrop 0.2.0 > > > * `ConfigObj <http://www.voidspace.org.uk/python/configobj.html>`_ is > > now used to edit all the config files. > > You should add this to the dependency li

Re: Difference between 'is' and '=='

2006-03-27 Thread Fuzzyman
ce of 'None', so a is None is quicker than a == None (It only needs to check identity not value.) I hope that helps. Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: New development windows, IronPython or PythonWin

2006-03-27 Thread Fuzzyman
project and was the lead developer behind Jython - so he literally knows Python inside out. Anyway - PythoNWin and COM may well be the right approach for your problem anyway. :-) Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Validating Syntax only with PyParser_SimpleParseString ?

2006-03-29 Thread Fuzzyman
lled 'unrepr' which shows how to do it. I only have restricted internet access or I would find the URL for you (sorry). Fuzzyman http://www.voidspace.org.uk/python/index.shtml > Environment: Windows / Borland C++ -- http://mail.python.org/mailman/listinfo/python-list

Re: does python could support sequence of short or int?

2006-03-30 Thread Fuzzyman
rences to objects, they aren't pointers - so you don't operate directly on the byte sequence in memory. (Not using the basic datatypes anyway). Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Set Windows Environment Variable

2006-03-30 Thread Fuzzyman
Variable``. Any options ? Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Countdown from 2 minutes - how?

2006-03-30 Thread Fuzzyman
the module ``time`` : import time start = time.time() lastprinted = 0 finish = start + 120 while time.time() < finish: now = int(time.time()) if now != lastprinted: print int(finish - now) lastprinted = now time.sleep(0.5) # this stops the system hanging whilst this is runn

Re: Stackless Python for 2.4.3

2006-03-30 Thread Fuzzyman
rnet connection here is 'restricted' or I would google first... Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Set Windows Environment Variable

2006-03-30 Thread Fuzzyman
Magnus Lycka wrote: > Duncan Booth wrote: > > Fuzzyman wrote: > >> In the ``win32api`` package there is a ``GetEnvironmentVariable`` > >> function, but no ``SetEnvironmentVariable``. Any options ? > > > > No, your only option is to find a solution whi

Re: Set Windows Environment Variable

2006-03-30 Thread Fuzzyman
Fredrik Lundh wrote: > Fuzzyman wrote: > > > I *believe* that ``SetEnvironmentVariable`` exists in the underlying > > windows API, but that it isn't wrapped by the win32api extension. > > SetEnvironmentVariable does the same thing as assignment to os.environ

[ANN] Firedrop 0.2.1

2006-03-30 Thread Fuzzyman
Firedrop 0.2.1 has just been released. http://www.voidspace.org.uk/python/firedrop2/ A bugfix release. * Removed mistaken dependency on `pythonutils `_ * Fixed bug where cancelling the new site dialog would still report that the site was

Re: Python 2.5 licensing: stop this change

2006-04-01 Thread Fuzzyman
ng the standard CPython as an executable, using tools like py2exe, won't be covered. Right ? Does this cover commercial applications that embed the Python interpreter ? (Looks like it will) All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml > regards > Steve &

Re: Python 2.5 licensing: stop this change

2006-04-01 Thread Fuzzyman
Fuzzyman wrote: > Steve Holden wrote: > > As the only director of the Python Software Foundation to vote against a > > recent Board motion to implement the change in licensing terms described in > > > >http://pyfound.blogspot.com/2006/04/python-25-licensing-change.h

Re: Registration Code

2006-04-03 Thread Fuzzyman
r executable in code that does all of this for you. Fuzzyman http://www.voidspace.org.uk/python/index.shtml > > Hi, > > A suggestion: > > I would use encryption (ex: AES): > > Hide a secret key in your code and generate an encrypted (readable: ex 07 7B > 6F ) v

Re: Registration Code

2006-04-03 Thread Fuzzyman
nless you are going to be writing a program used by tens of thousands of users, it is likely that it is not worth the effort of the hackers to bother. I'd release the early versions using simple protection mechanisms, and develop your protectionas your userbase grows. Again - there are commercia

Re: can I get the index number in for x in y loop?

2006-04-03 Thread Fuzzyman
7;right' answer, I personally prefer : i = 0 while i < len(some_sequence): val = some_sequence[i] ... i += 1 This is so that I can manually wind 'i' backwards and forwards manually from other parts of the code. Fuzzyman http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: help with designing an app. based on ConfigParser

2006-04-06 Thread Fuzzyman
er sub-sections are the right answer to your problem, but at least it is possible. :-) http://www.voidspace.org.uk/python/configobj.html Fuzzyman http://www.voidspace.org.uk/python/index.shtml > I might be looking for something too complicated and maybe some simplier > alternative exists

ANN: ConfigObj 4.3.0

2006-04-07 Thread Fuzzyman
`ConfigObj 4.3.0 `_ is now released. This has several bugfixes, as well as *several* major feature enhancements. You can download it from : `ConfigObj-4.3.0.zip 244Kb

Re: mod_python + apache + winxp => nogo

2006-04-07 Thread Fuzzyman
/mod_python.so" > I'm no expert - having never tried that combination (but I have heard of it and you should try the mod_python mailing list). However, if IIRC then a '.so' file is a UNIX type library file. (Possibly the equivalent of a dll on windows). This sounds awry to me

Re: I wanna use urllib2 to get a page with a socks 5 proxy, who can give me a sample code ?

2006-04-09 Thread Fuzzyman
> how to write this kind of script? I'm pretty sure that urllib2 doesn't work with SOCKS proxies of any kind. I think you'll have to use pycurl (extension library - not in standard lib). This is mcuh more powerful, but not so simple to use. All the best, Fuzzyman http://www.

Re: A question about the urllib2 ?

2006-04-11 Thread Fuzzyman
What do you think this ? > I haven't tried this, so I'm guessing :-) Do you pass in the string to urllib2 as unicode ? If so, try encoding it to UTF8 first... Otherwise you might try escaping it using ``urllib.quote_plus``. (Note ``urllib``, *not* ``urllib2``.) All the best,

Re: Dreaming of new generation IDE

2010-02-10 Thread Fuzzyman
On Feb 3, 7:38 pm, Phlip wrote: > On Feb 3, 10:57 am, Adam Tauno Williams > wrote: > > > > Current editors suck because they can't see into the code and browse > > > it - unless it's so statically typed it's painful. > > > ?  I edit Python in MonoDevelop  2.2;  and I can browse my file, > > class

Re: what a cheap rule

2010-11-26 Thread Fuzzyman
On Nov 26, 1:10 am, Steven D'Aprano wrote: > On Thu, 25 Nov 2010 08:15:21 -0800, Yingjie Lan wrote: > > Intuition #1: as if you raise an exception type, and then match that > > type. > > It seems that no instances > > are involved here (Intuitively). > > Your intuition is not my intuition, nor doe

Re: Interrput a thread

2011-01-04 Thread Fuzzyman
On Dec 29 2010, 11:31 pm, gervaz wrote: > Hi all, I need to stop a threaded (using CTR+C or kill) application if > it runs too much or if I decide to resume the work later. > I come up with the following test implementation but I wanted some > suggestion from you on how I can implement what I need

Re: Interrput a thread

2011-01-04 Thread Fuzzyman
On Jan 4, 3:12 pm, Fuzzyman wrote: > On Dec 29 2010, 11:31 pm, gervaz wrote: > > > Hi all, I need to stop a threaded (using CTR+C or kill) application if > > it runs too much or if I decide to resume the work later. > > I come up with the following test implemen

Re: Interrput a thread

2011-01-04 Thread Fuzzyman
On Jan 4, 3:31 pm, Roy Smith wrote: > In article > <2ebc11a5-1b45-4faa-97b9-c84f0db01...@k22g2000yqh.googlegroups.com>, > >  Fuzzyman wrote: > > It is unsafe to terminate an os level thread at an arbitrary point > > because it may be executing code in a criti

Re: Python is cool!!

2010-05-09 Thread Fuzzyman
On Mar 23, 10:04 pm, geremy condra wrote: > On Tue, Mar 23, 2010 at 1:07 PM, Tim Golden wrote: > > On 23/03/2010 16:55, Jose Manuel wrote: > > >> I have been learning Python, and it is amazing I am using the > >> tutorial that comes with the official distribution. > > >> At the end my goal i

Re: Overriding "__setattr__" of a module - possible?

2010-06-17 Thread Fuzzyman
On Jun 17, 10:29 am, "Gabriel Genellina" wrote: > En Thu, 17 Jun 2010 04:52:48 -0300, Alf P. Steinbach   > escribió: > > > But who would have thunk that Python *isn't dynamic enough*? :-) > > Yep... There are other examples too (e.g. the print statement in 2.x   > bypasses sys.stdout.write; Wha

Re: Overriding "__setattr__" of a module - possible?

2010-06-19 Thread Fuzzyman
On Jun 18, 5:25 am, "Gabriel Genellina" wrote: > En Thu, 17 Jun 2010 07:12:23 -0300, Fuzzyman escribi�: > > > On Jun 17, 10:29 am, "Gabriel Genellina" > > wrote: > >> En Thu, 17 Jun 2010 04:52:48 -0300, Alf P. Steinbach   > >> escribiï

Re: The real problem with Python 3 - no business case for conversion (was "I strongly dislike Python 3")

2010-07-07 Thread Fuzzyman
On Jul 5, 1:34 am, sturlamolden wrote: > On 5 Jul, 01:58, John Nagle wrote: > > >      Exactly. > > >      The "incompatible with all extension modules I need" part > > is the problem right now.  A good first step would be to > > identify the top 5 or 10 modules that are blocking a move to > > Py

Re: grailbrowser now running under python 2.5 (probably above too)

2010-07-11 Thread Fuzzyman
On Jul 11, 5:16 pm, rantingrick wrote: > On Jul 11, 9:01 am, a...@pythoncraft.com (Aahz) wrote: > > > As usual, you would rather tell other people what to do instead of doing > > any work yourself. > > Dear God! My statement was intended to fetch responses like... > >   "Hey, that sounds like a gr

Re: grailbrowser now running under python 2.5 (probably above too)

2010-07-12 Thread Fuzzyman
On Jul 12, 1:21 am, rantingrick wrote: > On Jul 11, 5:28 pm,Fuzzyman wrote: > > > But why hijack someone else's announcement to do that? Congratulations > > alone would have been great. However good your intentions your message > > came across as "but it would

Re: pyc files not automatically compiled on import

2009-07-26 Thread Fuzzyman
On Jul 26, 5:22 pm, Baz Walter wrote: > hello > > i thought that python automatically compiled pyc files after a module is > successfully imported. what could prevent this happening? > > Python 2.6.1 (r261:67515, Apr 12 2009, 03:51:25) > [GCC 4.3.2] on linux2 > Type "help", "copyright", "credits"

Re: Is python buffer overflow proof?

2009-08-07 Thread Fuzzyman
On Aug 3, 10:04 pm, sturlamolden wrote: > On 2 Aug, 15:50, Jizzai wrote: > > > Is a _pure_ python program buffer overflow proof? > > > For example in C++ you can declare a char[9] to hold user input. > > If the user inputs 10+ chars a buffer overflow occurs. > > Short answer: NO > > Bounds checki

Re: Is python buffer overflow proof?

2009-08-07 Thread Fuzzyman
On Aug 4, 6:06 am, John Nagle wrote: > Gabriel Genellina wrote: > > En Mon, 03 Aug 2009 18:04:53 -0300, sturlamolden > > escribió: > > >> On 2 Aug, 15:50, Jizzai wrote: > > >>> Is a _pure_ python program buffer overflow proof? > > >>> For example in C++ you can declare a char[9] to hold user inp

ANN: discover 0.3.0 released, automatic test discovery for unittest

2009-08-20 Thread Fuzzyman
The discover module is a backport of the automatic test discovery from the unittest module in Python-trunk (what will become Python 2.7 and 3.2). The discover module should work on versions of Python 2.4 upwards: * discover module on PyPI: http://pypi.python.org/pypi/discover The discover module

ANN: mock 0.6.0, Python mocking and testing library

2009-08-22 Thread Fuzzyman
mock is a Python mock object library for testing, with additional support for runtime monkey patching. Most mocking libraries follow the ‘record -> replay’ pattern of mocking. I prefer the ‘action -> assertion’ pattern, which is more readable and intuitive; particularly when working with the Pytho

Re: namespace hacking question

2010-10-01 Thread Fuzzyman
On Sep 30, 6:07 pm, kj wrote: > This is a recurrent situation: I want to initialize a whole bunch > of local variables in a uniform way, but after initialization, I > need to do different things with the various variables. > > What I end up doing is using a dict: > > d = dict() > for v in ('spam',

Re: Spreadsheet-style dependency tracking

2010-10-18 Thread Fuzzyman
On Oct 17, 12:35 pm, Florian Weimer wrote: > * Chris Torek: > > > In article <87y69xbz6h@mid.deneb.enyo.de> > > Florian Weimer   wrote: > >>Are there libraries which implement some form of spreadsheet-style > >>dependency tracking?  The idea is to enable incremental updates to > >>some fairly

<    3   4   5   6   7   8   9   >