Re: OpenSource documentation problems

2005-09-02 Thread skip
ded. Also, "not that long ago" must mean different things for different people. I think we've required logins for three years or more. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: improvements for the logging package

2005-09-06 Thread skip
Eschewing PEP 8 is fine for other stuff, but code in the Python core (especially new code like the logging module) should strive to adhere to PEP 8, since many people will use the core code as a pattern for their own code. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: improvements for the logging package

2005-09-07 Thread skip
>> - It's a package, but contrary to any other package I've ever seen, >> most of its functionality is implemented in __init__.py. Trent> I'm not defending the implementation, but does this cause any Trent> particular problems? No, it just seems symptomatic of some potential or

Re: improvements for the logging package

2005-09-08 Thread skip
ybe going forward we should be more adamant about that when an external module becomes a candidate for inclusion in the core. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Timezone and ISO8601 struggles with datetime and xml.utils.iso8601.parse

2005-09-09 Thread skip
etime.datetime.now() >>> t datetime.datetime(2005, 9, 9, 12, 52, 38, 677120) >>> strtime = t.isoformat() >>> strtime '2005-09-09T12:52:38.677120' You can try stripping the microseconds first: >>> time.strptime(strtime, "%Y-%m-%

Re: improvements for the logging package

2005-09-13 Thread skip
d as an informal educational tool. As for the others (and logging as well, for that matter), maybe it's just been too long to make changes and they should only be changed in Py3K. Skip -- http://mail.python.org/mailman/listinfo/python-list

distutils equivalent of config.status?

2005-09-13 Thread skip
automatic or at least under user control. I don't want the setup.py author to control this feature. Thx, Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: improvements for the logging package

2005-09-14 Thread skip
>> It does, in the "in-development" version of the documentation. Sorry it >> was not in the 2.4 releases :-( Thomas> Maybe it can be backported to 2.4.2 - is there still time for that? Changed now in CVS. When 2.4.2 is released it should be there. Skip -

Re: improvements for the logging package

2005-09-14 Thread skip
meter change to basicConfig() as happening in 2.4. I didn't change any code. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: /usr/lib/python2.3/site-packages/_mysql.so: undefined symbol: mysql_rollback

2005-09-16 Thread skip
xt --help in the MySQLdb source dir. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: /usr/lib/python2.3/site-packages/_mysql.so: undefined symbol: mysql_rollback

2005-09-16 Thread skip
thomas> ImportError: /usr/lib/python2.3/site-packages/_mysql.so: undefined thomas> symbol: mysql_rollback skip> Is your libmysql.so installed in an odd place? Oh, also, try executing ldd /usr/lib/python2.3/site-packages/_mysql.so If that shows libmysql as undefin

Re: Creating a list of Mondays for a year

2005-09-18 Thread skip
How about: import datetime oneday = datetime.timedelta(days=1) oneweek = datetime.timedelta(days=7) year = 2005 start = datetime.date(year=year, month=1, day=1) while start.weekday() != 0: start += oneday days = [] while start.year == year: da

Re: /usr/lib/python2.3/site-packages/_mysql.so: undefined symbol: mysql_rollback

2005-09-21 Thread skip
t at Sourceforge: http://sourceforge.net/projects/mysql-python Andy Dustman, the author, is generally quite quick to respond. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: subprocess module and long-lived subprocesses

2012-01-20 Thread skip
g behaviour: ... > I think everyone winds up with their own wrapper around subprocess > after they use it for more than a short period... Thanks, that saves me much head scratching. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Tuples

2005-12-15 Thread skip
>>> print x[0] [1, 2, 3] >>> print x[0][1] 2 >>> x[0][1] = 5 >>> print x [[1, 5, 3], [4, 5, 6]] Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: doubt on csv file

2005-12-15 Thread skip
ting_value, ...] writer = csv.writer(csvfile) writer.writerow(newrow) csvfile.close() You didn't give any details on the structure of your csv file, so the construction of newrow is purposely fuzzy. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Enumeration idioms: Values from different enumerations

2005-12-16 Thread skip
x27;, 'sun') col.blue == "blue" day.tue == 23 If they return False I would expect col.blue == day.tue to return False as well, not raise an exception. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Enumeration idioms: Values from different enumerations

