Re: email module, redirecting to stdout

2005-10-04 Thread Just
directing stderr to stdout from the shell is not an > > option for me, because I need to use stderr for other messages. > > smtplib obtains a copy of stderr by > > from sys import stderr > > Therefore you have to do > > smtplib.stderr = sys.stdout > > to get the desired effect. Ouch. I'd consider this a bug. "from sys import stderr" should at least be considered bad style. Just -- http://mail.python.org/mailman/listinfo/python-list

Re: Using printf in a C Extension

2005-12-09 Thread Just
ot reach python stdout. > Is there something screwy with my environment or is there some trick to > this that I don't know. Any help would be greatly appreciated! Have a look at PySys_WriteStdout(). Just -- http://mail.python.org/mailman/listinfo/python-list

Re: Rebinding stdout (was: Re: Python! Is! Truly! Amazing!)

2005-01-03 Thread Just
ermail/python-dev/2000-October/010144.html > py> f.close() > py> print s.capitalize() > Test Just -- http://mail.python.org/mailman/listinfo/python-list

Re: Rebinding stdout (was: Re: Python! Is! Truly! Amazing!)

2005-01-03 Thread Just
In article <[EMAIL PROTECTED]>, Simo Melenius <[EMAIL PROTECTED]> wrote: > I've sometimes replaced sys.stdout (and/or sys.stderr) to > capture/redirect debugging information in existing code that has > unwisely just "print"ed error and warning messages, in

Re: how to stop google from messing Python code

2005-01-13 Thread Just
In article <[EMAIL PROTECTED]>, "Xah Lee" <[EMAIL PROTECTED]> wrote: > i'm using groups-beta.google.com to post python code. > > Is there a way to stop google from messing with my format? it seems to > have eaten the spaces in my python code. It does t

Re: Newbie inheritance question.

2005-01-16 Thread Just
In article <[EMAIL PROTECTED]>, Ed Leafe <[EMAIL PROTECTED]> wrote: > On Jan 16, 2005, at 9:08 AM, bwobbones wrote: > > > class two(one): > >def __init__(self): > >print "two" > > You need to specifically call the supercl

Re: (objects as) mutable dictionary keys

2005-01-17 Thread Just
> > > > It is not impossible in Python. Is too. > > It may be discouraged but it is not > > impossible since I have already done so. > > Wouldn't this raise a TypeError? Or did you wrap them with an object? He created a list subclass that redefines __hash__,

Re: lambda

2005-01-17 Thread Just
s such basic knowledge (as well as a useful feature) that I simply don't understand you saying this. > I don't see a big difference between these principles > and the hash key principle, Than you haven't looked hard enough. > so in the end may be we > should just stick with the more general principle: > > Don't use mutables! > > > and be done with it. Ok, so you're indeed a troll. Just -- http://mail.python.org/mailman/listinfo/python-list

Re: lambda

2005-01-17 Thread Just
;s useful to forbid ("discourage") 2) since mutating dict keys is seldom useful (and when it is, Python lets you support it in your own objects). Just -- http://mail.python.org/mailman/listinfo/python-list

Re: Dictionary keys (again) (was Re: lambda)

2005-01-19 Thread Just
t call last): File "", line 1, in ? File "build/lib.darwin-7.6.0-Power_Macintosh-2.3/objc/_convenience.py", line 77, in __getitem__objectForKey KeyError: [1, 1] >>> dct.keys() ((1)) >>> dct[[1]] u'Hi!' >>> k = dct.keys()[0] >>> k (1) >>> k.append(2) Traceback (most recent call last): File "", line 1, in ? File "build/lib.darwin-7.6.0-Power_Macintosh-2.3/objc/_convenience.py", line 205, in objc.error: NSInternalInconsistencyException - *** -[NSCFArray addObject:]: mutating method sent to immutable object >>> This is not all that different from Python actually, in that Cocoa tries very hard to make it impossible to mutate dict keys. Just -- http://mail.python.org/mailman/listinfo/python-list

Re: Hey, get this! [was: import from database]