2005-12-16 Thread skip
iltins behave that way? How about anything in the >> python standard library? Ben> No to both; I believe this may be a defining property of Ben> enumerations. Am I wrong? I think so. <0.5 wink>. I think you should be able to compare any two objects. I think the co

Re: Join CodingCache.com

2005-12-17 Thread skip
ramming language community as a whole (or Python in particular) has any unmet needs in the communication area. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: ANNOUNCE; Try python beta

2005-12-19 Thread skip
or may be available in the server error log. Apache/1.3.26 Server at www.mired.org Port 80 in the terminal just now (9:05 or so CST). Skip -- http://mail.python.org/mailman/listinfo/python-list

mod_python and threads

2005-12-19 Thread skip
I'm just getting started with Myghty and using it under mod_python (also a new beast for me). Do I have to worry about threading conflicts between different mod_python interpreters or are they all independent? Thx, Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Is it possible to use python to unit test C++ code?

2005-12-21 Thread skip
n (check out SWIG and/or Boost and/or Python's Extending and Embedding documentation), then write test cases. For that, look at the unittest and doctest modules that come with Python as well as the third-party py.test package. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Is it possible to use python to unit test C++ code?

2005-12-22 Thread skip
d the header files from your C++ library and it will by dynamically linked against the library's .so (or .dll). Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: What is unique about Python?

2005-12-23 Thread skip
> Yacc has been around for a long time. Sure, but it's capitalized there. Python innovated the use of lower-case 'y'. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: suppress pyc generation

2005-12-25 Thread skip
c generation? Take a look at PEP 304 and see if that would meet your needs: http://www.python.org/peps/pep-0304.html If you have comments on it, best to submit a tracker item on Sourceforge in addition to posting your ideas here to make sure they don't get lost. Skip -- http://mail.p

Re: how to modify the csv file

2005-12-27 Thread skip
yogi> now if i got to modify one particular line from these three rows, yogi> how can i do that. Check out the csv module. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: csv module

2005-12-28 Thread skip
ber.csv", "rb").read() '1\t2\tabc\n3\t4\tdef\n' I get: >>> sniffer = csv.Sniffer() >>> d = sniffer.sniff(open("tabber.csv", "rb").read()) >>> d.delimiter '\t' Can you provide a concrete example (preferably in a bug report on SF)? Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: csv module

2005-12-28 Thread skip
r.sniff(open("tabber.csv", "rb").read()) me> >>> d.delimiter me> '\t' BTW, this also seems to work with a Mac-style EOL: >>> open("tabber.csv", "rb").read() '1\t2\tabc\r3\t4\tdef\r' &g

Re: csv module

2005-12-28 Thread skip
Laurent> If I change: Laurent> freq = line.strip().count(char) Laurent> by: Laurent> freq = line.count(char) Laurent> It works fine. Laurent> Do you have a workaround for that? Nope. I just checked in precisely your fix to the Python repositor

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2005-12-28 Thread skip
Hans> Robert Kern wrote: >> PyPy will not bring about the Singularity. Hans> But if it did, imagine how cool that would look on the developers Hans> resumes... :-) +1 QOTW Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2005-12-28 Thread skip
John> Guido may or may not realise it, but he seems to have been John> managing people (in some sense of 'managing', anyway) quite John> successfully over the past decade or so. Sssh! Don't tell him! Hopefully the PSU won't find out and -- http://mail.python.org/mailman/listinfo/py

Re: Question about re.sub and callables

2005-12-29 Thread skip
st): p = re.compile("([0-9])") def repl(m): return pre + m.group(1) + post print p.sub(repl, data) For a full explanation, google for "python nested scopes". Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Memoization and encapsulation

2005-12-31 Thread skip
obviously a bit slower, you can memoize any function without tweaking its source. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting terse tracebacks?

2006-01-01 Thread skip
(f.split(os.sep)[-1], c, l) for (f, c, l) in info] return '\n'.join(['[%s|%s|%d]' % x for x in info[:size]]) def print_compact_stack(f=sys.stderr, start=0, size=100): print >> f, compact_stack(start+1, size) Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Regex anomaly