2005-02-02 Thread Just
In article <[EMAIL PROTECTED]>, Steve Holden <[EMAIL PROTECTED]> wrote: > Just to make things simpler, and (;-) to appeal to a wider audience, > here is a program that doesn't use database at all (it loads the entire > standard library into a dict) and still sho

Re: XML with Unicode: what am I doing wrong?

2005-02-02 Thread Just
Error: 'ascii' codec can't encode character '\ub5' in > > position 542: ordinal not in range(128) > > > > If I set my default encoding to utf8 in sitecustomize.py, it works just > > fine. I'm thinking that I can't be the only one trying t

Re: Hash of class from instance

2005-02-02 Thread Just
In article <[EMAIL PROTECTED]>, "Joakim Storck" <[EMAIL PROTECTED]> wrote: > So I guess it might be a little bit less unwise to use id() instead > then... Why don't you use the class objects themselves as dict keys? Just -- http://mail.python.org/mailman/listinfo/python-list

Re: Reinstall python 2.3 on OSX 10.3.5?

2005-02-03 Thread Just
s you a Python installation under /sw. > > But that doesn't solve his problem, which is to restore the > Apple-supplied Python that he deleted. Also: fink is evil. I wouldn't touch it with a ten-foot pole. Just -- http://mail.python.org/mailman/listinfo/python-list

Re: Easy Q: dealing with object type

2005-02-03 Thread Just
lasses. Heck, isinstance() even works in Python 1.5.2... > Still, if you can use new-style classes, you should. > > Also, you should probably Google for "duck typing". Generally, in > Python it is frowned upon to check the type of an object. There are > times when it's necessary, but if you're just starting off, my guess is > that you haven't discovered one of these times yet... Just -- http://mail.python.org/mailman/listinfo/python-list

Re: Generating .pyc/.pyo from a make file

2005-02-03 Thread Just
*.py they have > been compiled from. True. > Copying them to other path locations will give you > the wrong __file___ information in tracebacks. This is not 100% accurate: yes, the traceback shows the original source file path, yet module.__file__ does point to the actual .pyc file it was loaded from. Just -- http://mail.python.org/mailman/listinfo/python-list

Re: Hey, get this!

2005-02-03 Thread Just
If it's a path importer, it could be a cookie, specific to the importer. I think in Steve's case initializing __path__ to ["*db*"] should work. Just -- http://mail.python.org/mailman/listinfo/python-list

Re: Hey, get this!

2005-02-03 Thread Just
In article <[EMAIL PROTECTED]>, Steve Holden <[EMAIL PROTECTED]> wrote: > > If it's a path importer, it could be a cookie, specific to the importer. > > I think in Steve's case initializing __path__ to ["*db*"] should work. > > > > Ju

Re: variable declaration

2005-02-08 Thread Just
t; - check the name exists in the local namespace, and throw an exception if it > doesn't. If it the name does exist, perform a normal store operation. But the compiler would _know_ in which scope the variable was defined, no? Just -- http://mail.python.org/mailman/listinfo/python-list

Re: Style guide for subclassing built-in types?