2006-01-05 Thread skip
.org/moin/Python3%2e0Suggestions Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Encoding sniffer?

2006-01-05 Thread skip
Andreas> Does anyone know of a Python module that is able to sniff the Andreas> encoding of text? I have such a beast. Search here: http://orca.mojam.com/~skip/python/ for "decode". Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: pdb.py - why is this debugger different from all other debuggers?

2006-01-05 Thread skip
breaking down and learning how to use pdb. ;-) Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Spelling mistakes!

2006-01-06 Thread skip
my_x = x() my_x.someMethod() When run you will get this output: Traceback (most recent call last): File "slot.py", line 9, in my_x.someMethod() File "slot.py", line 6, in someMethod self.sumName = "bye" AttributeError: 'x' object has no attribute 'sumName' Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Spelling mistakes!

2006-01-06 Thread skip
uot;referer", as in the HTTP_REFERER header in the HTTP spec: http://en.wikipedia.org/wiki/Referer In fact, googling for "referer" and "referrer" reports a similar number of hits, unlike most misspellings. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Spelling mistakes!

2006-01-06 Thread skip
misspelled word does. Maybe I've been using Unix systems for too long with their brief command names like mv and grep. I prefer not to write big_honkin_long_names any more than I have to either. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Spelling mistakes!

2006-01-07 Thread skip
was pining for attribute declarations. __slots__ is the closest thing Python has to them. I don't use them myself (since I've basically avoided new-style classes so far). Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Spelling mistakes!

2006-01-08 Thread skip
. Okay, so that's a few things... Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Spelling mistakes!

2006-01-08 Thread skip
>> 1. It's generally faster than reaching for the dictionary. Terry> But not faster than use a dict server! Why not just use (e.g.) Terry> kdict? Maybe because not everybody has it? % kdict -bash: kdict: command not found Skip -- http://mail.python.org

Re: Spelling mistakes!

2006-01-09 Thread skip
never acquired anything new, the world certainly would look Sybren> different. I'm not sure what in my response suggested to you that I never install new software on my computers. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Failing unittest Test cases

2006-01-10 Thread skip
Michele> I am also +1 to run the tests in the code order. Got any ideas how that is to be accomplished short of jiggering the names so they sort in the order you want them to run? Skip -- http://mail.python.org/mailman/listinfo/python-list

ctypes & C++

2006-01-10 Thread skip
Thomas, Ctypes doesn't work to call arbitrary C++ code, is that correct? Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Spelling mistakes!