2005-02-24 Thread Just
ersing if iterable were huge. (and the "iterable" wouldn't be > garbage-collected because I want to keep a reference to it) If your list contains numbers (or lists of numbers), consider using NumPy (Numeric) or Numarray, in which seq[::-1] will actually return a "view"

any Python equivalent of Math::Polynomial::Solve?

2005-02-26 Thread Just
ckage that implements that? Just -- http://mail.python.org/mailman/listinfo/python-list

Re: any Python equivalent of Math::Polynomial::Solve?

2005-02-26 Thread Just
In article <[EMAIL PROTECTED]>, Nick Coghlan <[EMAIL PROTECTED]> wrote: > Just wrote: > > While googling for a non-linear equation solver, I found > > Math::Polynomial::Solve in CPAN. It seems a great little module, except > > it's not Python... I&

Re: any Python equivalent of Math::Polynomial::Solve?

2005-02-26 Thread Just
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (John M. Gamble) wrote: > In article <[EMAIL PROTECTED]>, > Just <[EMAIL PROTECTED]> wrote: > >While googling for a non-linear equation solver, I found > >Math::Polynomial::Solve in CPAN. It seems a great l

Re: any Python equivalent of Math::Polynomial::Solve?

2005-02-26 Thread Just
ranslation process to python. > > > >Ah ok, I'll try to locate that (following the instruction in Solve.pm > >didn't work for me :( ). > > > > Ouch. I just did a quick search and found that that site has undergone > a few changes, and the code tha

Re: any Python equivalent of Math::Polynomial::Solve?

2005-02-26 Thread Just
In article <[EMAIL PROTECTED]>, "Raymond L. Buvel" <[EMAIL PROTECTED]> wrote: > Just wrote: > > > > > SciPy indeed appear to contain a solver, but I'm currently stuck in > > trying to _get_ it for my platform (OSX). I'm definitely not g

Re: any Python equivalent of Math::Polynomial::Solve?

2005-02-27 Thread Just
In article <[EMAIL PROTECTED]>, "Carl Banks" <[EMAIL PROTECTED]> wrote: > Just wrote: > > While googling for a non-linear equation solver, I found > > Math::Polynomial::Solve in CPAN. It seems a great little module, > except > > it's not

Re: naming convention for scalars, lists, dictionaries ...

2005-02-28 Thread Just
hat is being unpacked and what is the source. > > "for (one, two, three) in somelist:" > versus > "for one, two, three in sometlist:" > > Even with a colorizing editor (emacs) I find the first version > easier to read. YMMV. But you're using it for _

Re: Initializing subclasses of tuple

2005-03-01 Thread Just
ialize instances of a class derived from tuple, if it's not > in the __init__ method? Hi Dave, You're going to have to override __new__. See eg. http://groups-beta.google.com/group/comp.lang.python/browse_thread/thread /4a53d2c69209ba76/9b21a8326d0ef002 http://mail.python.org/pipermail/tutor/2004-January/027779.html Good luck, Just -- http://mail.python.org/mailman/listinfo/python-list

Re: Gordon McMillan installer and Python 2.4

2005-03-03 Thread Just
In article <[EMAIL PROTECTED]>, "Serge Orlov" <[EMAIL PROTECTED]> wrote: > Svein Brekke wrote: > > > Seriously, if you're only interested in Windows, just use py2exe, > > > or if you want Linux+Windows, try cx_Freeze. > > > > Accor

Re: python -i (interactive environment)

2005-03-07 Thread Just
> Unfortunately it does so in an entirely new namespace, thereby losing > the advantage of -i - namely, that you can investigate the program's > namespace after it's terminated. code.interact() has a namespace argument ('local'), so it really easy to have it use the namespace you want. Just -- http://mail.python.org/mailman/listinfo/python-list

Re: zipimport IOError reading Modules.zip in Mac standalone app

2005-03-07 Thread Just
at be > a problem? Could it be that more than one process is trying to read > Modules.zip at the same time? If so, what do we do - I don't want to have > to include a separate version of the code for each subprocess. > > Any other suggestion? I need this fixed ASAP. I&#x

Re: PEP 338: Executing modules inside packages with '-m'

2004-12-14 Thread Just
is the sarcasm. > as for the rest of your arguments, I have to assume that you were joking. > (or > that you have no experience whatsoever of distribution of Python programs in > Unix and Windows environments). Whatever. You suggestion does not work in many cases. How about a program that starts threads? Can't do that as a side effect of import. Just -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 338: Executing modules inside packages with '-m'

2004-12-14 Thread Just
In article <[EMAIL PROTECTED]>, "Fredrik Lundh" <[EMAIL PROTECTED]> wrote: > Just wrote: > > > >> as for the rest of your arguments, I have to assume that you were joking. > >> (or > >> that you have no experience whatsoever of dist

Re: Unicode entries on sys.path

2004-12-24 Thread Just
nciple, atleast on > Windows NT+ (and also on OSX). Patches are welcome. Works for me on OSX 10.3.6, as it should: prior to using the sys.path entry, a unicode string is encoded with Py_FileSystemDefaultEncoding. I'm not sure how well it works together with zipimport, though. Just -- h

Re: Unicode entries on sys.path

2004-12-24 Thread Just
In article <[EMAIL PROTECTED]>, vincent wehren <[EMAIL PROTECTED]> wrote: > Just wrote: > > In article <[EMAIL PROTECTED]>, > > "Martin v. Lowis" <[EMAIL PROTECTED]> wrote: > > > > > >>>Hm, maybe more a windows questi

Re: Optional Static Typing

2004-12-25 Thread Just
In article <[EMAIL PROTECTED]>, moma <[EMAIL PROTECTED]> wrote: > What about this? > u'int() = t, 6, 7, What about this? u'int() = t, 6, 7,' ...which is valid Python today. Just -- http://mail.python.org/mailman/listinfo/python-list

Re: Improving Python (was: Lambda going out of fashion)

2004-12-26 Thread Just
dule is deprecated" yada yada too > seriously. and what do the python-devers do? they add a "sum" built-in, > but no "join"? hello? That's what you get for unsubscribing ;-) Just -- http://mail.python.org/mailman/listinfo/python-list

Re: unicode character '\N{ }'

2005-04-11 Thread Just
verse of this process? For example, > when > I have a unicode character '£', uc.method() should return the character name > 'POUND SIGN' in str format. import unicodedata name = unicodedata.name(c) Just -- http://mail.python.org/mailman/listinfo/python-list

Re: deprecation of has_key?

2005-04-22 Thread Just
in-toss to a no-brainer. The main argument was that nothing but "key in d" made sense (for __contains__), and that therefore "for key in d" was the only option, for symmetry with the other "in". Just -- http://mail.python.org/mailman/listinfo/python-list

Re: python coding contest

2005-12-31 Thread Just
printable variant without the \r: > > j=''.join;seven_seg=lambda x:j(j(' _ |_|_ _| > |'[ord('^rm=3|4:s»'[int(c)])%d*2:][:3]for c in x)+"\n"for d in(3,8,7)) > > Note that there is only one non-ascii character in the code. Which isn't. So I'm not sure what the point is you're trying to make. Just -- http://mail.python.org/mailman/listinfo/python-list

Re: Memoization and encapsulation

2005-12-31 Thread Just
ef func(x): result = _cache.get(x) if result is None: result = x + 1 # or a time consuming calculation... _cache[x] = result return result Just -- http://mail.python.org/mailman/listinfo/python-list

Re: python coding contest

2005-12-31 Thread Just
In article <[EMAIL PROTECTED]>, Just <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > Christoph Zwerschke <[EMAIL PROTECTED]> wrote: > > > Mark Dickinson wrote: > > > Here's a variant of André's brilliant idea that's

Re: py-cocoa?

2005-12-31 Thread Just
In article <[EMAIL PROTECTED]>, Lin-Chieh Shangkuan <[EMAIL PROTECTED]> wrote: > It's known that combining GTK+ or Qt with Python could enable the > GUI design with pygtk/pyqt. > > In Mac OSX, it's suggested that use Cocoa be the GUI framework. > Is the

Re: Stack trace in C

2006-07-25 Thread Just
t_exception and print_tb. >From C, PyErr_Print() is often handy (if only for debugging). Just -- http://mail.python.org/mailman/listinfo/python-list

Re: Bug in re module?

2006-10-06 Thread Just
In article <[EMAIL PROTECTED]>, "Ant" <[EMAIL PROTECTED]> wrote: > Ant wrote: > > Look at the following minimal example: > ... (snip example that shows non-capturing group capturing) > > Note I get the same results from python versions 2.4 and 2.5.

Re: CENSORSHIP - Django Project (Schema Evolution Support)

2006-06-07 Thread Just
In article <[EMAIL PROTECTED]>, Erik Max Francis <[EMAIL PROTECTED]> wrote: > Thorsten Kampe wrote: > > > I think I have a deja-vu... Did someone say "Xah"?! > > With a hint of Brandon. And a slice of Timothy Rue. Just -- http://mail.python.org/mailman/listinfo/python-list

Re: The Split String Function - How to preserve whitespace?

2006-07-08 Thread Just
As I am reading Python source in this text and checking > identation this is a bit annoying :-) > > How can I stop this happening? Doesn't look like an option from the > documents. Do I have to use a regexp (scary unchartered stuff for > me...)? >>> "a\nb\nc\n&qu

Re: Doctests for nested functions

2006-09-23 Thread Just
I think we had that discussion before, but that's not what nested functions are for (in Python). Use modules for that. Also solves your doctest problem nicely. Just -- http://mail.python.org/mailman/listinfo/python-list

Re: Thread Question

2006-03-01 Thread Just
examples that used classes, and > >> other examples that just called one thread start command - when should > >> you use one over another? > > > >For simple use it doesn't matter. Use a class when you want to add more > >state or behaviour - for example you

Re: Cross compile generation of .pyc from .py files...

2006-03-01 Thread Just
em for the i686 > system where they were being cross-compiled... .pyc files are only compatible with the same major Python version, so it sounds like you're using different versions on both platforms. Just -- http://mail.python.org/mailman/listinfo/python-list

Re: getting the reference count of an object ...

2006-03-03 Thread Just
ating a dict subclass that counts > the number of assignments and deletions but that seems cumbersome (an > bug-prone). > > Is there a way to get the reference count of these datadict items? I > imagine that this would be a more stable implementation of such a feature. > >

Re: pop3proxy

2005-05-02 Thread Just
In article <[EMAIL PROTECTED]>, BrokenClock <[EMAIL PROTECTED]> wrote: > Here is a python newbie! I've choose it to make a pop3 proxy - I want to > filter content between a pop3 client and a pop3 server, and I have no > control on the server... > First, I wanted

Re: py2exe and library.zip

2005-05-04 Thread Just
In article <[EMAIL PROTECTED]>, Peter Hansen <[EMAIL PROTECTED]> wrote: > [ ... ] (Note to self: check if zip files that can > be in sys.path can be compressed, Yes. > and if py2exe compresses them.) Don't know, but I assume yes. Just -- http://mail.python.org/mailman/listinfo/python-list

Re: py2exe + svn - the final drama

2005-05-06 Thread Just
ul help snipped] the zipimport module has an attr called _zip_directory_cache, which is a dict you can .clear(). Still, reloading modules is hairy at best, its probably easiest to relaunch your app when the .zip file has changed. Just -- http://mail.python.org/mailman/listinfo/python-list

Re: py2exe + svn - the final drama

2005-05-07 Thread Just
In article <[EMAIL PROTECTED]>, David Bolen <[EMAIL PROTECTED]> wrote: > Just <[EMAIL PROTECTED]> writes: > > > the zipimport module has an attr called _zip_directory_cache, which is a > > dict you can .clear(). Still, reloading modules is hairy at best, i

Re: namespaces in eval(): spot error in 3 line program

2005-05-25 Thread Just
In article <[EMAIL PROTECTED]>, "pasa" <[EMAIL PROTECTED]> wrote: > I'm an old time python user, but just got bitten by namespaces in eval. > If this is an old discussion somewhere, feel free to point me there. > > Based on the documentation, I woul

Re: Creating dict from keys and values

2005-05-29 Thread Just
gt; > > d = {} > > for i in range(len(data)): > > d[header[i]] = data[i] > > But this feels kind of inelegant. So: is there a better way? d = dict(zip(header, data)) Just -- http://mail.python.org/mailman/listinfo/python-list

Re: metaclass that inherits a class of that metaclass?

2005-06-01 Thread Just
s__ type also has type as its metaclass: >>> type.__class__ In other words, type is an instance of itself. Just -- http://mail.python.org/mailman/listinfo/python-list

Re: Tuple assignment and generators?