2006-01-11 Thread skip
punches?). I do remember the IBM Model 29 punch card machines, though as a student nobody was there to punch my cards or verify them for me... :-( Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Spelling mistakes!

2006-01-12 Thread skip
op it and move onto other things. The clear evidence from people who admit to having practical experience using unit tests (or pylint or pychecker) is that catching misspellings is an extremely shallow bug to find and fix if you use the tools at your disposal. Skip -- http://mail.python.org/ma

Asking for help effectively

2006-01-12 Thread skip
is nowhere near the actual message text you were responding to, making it that much more difficult to identify your problem. Read this essay: http://www.catb.org/~esr/faqs/smart-questions.html then try again. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: atexit + threads = bug?

2006-01-12 Thread skip
alled when the main thread exits. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: atexit + threads = bug?

2006-01-13 Thread skip
David> entirely intact", as the Py_Finalize comment says. ... David> This seems simple. Am I overlooking something? A patch? <0.5 wink> Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: XEmacs python-mode question

2006-01-13 Thread skip
ake-variable-buffer-local 'py-python-command) and let me know if that allows your Local Variables setting to work. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: pdb.py - why is this debugger different from all other debuggers?

2006-01-16 Thread skip
rameEx (the main interpreter loop). I also find pdb fairly unnecessary. A combination of unittests, inserted prints and the occasional use of cgitb is generally sufficient for my needs. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: pythonic way of making a config module

2006-01-18 Thread skip
ew> What is a pythonic equivalent? Take a look at the ConfigParser module. It reads and writes Windows-style INI files. Also, you can do something similar to what you do in Perl. It's just that you import the config data from the places that need it instead of exporting it from the plac

Re: Being unjust

2006-01-18 Thread skip
e lots of ways to approach web app frameworks. They all have their pros and cons. Deciding on one to ship with Python will likely be a significant challenge. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: a more precise re for email addys

2006-01-18 Thread skip
r regular expression does what you want is to provide a set of strings it must accept and another set which it must reject. Supply those two sets and I'm sure any number of people here can come up with a regular express that distinguishes the two sets. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Being unjust

2006-01-18 Thread skip
should narrow it Paul> down some. Even your technique narrows the list of candidates down to one, that doesn't solve the problem. There is a certain "stamp of approval" implicit with inclusion in the standard library. It's thus a fairly important decision to get at l

Re: a more precise re for email addys

2006-01-18 Thread skip
Jim> http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html Maybe Cafe Express could be convinced to put that on a t-shirt... Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: New Python.org website ?

2006-01-19 Thread skip
e as I Roel> handle any other advertisement: throw it away. Sure, but that's not what JW said. He said that *when looking at ads* the only bits of content people read are the captions of the pictures. He said nothing about what people read when they are reading non-advertising content. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Python code written in 1998, how to improve/change it?

2006-01-19 Thread skip
e class (referenced in the 1998 post you refer to) is available here: http://orca.mojam.com/~skip/python/fsm.py It's still in use, though I haven't written anything new with it in a year or so. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: CSV Parser and unusual (?) linesterminator - misunderstanding?

2006-01-20 Thread skip
Tino> Is this going to be changed? Is someone working on it? Or are Tino> patches for SF wanted? A patch that removes this constraint would be helpful. Skip -- http://mail.python.org/mailman/listinfo/python-list

OT: introduction to computing clusters?

2006-01-20 Thread skip
sters (Linux or Solaris would be the software environment), I'd appreciate a reference. Thanks, Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Firefox bug in webbrowser module on Ubuntu?!

2006-01-21 Thread skip
if _iscommand(browser): register(browser, None, Mozilla(browser)) where Mozilla == Netscape, so your proposed fix appears to be correct. (Which reminds me, I have a patch to webbrowser.py to test...) Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Error in Python documentation

2006-01-21 Thread skip
] I'll submit a bug report. A quick glance didn't locate the source of the problem. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Error in Python documentation

2006-01-21 Thread skip
... [much page traversal deleted] ... peter> So you need to add a bug to the Python bug tracker -- at least so peter> it seems. If you go to the top of the doc tree: http://docs.python.org/ and look in the left-hand sidebar you'll see "[EMAIL PROTECTED]" under the heading "Emai

compiler.walk() what am I missing?

2006-07-11 Thread skip
getChildren lineno None ... but successive calls just yielded the more electron-conserving: dispatch Module dispatch Stmt dispatch Assign dispatch AssName dispatch Const dispatch Assign dispatch AssName dispatch Const What am I doing wrong? Thanks, Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Progress Bars in python

2006-07-12 Thread skip
Hari> So in order to see that the script is working and not stuck, I'd Hari> like to implement some kind of progress bar or something, ... Here's mine: http://orca.mojam.com/~skip/python/progress.py There are both Progress and Counter classes. Same idea, differe

Re: How to delete a Python package

2006-07-12 Thread skip
package formats. And one or two people don't use Linux yet. Uninstall support would be a good idea... Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: How to delete a Python package

2006-07-12 Thread skip
Not everyone uses Linux. Or Windows. Or Macs. Python is a cross-platform language. Through distutils it includes a basic cross-platform installation facility. It probably ought to also have a corresponding basic cross-platform uninstall facility. Skip -- http://mail.python.org/mailman/listinfo/python-list

PSU alert: Watch out for the anti-effbot

2006-07-13 Thread skip
The PSU warns you to keep on the lookout for posts from the anti-effbot. It's rumored that he recently turned up in this quadrant of the galaxy. His posts tend to be somewhat illogical, suggest a poor mastery of software engineering in general and Python in particular, and seem unnervingly friend

Re: Chunking sequential values in a list

2006-07-13 Thread skip
.value = True def __call__(self, val): if self.last is not None and self.last+1 != val: self.value = not self.value self.last = val return self.value for key, group in groupby([1,2,3, 5,6, 8, 12,13,14], Counter()): print list(group) Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: NB question on global/local variables in functions