2006-05-04 Thread Just
q = r = s = t = u = v = 0 Just -- http://mail.python.org/mailman/listinfo/python-list

Re: md5 from python different then md5 from command line

2006-05-07 Thread Just
a newline: >>> import md5 >>> test = md5.new("marius\n") >>> print test.hexdigest() 0f0f60ac801a9eec2163083a22307deb Just -- http://mail.python.org/mailman/listinfo/python-list

Re: list comprehensions put non-names into namespaces!

2006-05-26 Thread Just
In article <[EMAIL PROTECTED]>, "Terry Reedy" <[EMAIL PROTECTED]> wrote: > "Mel Wilson" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Point of information, would this be the interpreter putting > > the result of its last calculation in _ ? > > Yes, [ ... ] No, actually. It'

Re: generators shared among threads

2006-03-08 Thread Just
Synchronized(itertools.count()) > > > > That isn't a general solution but can be convenient (if I didn't mess > > it up). Maybe there's a more general recipe somewhere. > > This code is not allowed in Python 2.4. From PEP 255: [ snip ] The code also doesn&#

Re: Python Evangelism

2006-03-09 Thread Just
nt? Yeah, the URL: http://www.squidoo.com/pythonology :) Just -- http://mail.python.org/mailman/listinfo/python-list

Re: First script, please comment and advise

2006-03-09 Thread Just
. """ new_text = "" word = "" for ch in text: if ch.isalpha(): word += ch else: new_text += scramble(word) word = "" new_text += ch new_text += scramble(word) return new_text def scramble(word): """ scramble word """ from random import shuffle if len(word) < 4: return word letters = list(word[1:-1]) shuffle(letters) return word[0] + "".join(letters) + word[-1] Just -- http://mail.python.org/mailman/listinfo/python-list

Re: First script, please comment and advise

2006-03-09 Thread Just
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > My version is similar to Just one: > > from random import shuffle > > def scramble_text(text): > """Return the words in input text string scrambled > except for the first and la

Re: First script, please comment and advise

2006-03-09 Thread Just
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > Just: > > > Btw. I find the use of a nested function here completely bogus: you > > don't need the surrounding scope. > > I don't agree, nested functions are useful to better structure your &

Re: First script, please comment and advise

2006-03-10 Thread Just
y into a helper function, giving that function a name and sticking it into a module can _hardly_ be called "pollution". That's what modules are *for*. [ ... ] > >To me, nested functions (in Python) are *only* helpful when using closures. > >If you're not

Re: Cheese Shop -> BSOL?

2006-03-11 Thread Just
ot;Bright Side of Life"? > > > I think I'd prefer "The Larch"... > > Or just "SPAM" ( Python Modules ?) Standard Python Archive (of) Modules? Just -- http://mail.python.org/mailman/listinfo/python-list

Re: Generating exceptions from C

2006-03-18 Thread Just
In article <[EMAIL PROTECTED]>, Jacob Kroon <[EMAIL PROTECTED]> wrote: > I'll just reply to myself what I've found out so far: > > > 1. PyErr_NewException() creates the exception _class_, not the > > instance right ? > > > Looks like it does

Re: import random module

2006-03-23 Thread Just
olve the problem at hand, at least > there's nothing in the PEP that says it will. "import random" is an > absolute import even in random.py is in the current directory, because > current directory is in sys.path. Unless there's a change sys.path > planned, the sh

Re: Quickie: converting r"\x2019" to int

2006-04-06 Thread Just
In article <[EMAIL PROTECTED]>, Kent Johnson <[EMAIL PROTECTED]> wrote: > Robin Haswell wrote: > > Hey guys. This should just be a quickie: I can't figure out how to convert > > r"\x2019" to an int - could someone give me a hand please? > > Is thi

Re: just one more question about the python challenge

2006-04-12 Thread Just
ch modules/functions to use, I'd be more than happy > reading up on them myself. I just hate not knowing where to go to begin > with (even though I know I probably won't know enough about images to > use the right module properly either, but I can try). Have a look at the url of the image, then try the next. Just -- http://mail.python.org/mailman/listinfo/python-list

Re: just one more question about the python challenge