2006-07-15 Thread skip
Python's key concepts is "we're all adults here". You can't really and truly hide c1 and c2, so just act responsibly and don't mess with them from outside the function module. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: NB question on global/local variables in functions

2006-07-15 Thread skip
indow', 'INSERT', 'BuiltinMethodType', 'BROWSE', 'Tcl', 'BuiltinFunctionType', 'BaseWidget', 'PROJECTING', 'MethodType', 'TracebackType', 'BEVEL', 'E', 'InstanceType', 'BOTH', 'PIESLICE', 'Button', 'sys', 'Y', 'Entry', 'Message', 'PhotoImage', 'RIGHT', 'BufferType', 'Studbutton', 'INSIDE', 'Menubutton', 'WRITABLE', 'StringVar', 'ARC', 'At', 'ComplexType', 'NSEW', 'SCROLL', 'NoneType'] The chance that one of those names would rebind an already existing name in your namespace is much higher. The second practical difference is that if the object referenced by a name is immutable (say, an integer), the name in the current namespace doesn't get rebound if the module modifies the value. Consider b.py: total_work = 0 def work(): global total_work print "not as hard as it might be" total_work += 1 If I execute from b import total_work, work names are created in my current namespace that reference the objects bound to those names *at that moment* in the b module's namespace. If I then call work(), it rebinds the name total_work in b's namespace (because integers are immutable), however, I don't see the effect, because the name "total_work" in my namespace is still bound to the object 0: >>> from b import total_work, work >>> total_work 0 >>> work() not as hard as it might be >>> total_work 0 >>> work() not as hard as it might be >>> total_work 0 Apparently work is really pretty easy... If, on the other hand, I import b, I get the expected behavior: >>> import b >>> b.total_work 0 >>> b.work() not as hard as it might be >>> b.total_work 1 >>> b.work() not as hard as it might be >>> b.total_work 2 because each time I reference b.total_work I'm using the name in b's namespace to find the current object to which it's bound. That's the same name that b.work() rebinds each time it's called. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: InteractiveConsole History on Linux

2006-07-16 Thread skip
ss sessions or just command recall from the current session? On my Mac your script works just fine for me (no import readline as Robert Kern indicated in his reply) to do command recall from the the current session, but more is needed if you expect to get command history across sessions. Skip -- htt

Re: Track keyboard and mouse usage

2006-07-17 Thread skip
reating other problems). As the author of watch, I'm more than happy to incorporate "drivers" from other people into the code, however, I have very little access to Linux these days (and none on the desktop) and no Windows access. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Track keyboard and mouse usage

2006-07-17 Thread skip
MCI> Look PyHook ( http://cheeseshop.python.org/pypi/pyHook/1.4 ) MCI> Ooooh!!! Sorry! It's for Windows... That's okay (well, for me anyway). Watch runs on Windows. Perhaps someone with Windows would like to plug pyHook into watch? Skip -- http://mail.python.org/

Re: New SourceForge project: Diet Python!!!

2006-07-18 Thread skip
, but Python 2.5 comes with ctypes, not calldll. Might be worth switching to remain compatible at that level. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Track keyboard and mouse usage

2006-07-18 Thread skip
much killed the market for stuff like GKS. X servers have enough features and video boards have enough performance that for all but the most demanding graphics applications there's no desired to write bits using something other than OpenGL and no need to expose the raw framebuffer at

Re: CSV with comments

2006-07-18 Thread skip
>> In csv.reader, is there any way of skip lines that start whith '#' or >> empty lines Nope. When we wrote the module we weren't aware of any "spec" that specified comments or blank lines. You can easily write a file wrapper to filter them out t

Re: No need to close file?

2006-07-18 Thread skip
T> Do I need to close the file in this case? Why or why not? T> for line in file('foo', 'r'): T> print line No. The magic of reference counting. S -- http://mail.python.org/mailman/listinfo/python-list

Re: New SourceForge project: Diet Python!!!

2006-07-18 Thread skip
>> Hm didn't I leave ctypes in there? I added calldll because it >> had a really nice can opener. Oh, I have no idea (didn't download). I just sort of assumed if you had included calldll you probably hadn't included ctypes. Skip -- http://mail.python.

Re: CSV with comments

2006-07-18 Thread skip
John> This is recursive. Unlikely of course, but if the file contained a John> large number of empty lines, might this not cause the recursion John> limit to be exceeded? Sure, but I was lazy. ;-) Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: CSV with comments

2006-07-18 Thread skip
e manually it probably isn't too complex (no newlines inside fields, for example). Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Missing rotor module

2006-07-25 Thread skip
Nick> I still don't know why it was ever included in Python. It was another time and place altogether than the world we live in today. Python was a much smaller language and had a much smaller following. Concerns about security were minimal (relative to today anyway). Skip

Re: Python-list Digest, Vol 35, Issue 10

2006-08-01 Thread skip
Paul> Can someone PLEASE remove [EMAIL PROTECTED] from the Paul> subscriber list??? BTDT. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: SWIG Python Extension winth C++ Problematic

2006-08-04 Thread skip
ied asking on the SWIG mailing list ([EMAIL PROTECTED])? There are probably many more SWIG experts there than here. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Ann: SE 2.2b

2006-08-06 Thread skip
Frederic> In the short period of time since I introduced SE. the Frederic> feedback has been overwhelmingly postive. Ummm... what is it? The last SE I had was a Mac. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Nice unicode -> ascii translation?

2006-08-07 Thread skip
crowell> However, I'd like to see the more sensible "Bela Fleck" instead crowell> of dropping '\xe9' entirely. Assuming the data are in latin-1 or can be converted to it, try my latscii codec: http://orca.mojam.com/~skip/python/latscii.py Skip --

Re: using python at the bash shell?

2006-08-07 Thread skip
ecisely what you've asked for, but it provides some features that help integrate Python with the shell environment. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: using python at the bash shell?

2006-08-08 Thread skip
ver, ever to try programming in csh... Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie question: what's with "self"?

2006-08-08 Thread skip
() b = C() If I call a.printx(), self will be bound to the same object a is bound to. If I call b.printx(), it will be bound to the object b references. The precise use of the name "self" is indeed simply a convention. You could call it "barney" if that makes you feel better. ;-) Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: #!/usr/bin/python or #!/usr/bin/env python?

2006-08-08 Thread skip
ly so I don't need to be root and don't disturb the system-provided software. In cases where other users need to run such tools I generally use /usr/local. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Best way to construct an email - attach a html file and send

2006-08-09 Thread skip
py> What is the best way to construct an email in python and also attach py> a html file ... Check out the email package. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: setup.py when you can't write to site-packages?

2006-08-09 Thread skip
up in /some/where/else/lib/python2.4/site-packages Just add that directory to PYTHONPATH and you should be good to go. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about using python as a scripting language

2006-08-09 Thread skip
print "hmmm...", repr(s), "doesn't look like an integer to me." Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: do people really complain about significant whitespace?

2006-08-09 Thread skip
es that use braces Stephen> or END or end; etc. No. In that case Python makes it more readily apparent that your code is too complex. With C, Java, C++, Perl or FORTRAN you just smush everything over to the left and pretend it's not. ;-) Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: do people really complain about significant whitespace?

2006-08-09 Thread skip
Slawomir> Well, one space is sufficient indentations for Python, right? So even Slawomir> on 80 column screen, you can easily fit about 40 levels of nesting Slawomir> before it becomes a real problem :D Oh, sure. Hence the smiley in my post... Smileys all around. I'm happ

Re: Eval (was Re: Question about using python as a scripting language)

2006-08-09 Thread skip
nts to a list of eight or twelve elements, you'd probably be interested in knowing about that asap. eval() probably wouldn't fail unless they completely butchered the table syntax. With a small amount of input massaging, you could do this more cleanly with the csv module. That's left as an exercise for the reader. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Eval (was Re: Question about using python as a scripting language)

2006-08-09 Thread skip
skip> import re skip> symbolinfo = [] skip> sympat = re.compile( skip> r'\[', Make that r',?\[' Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Eval (was Re: Question about using python as a scripting language)

2006-08-09 Thread skip
es which happens at this point in time to intersect with the definition of a Python list. You're trying to wish it was something that it's not. Skip -- http://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4   5   6   7   8   9   10   >