2006-04-12 Thread Just
do from > >> there. I don't know what it means to distribute a file bytewise, but if > >> I knew exactly which modules/functions to use, I'd be more than happy > >> reading up on them myself. I just hate not knowing where to go to begin > >> with (even thoug

Re: how to call python code from C#

2005-01-25 Thread just starting
> >> How can I call python code from my C# code. > [snip] > > You could use ctypes or the pywin32 package to provide your > > Python code with an ActiveX interface. Then you could just > > use it via COM, like any other COM object. Lots of references > > availabl

SPAM

2007-11-14 Thread just bob
-- http://mail.python.org/mailman/listinfo/python-list

Re: SPAM

2007-11-14 Thread just bob
"John Bean" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Wed, 14 Nov 2007 11:04:35 -0800, "just bob" > <[EMAIL PROTECTED]> wrote: > >> > > Your SPAM appears to be non-existent. Vapourware. Not real. > > Shame, I

Re: SPAM

2007-11-15 Thread just bob
"Lew" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > just bob wrote: >> "John Bean" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >>> On Wed, 14 Nov 2007 11:04:35 -0800, "just bob" >>&

Should ctypes handle mis-matching structure return ABI between mingw and MSVC?

2011-07-05 Thread Just Fill Bugs
According the Bug 36834 of gcc, there is a mis-matching between mingw and MSVC when a struct was returned by value from a C function. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36834 Should ctypes handle this situation automatically somehow? A ctypes discussion on 2009: http://thread

How to load file .py

2009-03-20 Thread Im Just GembeL
Hello all My name is agiz.im student from indonesia.im stay in borneo island. Hmm. im instal python version 3 and Im try file schemafuzz.py this file created by darkc0de. And my question.how to load file schemafuzz.py in vista? after try to load file with commanD Python schemafuzz.py but my vista

Coming from delphi - looking for an IDE - willing to spend money

2006-04-24 Thread Just call me James
Hi, Coming away from the luxury of the delphi IDE has been something of a shock. As a consequence I've become aware that maybe I need to spend some money on a python IDE. As a beginner I reckon integrated debugging would be helpful. Does anyone have any advice or suggestions? So far I've glance

python debugger tips?

2008-10-10 Thread just . another . random . user
Hi All, I'm switching to python from perl, and like the language a ton, but I find pdb and pydb to be vastly inferior debuggers to the perl version. In particular, I've grown very used to stepping into arbitrary functions interactively. For instance, in perl you can do this: casqa1:~> perl -de

Looking for a decent HTML parser for Python...

2006-12-05 Thread Just Another Victim of the Ambient Morality
I'm trying to parse HTML in a very generic way. So far, I'm using SGMLParser in the sgmllib module. The problem is that it forces you to parse very specific tags through object methods like start_a(), start_p() and the like, forcing you to know exactly which tags you want to handle. I

Re: Looking for a decent HTML parser for Python...

2006-12-05 Thread Just Another Victim of the Ambient Morality
"Just Another Victim of the Ambient Morality" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I'm trying to parse HTML in a very generic way. >So far, I'm using SGMLParser in the sgmllib module. The problem is > that it forces you to pars

Re: Looking for a decent HTML parser for Python...

2006-12-05 Thread Just Another Victim of the Ambient Morality
"Just Another Victim of the Ambient Morality" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > >Okay, I think I found what I'm looking for in HTMLParser in the > HTMLParser module. Except it appears to be buggy or, at least, not very robust.

I'm looking for a pythonic red-black tree...

2006-12-14 Thread Just Another Victim of the Ambient Morality
I need a red-black tree in Python and I was wondering if there was one built in or if there's a good implementation out there. Something that, lets face it, does whatever the C++ std::map<> allows you to do... Thank you... -- http://mail.python.org/mailman/listinfo/python-list

Getting VideoCapture to work with Python 2.5

2006-12-29 Thread Just Another Victim of the Ambient Morality
I can't seem to get VideoCapture (http://videocapture.sourceforge.net/) to work with my version of Python (2.5). Why is that? I've followed the instructions which made it look easy but, as it happens all too often, it simply doesn't work. The error I get is that the .py interface file can

Unexpected behaviour with HTMLParser...

2007-10-09 Thread Just Another Victim of the Ambient Morality
HTMLParser is behaving in, what I find to be, strange ways and I would like to better understand what it is doing and why. First, it doesn't appear to translate HTML escape characters. I don't know the actual terminology but things like & don't get translated into & as one would like.

Re: Unexpected behaviour with HTMLParser...

2007-10-09 Thread Just Another Victim of the Ambient Morality
"Diez B. Roggisch" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Just Another Victim of the Ambient Morality schrieb: >> HTMLParser is behaving in, what I find to be, strange ways and I >> would like to better understand what it is doing and w

Need help parsing with pyparsing...

2007-10-22 Thread Just Another Victim of the Ambient Morality
I'm trying to parse with pyparsing but the grammar I'm using is somewhat unorthodox. I need to be able to parse something like the following: UPPER CASE WORDS And Title Like Words ...into two sentences: UPPER CASE WORDS And Title Like Words I'm finding this surprisingly hard to do

Re: Need help parsing with pyparsing...

2007-10-22 Thread Just Another Victim of the Ambient Morality
"Paul McGuire" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Oct 22, 4:18 am, "Just Another Victim of the Ambient Morality" > <[EMAIL PROTECTED]> wrote: >> I'm trying to parse with pyparsing but the grammar I'm usin

Is there a usenet library for Python?

2007-10-30 Thread Just Another Victim of the Ambient Morality
Is there a Python library to communicate with a usenet server? I did a bit of googling and found some sites that suggest that you can roll your own fairly easily but, mostly, I got a lot of false positives with talk of Python libraries on usenet and I am really hoping this work has already

Is pyparsing really a recursive descent parser?

2007-11-01 Thread Just Another Victim of the Ambient Morality
Is pyparsing really a recursive descent parser? I ask this because there are grammars it can't parse that my recursive descent parser would parse, should I have written one. For instance: from pyparsing import * grammar = OneOrMore(Word(alphas)) + Literal('end') grammar.parseString('Firs

Re: Is there a usenet library for Python?

2007-11-01 Thread Just Another Victim of the Ambient Morality
"Grant Edwards" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On 2007-10-30, Just Another Victim of the Ambient Morality > <[EMAIL PROTECTED]> wrote: > >> Is there a Python library to communicate with a usenet server? > > Which protoc

Re: Is pyparsing really a recursive descent parser?

2007-11-02 Thread Just Another Victim of the Ambient Morality
y for "Recursive Descent Parser" describes this > parser model as a "predictive parser", and later goes on to say that > some (uncited) authors equate "predictive parser" with "recursive > descent parsers". The article makes a special distinction fo

Re: Is pyparsing really a recursive descent parser?

2007-11-03 Thread Just Another Victim of the Ambient Morality
"Paul McGuire" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Nov 3, 12:33 am, "Just Another Victim of the Ambient Morality" > <[EMAIL PROTECTED]> wrote: >> It has recursion in it but that's not sufficient to call it a >

Re: Is pyparsing really a recursive descent parser?

2007-11-03 Thread Just Another Victim of the Ambient Morality
"Neil Cerutti" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On 2007-11-03, Paul McGuire <[EMAIL PROTECTED]> wrote: >> On Nov 3, 12:33 am, "Just Another Victim of the Ambient Morality" >><[EMAIL PROTECTED]> wrote: >>>

Re: Is pyparsing really a recursive descent parser?

2007-11-04 Thread Just Another Victim of the Ambient Morality
"Neil Cerutti" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On 2007-11-04, Just Another Victim of the Ambient Morality > <[EMAIL PROTECTED]> wrote: >> >> "Neil Cerutti" <[EMAIL PROTECTED]> wrote in message >> n

Re: Is pyparsing really a recursive descent parser?

2007-11-04 Thread Just Another Victim of the Ambient Morality
"Neil Cerutti" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On 2007-11-04, Just Another Victim of the Ambient Morality > <[EMAIL PROTECTED]> wrote: >>> Consider writing a recursive decent parser by hand to parse >>> the l

Re: Is pyparsing really a recursive descent parser?

2007-11-04 Thread Just Another Victim of the Ambient Morality
"Neil Cerutti" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On 2007-11-04, Just Another Victim of the Ambient Morality > <[EMAIL PROTECTED]> wrote: >> "Neil Cerutti" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PR

Re: Is pyparsing really a recursive descent parser?

2007-11-04 Thread Just Another Victim of the Ambient Morality
"Kay Schluehr" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Nov 4, 10:44 pm, "Just Another Victim of the Ambient Morality" > <[EMAIL PROTECTED]> > >> I believe there is a cure and it's called recursive descent parsing. >

  1   2   >