Re: Anonymous email users

2024-06-23 Thread Sebastian Wells via Python-list
On Fri, 14 Jun 2024 18:00:37 -0400, avi.e.gross wrote: > I notice that in some recent discussions, we have users who cannot be > replied to directly as their email addresses are not valid ones, and I > believe on purpose. Examples in the thread I was going to reply to are: > >

Re: Simple SSL client hangs

2021-07-13 Thread Douglas Wells
In article <871r821wlg@hornfels.zedat.fu-berlin.de>, Loris Bennett wrote: >In Perl I have the following > > use IO::Socket::SSL; > my $my_socket = new IO::Socket::SSL(PeerAddr => 'some.server.somewhere, > PeerPort => 12345, >

Python RPM Package build error

2011-04-28 Thread Wells, David J
Hello List, I am attempting to build an rpm from Python-3.1.3.tar.bz2 with the included spec file from /Python-3.1.3/Misc/RPM/ and it fails with the following error: Does anyone have any ideas? # rpmbuild -ba python-3.1.spec mv: cannot stat `idle': No such file or directory + echo '#!

string.Template question

2010-04-05 Thread Wells Oliver
Can you use dicts with string.Template? e.g. a structure like: game = { 'home': {'team': row['home_team_full'], 'score': row['home_score'], 'record': '0-0', 'pitcher': { 'id': home_pitcher.attrib['id'], 'name': home_pitcher.attrib['last_name'], 'wins': hom

Question about typing: ints/floats

2010-03-03 Thread Wells
This seems sort of odd to me: >>> a = 1 >>> a += 1.202 >>> a 2.202 Indicates that 'a' was an int that was implicitly casted to a float. But: >>> a = 1 >>> b = 3 >>> a / b 0 This does not implicitly do the casting, it treats 'a' and 'b' as integers, and the result as well. Changing 'b' to 3.0 wi

Instantiate an object based on a variable name

2009-12-31 Thread Wells
Sorry, this is totally basic, but my Google-fu is failing: I have a variable foo. I want to instantiate a class based on its value- how can I do this? -- http://mail.python.org/mailman/listinfo/python-list

Re: Odd json encoding erro

2009-12-15 Thread Wells
Sorry- more detail- the actual problem is an exception thrown when running str() on the value, like so: >>> a = u'St. Paul\u2019s School For Boys (MN) HS' >>> print str(a) Traceback (most recent call last): File "", line 1, in UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' i

Odd json encoding erro

2009-12-15 Thread Wells
I get this exception when decoding a certain JSON string: 'ascii' codec can't encode character u'\u2019' in position 8: ordinal not in range(128) The JSON data in question: http://mlb.com/lookup/json/named.player_info.bam?sport_code=%27mlb%27&player_id=%27489002%27 It's in the 'high_school' key

Parsing json where object keys are not quoted?

2009-12-09 Thread Wells
Is there some way to finagle the json module to parse JSON (well, almost JSON) where the object keys are not in quotes? I know it's not 100% valid JSON, but I'm just curious. I don't have control over the data, so I can't make it fit the spec :) -- http://mail.python.org/mailman/listinfo/python-l

Arcane question regarding white space, editors, and code collapsing

2009-11-18 Thread Wells
I work in TextMate a lot, which I generally love, but it's code collapsing confounds me. Essentially you have to indent blank lines to the proper level for the current block. Then it will collapse that section as one section. If you have simply a new line, it will see it as a break, and not collaps

Re: list vs tuple for a dict key- why aren't both hashable?

2009-11-08 Thread Wells
On Nov 8, 2:42 pm, Mick Krippendorf wrote: > Wells wrote: > > I'm not quite understanding why a tuple is hashable but a list is not. > > The short answer has already been given. Here is the long answer: > > For objects p and q, p==q implies hash(p)==hash(q). It is esse

list vs tuple for a dict key- why aren't both hashable?

2009-11-08 Thread Wells
I'm not quite understanding why a tuple is hashable but a list is not. Any pointers? Thanks! -- http://mail.python.org/mailman/listinfo/python-list

disutils, project structure & developing - n00b question

2009-10-29 Thread Wells
So I have my project partitioned like so: ./setup.py ./pymlb/ ./pymlb/fetcher.py ./demos ./demos/demo.py In demo.py I have: from pymlb import fetcher However, it fails b/c pymlb is up a folder. It's also NOT installed as a module in my module directory because it's a development effort and I do

Re: Komodo(!)

2009-08-14 Thread John Wells
On Fri, Aug 14, 2009 at 3:28 PM, Kee Nethery wrote: > From the web site it looks like the free version does not include the > debugging stuff. > > I've been using the paid version with the debugger functionality and I find > it easy to use and incredibly nice for trying to understand what the code

Ordering of dict keys & values

2009-08-03 Thread Wells Oliver
on the value being in the same index as its corresponding key? -- Wells Oliver we...@submute.net -- http://mail.python.org/mailman/listinfo/python-list

Sorting dict by value w/ operator.itemgetter- using key name?

2009-07-30 Thread Wells Oliver
Bit of code: print sorted(results.items(), key=operator.itemgetter(1)) Would rather use 'H9', which is the name of the key in position 1 like: print sorted(results.items(), key=operator.itemgetter('H9')) Obviously that ain't work else I wouldn't be sending th

RPY2 examples?

2009-07-22 Thread Wells Oliver
I am trying to find examples using RPY2 to render R graphs to PNG/PDF/etc. The only things I can find use rpy 1.x. Any references? Thanks! -- Wells Oliver we...@submute.net -- http://mail.python.org/mailman/listinfo/python-list

Question regarding style/design..

2009-07-17 Thread Wells Oliver
scope such that the preference shifts from the former to the latter? I understand the use of the __name__ == 'main' convention for building unit tests, but I'm mixed on using it in scripts/small applications. Thanks for any thoughts! -- Wells Oliver we...@submute.net -- http://mail.python.org/mailman/listinfo/python-list

Re: MySQLdb and ordering of column names in list returned by keys() w/ a DictCursor

2009-07-02 Thread Wells Oliver
I can suss out. Any ideas? Thanks! >> >> (cursor being a MySQLdb.cursors.DictCursor object.) >> > > My guess is you're experiencing the fact that dicts are unordered by nature > which allows it to return in any order it likes (usually per the internal > representation/storage). > > -tkc > > > > -- Wells Oliver we...@submute.net -- http://mail.python.org/mailman/listinfo/python-list

MySQLdb and ordering of column names in list returned by keys() w/ a DictCursor

2009-07-02 Thread Wells Oliver
x27;, 'ER'] Neither alphabetical nor the order in which they were specified in the query nor... any seeming order I can suss out. Any ideas? Thanks! (cursor being a MySQLdb.cursors.DictCursor object.) -- Wells Oliver we...@submute.net -- http://mail.python.org/mailman/listinfo/python-list

n00b confusion re: local variable referenced before assignment error

2009-06-19 Thread Wells Oliver
h is the "file.write(handler.read())" line.. What gives? -- Wells Oliver we...@submute.net -- http://mail.python.org/mailman/listinfo/python-list

A question on scope...

2009-06-18 Thread Wells Oliver
In writing out python classes, it seems the 'self' is optional, meaning that inside a class method, "self.foo = bar" has the same effect as "foo = bar". Is this right? If so, it seems a little odd- what's the rationale? Or am I mistaken? -- Well

Assigning a list to a key of a dict

2009-05-14 Thread Wells
Why can't I do this? teams = { "SEA": "Seattle Mariners" } for team, name in teams.items(): teams[team]["roster"] = ["player1", "player2"] I get an error: Traceback (most recent call last): File "./gamelogs.py", line 53, in teams[team]["roster"] = ["player1", "player2"] TypeError:

Assigning multiple variables to a list a la php's list()

2009-05-13 Thread Wells
Can you take a list and have it exploded into variables w/ one command? Something like.. list = ['foo', 'bar'] [a, b] = list Then 'a' would be foo and 'b' 'bar'. Like list($a,$b) = $list in PHP. Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: n00b question: Possible to pass lists to a Template class?

2009-05-13 Thread Wells
On May 13, 11:14 am, Wells wrote: > Is it possible to pass a list to the Template.substitute method and > use that in the template, like so.. > > g = string.Template(gametemplate) > print g.substitute(recap = "none", winner = game["winner"], loser = > g

n00b question: Possible to pass lists to a Template class?

2009-05-13 Thread Wells
Is it possible to pass a list to the Template.substitute method and use that in the template, like so.. g = string.Template(gametemplate) print g.substitute(recap = "none", winner = game["winner"], loser = game["loser"]) Then in the template... winner.team Where winner.team would be the value o

ONLINE EARNINGS $$$ 500 - $$$ 1000 PER MONTH WITHOUT INVESTMENT...

2008-11-26 Thread alan wells
ONLINE EARNINGS $$$ 500 - $$$ 1000 PER MONTH WITHOUT INVESTMENT... projectpayday has been proven to a legit source of income that can be earned the same day you sign up.the best programme i found in online that it pays more than $100 perday to me. they provides you step by step guide untill than y

Re: Kill an OS process from script (perhaps unix specific)

2008-04-19 Thread Douglas Wells
not just an arbitrary delay), you could use the simple construct: import os code = os.system ("ulimit -t ; ...") That's not guaranteed to work on all POSIX systems, but it should work with at least ash, bash, and ksh. And it would would be "limit cputime ; ...&q

Re: Default parameter for a method

2008-04-16 Thread Cliff Wells
On Wed, 2008-04-16 at 13:47 -0500, Larry Bates wrote: > [EMAIL PROTECTED] wrote: > > I wanted to know if there's any way to create a method that takes a > > default parameter, and that parameter's default value is the return > > value of another method of the same class. For example: > > > > clas

Re: subprocess.Popen pipeline bug?

2008-03-13 Thread Douglas Wells
/dev/null',shell = True,stdin = a.stdout) b = subprocess.Popen('cat >/dev/null',shell = True,stdin = a.stdout, close_fds = True) # * end of changes a.stdin.close() b.wait() a.wait() Good luck. - dmw -- . Douglas Wells . Connection Technologies . . Internet: -sp9804- -at - contek.com- . -- http://mail.python.org/mailman/listinfo/python-list

Re: Threading the Python interpreter

2008-02-19 Thread Douglas Wells
ms were eventually accepted by the larger computing community with little change in their original meanings. But, the OP should still be safe. - dmw -- . Douglas Wells . Connection Technologies . . Internet: -sp9804- -at - contek.com- . -- http://mail.python.org/mailman/listinfo/python-list

Re: sockets -- basic udp client

2008-02-17 Thread Douglas Wells
one non-zero length response (such that buf is modified) and seeing if it ever terminates. I would also like to point out that the original example (quoted from the book) used "connect' and "recv" w/ UDP). One of the purposes of using this construct (rather than using "recvfrom") is to simplify identification of the remote system: When you "connect" to a UDP socket, the OS will only send messages to that system and will ignore messages that do not originate from that IP address (ignoring the issue IP address spoofing). - dmw -- . Douglas Wells . Connection Technologies . . Internet: -sp9804- -at - contek.com- . -- http://mail.python.org/mailman/listinfo/python-list

Re: Can anyone help, please?

2008-02-13 Thread Douglas Wells
- start print "%7.3f: %d octets from %s" % (elapsed, total_data_length, addr) except socket.error, e: print "Socket error" + e break ## ==

Re: Is anyone happy with csv module?

2007-12-14 Thread Cliff Wells
On Wed, 2007-12-12 at 07:04 -0800, massimo s. wrote: > If by "thoroughly" you mean "it actually describes technically what it > is and does but not how to really do things", yes, it is thoroughly > documented. > The examples section is a joke. Actually I rarely use the csv module these days, but

Re: Is anyone happy with csv module?

2007-12-11 Thread Cliff Wells
On Wed, 2007-12-12 at 09:50 +1100, Ben Finney wrote: > "massimo s." <[EMAIL PROTECTED]> writes: > > Yes, but it's natural for a spreadsheet-like thing to have organized > > columns of data, often. > > Perhaps, but that's not relevant. CSV is a serialisation format for > tabular data, and is only

Re: Some "pythonic" suggestions for Python

2007-11-09 Thread Cliff Wells
On Thu, 2007-11-08 at 15:00 -0500, Frank Samuelson wrote: > I love Python, and it is one of my 2 favorite > languages. I would suggest that Python steal some > aspects of the S language. In general, I agree that Python has some antiquated concepts at its core (statements being a major one) and th

Re: Socket - gaierror

2007-08-27 Thread Douglas Wells
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] writes: > On Aug 27, 4:22 pm, [EMAIL PROTECTED] (Douglas Wells) wrote: > > In article <[EMAIL PROTECTED]>, > > > > [EMAIL PROTECTED] writes: > > > On Aug 27, 12:32 pm, Larry Bates <[EMAIL PROTECTED]

Re: Socket - gaierror

2007-08-27 Thread Douglas Wells
s in DNS. In UNIX/Linux you can use the hostname command; in any system you can write a python script to print the result of socket.gethostname(). - dmw -- . Douglas Wells . Connection Technologies . . Internet: -sp9804- -at - contek.com- . -- http://mail.python.org/mailman/listinfo/python-list

Re: Comparing RFC1123 based Dates

2007-08-05 Thread Douglas Wells
limited to processing date/times. Even then, I then explicitly set the locale (LC_TIME) to the "C" locale. Otherwise, I use ad hoc code that explicitly recognizes the RFC-defined forms. -- . Douglas Wells . Connection Technologies . . Internet: -sp9804- -at - contek.com- . -- http://mail.python.org/mailman/listinfo/python-list

Re: asyncore and OOB data

2007-07-12 Thread Douglas Wells
In article <[EMAIL PROTECTED]>, billiejoex <[EMAIL PROTECTED]> writes: > Douglas Wells wrote: > > > Second, when I look at the FTP specification, I don't find the > > concept of OOB anywhere. So, it's not clear what OOB data would > > mean in

Re: asyncore and OOB data

2007-07-12 Thread Douglas Wells
In article <[EMAIL PROTECTED]>, Steve Holden <[EMAIL PROTECTED]> writes: > Douglas Wells wrote: > > > > Third, the TCP protocol, which you have selected via the SOCK_STREAM > > option doesn't support OOB at all, so there's no way that you can > &

Re: asyncore and OOB data

2007-07-11 Thread Douglas Wells
n my system, I get back an error (EINVAL - Invalid argument). I would expect that asyncore would report this error somehow or other. In summary, you almost certainly can't use the concept of a separate OOB channel to transfer data in an FTP environment. If you really, really need something like

Re: Convert to C/C++?

2007-06-14 Thread Douglas Wells
gettimeofday function does not include timezone: the prototype of the second argument is "void *" and must be passed as NULL. Good luck, - dmw -- . Douglas Wells . Connection Technologies . . Internet: -sp9804- -at - contek.com- . -- http://mail.python.org/mailman/listinfo/python-list

Re: result of os.times() is different with 'time' command

2007-02-02 Thread Douglas Wells
d 100 on the OP's OS X(*). (BTW, this sort of historic code is exactly why POSIX no longer defines HZ.) In support of this, I note that the following ratios exist: user time from os.times / user time from time command 39.85 / 23.938 => 1.665

Re: How to sort using hash's key?

2007-01-31 Thread Cliff Wells
On Thu, 2007-02-01 at 04:54 +0800, JoJo wrote: > I want to sort a dict via its key,but I have no idea on how to do it. > Please help me,thanks. You can't. There is, however, a recipe for an "ordered dict" on ASPN: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/438823 > 3webXS HiSpeed

Re: ANN: Dejavu 1.5.0RC1

2007-01-24 Thread Cliff Wells
On Wed, 2007-01-24 at 14:57 -0800, Robert Brewer wrote: > 1. Expressions: pure Python lambda querying. This is perhaps the most >appealing feature of Dejavu. Actually I just went and looked and personally I find the documentation the most appealing feature. Regards, Cliff -- http://mail.p

Re: Type casting a base class to a derived one?

2007-01-24 Thread Cliff Wells
On Wed, 2007-01-24 at 11:37 -0800, Cliff Wells wrote: > > class Person: # assume this is something from the ORM > name = "Kenny" > > class PersonRow ( Person ): > pass > > def flatten_person ( p ): > return "omg, you've kil

Re: Type casting a base class to a derived one?

2007-01-24 Thread Cliff Wells
On Wed, 2007-01-24 at 12:57 -0600, Chris Mellon wrote: > > In Python, you can do this simply by re-assigning the __class__. I'm > not convinced that your type system makes sense, here though. Any > reasonable ORM should be able to persist and reload an object without > losing the type information

Re: Type casting a base class to a derived one?

2007-01-24 Thread Cliff Wells
On Thu, 2007-01-11 at 08:41 -0600, Chris Mellon wrote: > On 11 Jan 2007 15:01:48 +0100, Neil Cerutti <[EMAIL PROTECTED]> wrote: > > On 2007-01-11, Frederic Rentsch <[EMAIL PROTECTED]> wrote: > > > If I derive a class from another one because I need a few extra > > > features, is there a way to prom

Re: template engine

2007-01-13 Thread Cliff Wells
piotr wrote: > On Sat, 13 Jan 2007 16:42:16 -0200, Jorge Godoy wrote: > >> Take a look at Kid (http://www.kid-templating.org/) and Genshi >> (http://genshi.edgewall.org/). > > I've already done a short look at kid, but to be honest I don't like it's > XML/Python syntax. I strongly prefer idea fro

Re: merits of Lisp vs Python

2006-12-11 Thread Cliff Wells
On Sat, 2006-12-09 at 00:26 -0800, hankhero wrote: > The Common-Lisp object systems has all and more OO-features, some which > you never probably have thought of before. Here's one: > Inheritance lets you specialise a method so a rectangle and a circle > can have a different Draw method. If you wo

Re: merits of Lisp vs Python

2006-12-11 Thread Cliff Wells
On Mon, 2006-12-11 at 08:11 -0800, [EMAIL PROTECTED] wrote: > Bill Atkins wrote: > > > On the plus side, Python makes less demands on the > > > capabilities of the editor. All you really need > > > is block-shifting commands. Bracket matching is > > > handy for expressions but not vital, and you >

Re: merits of Lisp vs Python

2006-12-11 Thread Cliff Wells
On Sun, 2006-12-10 at 01:28 -0800, Kay Schluehr wrote: > Who really wants to write web apps? Web apps are just an excuse for > Pythonistas to write web frameworks. I've been lurking, waiting for the right moment to toss in my two cents, and finally, and here it is. I've been using Python heavi

Re: profanity on comp.lang.python (was Re: Pyro stability)

2006-11-08 Thread Cliff Wells
On Wed, 2006-11-08 at 11:18 -0800, Aahz wrote: > In article <[EMAIL PROTECTED]>, > <[EMAIL PROTECTED]> wrote: > > > >I'm with Beliavsky on this one. I can't see any particular reason to curse > >in a forum such as c.l.py. It just coarsens the discussion with no obvious > >positive benefit as far

Re: profanity on comp.lang.python (was Re: Pyro stability)

2006-11-08 Thread Cliff Wells
On Wed, 2006-11-08 at 10:42 -0800, Paddy wrote: > I too know your wrong Aahz. The written word is not the same as that > spoken. People should make an effort to put across their meaning in a > clear manner. If I were going to an interview I would be very careful > about swearing and most likely no

Re: profanity on comp.lang.python (was Re: Pyro stability)

2006-11-08 Thread Cliff Wells
On Wed, 2006-11-08 at 10:12 -0800, Carl J. Van Arsdall wrote: > BartlebyScrivener wrote: > > I agree. And Python is an extremely serious matter calling for decorum > > and propriety. > > > Lol, is it really now? And I suppose its your definition of decorum and > not mine right? Things like t

Re: profanity on comp.lang.python (was Re: Pyro stability)

2006-11-08 Thread Cliff Wells
On Wed, 2006-11-08 at 06:49 -0800, Beliavsky wrote: > Cliff Wells wrote: > > The LA Times had a story that claimed that 64% of U.S. citizens use the > > word "fuck" and that 74% of us have heard it in public (I'll assume the > > remainder are your fellow AOL u

Re: Unicode/ascii encoding nightmare

2006-11-07 Thread Cliff Wells
On Mon, 2006-11-06 at 15:47 -0800, John Machin wrote: > Gabriel Genellina wrote: > > At Monday 6/11/2006 20:34, Robert Kern wrote: > > > > >John Machin wrote: > > > > Indeed yourself. Have you ever considered reading posts in > > > > chronological order, or reading all posts in a thread? > > > > >

Re: Unicode/ascii encoding nightmare

2006-11-07 Thread Cliff Wells
On Tue, 2006-11-07 at 08:10 +0200, Hendrik van Rooyen wrote: > "John Machin" <[EMAIL PROTECTED]> wrote: > > 8<--- > > > I strongly suggest that you read the docs *FIRST*, and don't "tinker" > > at all. > > > This is *good* advice - its unlikely to be followed

Python extensions on Win32

2006-09-25 Thread Cliff Wells
For various sundry reasons, I find myself needing to deliver a Windows-based Python app. I also chose Python 2.5 for this platform. The app has several requirements, all of which are available for Python 2.5/Win32 except one: pycurl. So I decided to try building the source but as it turns out, b

Re: Why not event-driven packages in other than the main thread?

2006-09-14 Thread Cliff Wells
On Thu, 2006-09-14 at 03:22 -0700, Cliff Wells wrote: > They probably use signals (Twisted I'm sure does) and it's documented > that signals don't work with threads: > > http://docs.python.org/lib/module-signal.html Er, specifically, they only work with the main t

Re: Why not event-driven packages in other than the main thread?

2006-09-14 Thread Cliff Wells
On Thu, 2006-09-14 at 11:13 +0200, Tor Erik wrote: > Hi, > > I've developed an application were I've used Tkinter for the GUI. > When I ran the GUI in another thread than the main, it kept locking > up. > I experienced similar problems with Twisted. > > Both of these tools are event-based, so I g

Re: Python blogging software

2006-09-14 Thread Cliff Wells
On Wed, 2006-09-13 at 19:28 +0200, Irmen de Jong wrote: > Cliff Wells wrote: > > I'm currently using Frog, and it's decent, but lacks some fundamental > > features (tags for one). Since Irmen is probably going to scrap it > > anyway, I'm kind of fishing about

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-13 Thread Cliff Wells
On Wed, 2006-09-13 at 10:30 +0200, Fredrik Lundh wrote: > Antoon Pardon wrote: > > > One place where I would use such a feature is in a unittest > > package. I think being able to write self.assert or self.raise > > looks better than having to append an underscore. > > patch here: > > http://ma

Re: Python blogging software

2006-09-13 Thread Cliff Wells
On Wed, 2006-09-13 at 08:22 -0700, Fuzzyman wrote: > Cliff Wells wrote: > > On Wed, 2006-09-13 at 00:29 -0700, Cliff Wells wrote: > > > > > Anyone aware of any functional (doesn't need to be complete, beta is > > > fine) blog software written in Python? >

Re: Python blogging software

2006-09-13 Thread Cliff Wells
On Wed, 2006-09-13 at 00:29 -0700, Cliff Wells wrote: > Anyone aware of any functional (doesn't need to be complete, beta is > fine) blog software written in Python? Hmph. And as soon as I hit send I find http://wiki.python.org/moin/PythonBlogSoftware Okay, so is there any *n

Python blogging software

2006-09-13 Thread Cliff Wells
There's been a lot of blogs started in Python, but given the recent spate of web frameworks, I'm surprised that some blogging package hasn't taken front seat yet. I'm currently using Frog, and it's decent, but lacks some fundamental features (tags for one). Since Irmen is probably going to scrap

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-12 Thread Cliff Wells
On Tue, 2006-09-12 at 18:05 -0700, Robert Hicks wrote: > metaperl wrote: > > Istvan Albert wrote: > > > metaperl wrote: > > > > --> python -i > > > > >>> class = "algebra" > > > > File "", line 1 > > > > class = "algebra" > > > > ^ > > > > SyntaxError: invalid syntax > > > > > > De

Re: best small database?

2006-09-12 Thread Cliff Wells
On Tue, 2006-09-12 at 12:29 -0700, Kay Schluehr wrote: > Just one stupid remark since the limits of my language are the limits > of my world: I've not the slightest association with the seemingly > nonsense word "buzhug" and don't even know how to pronounce it > correctly. Would you have the kindn

Re: best small database?

2006-09-12 Thread Cliff Wells
On Mon, 2006-09-11 at 13:23 +, David Isaac wrote: > I have no experience with database applications. > This database will likely hold only a few hundred items, > including both textfiles and binary files. > > I would like a pure Python solution to the extent reasonable. Since no one's mention

Re: Is it just me, or is Sqlite3 goofy?

2006-09-12 Thread Cliff Wells
On Tue, 2006-09-12 at 13:01 +0200, Fredrik Lundh wrote: > Mike Owens wrote: > > > Crackpot? And now we get to why I took the flamebait -- wonderfully > > constructive comments such as this. > > > > I know SQLite's author. Besides being a nice and clearly very > > intelligent person, he also holds

Re: python-database

2006-09-03 Thread Cliff Wells
On Sun, 2006-09-03 at 21:30 -0700, sridhar wrote: > is there any way to call stored procedures from python as in java? I mostly use PostgreSQL, so perhaps it's different for some other databases, but calling stored procedures doesn't require any special support from the language or driver. Usuall

Re: Pros/Cons of Turbogears/Rails?

2006-08-31 Thread Cliff Wells
On Thu, 2006-08-31 at 09:04 -0700, Paul Boddie wrote: > SkunkWeb (3.4.0), Zope (2.9.4 and 3.2.1), Plone (2.5), Karrigell (2.3), > CherryPy (2.2.1), Spyce (2.1), QP (1.8), Cymbeline (1.3.1), Django > (0.95), Webware (0.9.1), Pylons (0.9.1), TurboGears (0.8.9), PyLucid > (v0.7.0RC4), Paste (0.4.1),

Re: Pros/Cons of Turbogears/Rails?

2006-08-31 Thread Cliff Wells
On Thu, 2006-08-31 at 23:31 +0200, BJörn Lindqvist wrote: > On 8/31/06, Jorge Vargas <[EMAIL PROTECTED]> wrote: > > On 31 Aug 2006 08:24:29 -0700, Adam Jones <[EMAIL PROTECTED]> wrote: > > > > Someone ones said on the mailing list TG is the Ubuntu of web > > frameworks, and I think I'll add and you

Re: avoiding file corruption

2006-08-28 Thread Cliff Wells
On Sun, 2006-08-27 at 07:51 -0700, Amir Michail wrote: > How often do you need to open a file multiple times for writing? How often do you write code that you don't understand well enough to fix? This issue is clearly a problem within *your* application. I'm curious how you could possibly think

Re: Out-dated compiled modules (*.pyc)?

2006-08-26 Thread Cliff Wells
On Sat, 2006-08-26 at 18:54 +, Dennis Lee Bieber wrote: > Normally, Python compares the date stamps of the files (and maybe > some internal magic values) and only rebuilds the .pyc if the .py is > newer. Perhaps the OP should check both the system date on his PC and the timestamp on the

Re: Python Syntax Highlighting Module

2006-08-24 Thread Cliff Wells
On Mon, 2006-08-21 at 08:19 -0700, gene tani wrote: > [EMAIL PROTECTED] wrote: > > Hello, > > I have an idea for a project which involves an editor that supports > > syntax highlighting. This would be for any language, particularly php, > > html, css, etc. I would like to write this program using

Re: What do you want in a new web framework?

2006-08-24 Thread Cliff Wells
On Thu, 2006-08-24 at 04:28 -0700, Paul Boddie wrote: > Cliff Wells wrote: > > On Thu, 2006-08-24 at 04:04 +, Tim Roberts wrote: > > > Cliff Wells <[EMAIL PROTECTED]> wrote: > > > > > > > >But there are interesting things in Ruby (and Ruby 2 s

Re: What do you want in a new web framework?

2006-08-23 Thread Cliff Wells
On Thu, 2006-08-24 at 04:04 +, Tim Roberts wrote: > Cliff Wells <[EMAIL PROTECTED]> wrote: > > > >But there are interesting things in Ruby (and Ruby 2 should take care of > >lots of warts Ruby 1.8 has) that Python could learn from. All-in-all, > >Ruby is most

Re: What do you want in a new web framework?

2006-08-23 Thread Cliff Wells
On Wed, 2006-08-23 at 22:13 +0200, Peter Maas wrote: > Alex Martelli wrote: > > Indeed, it has been truthfully observed that Python's the only language > > with more web frameworks than keywords. > > > > I have already suggested to the BDFL that he can remedy this situation > > in Py3k: all he has

Re: What do you want in a new web framework?

2006-08-23 Thread Cliff Wells
On Wed, 2006-08-23 at 02:28 -0700, Paul Boddie wrote: > Cliff Wells wrote: > > No, the reason Rails is successful is due to being a decent, focused > > product with *great* marketing (screencasts, anyone?). > > Screencasts? Perhaps, like a great showman, they draw in the

Re: Can I do this with list comprehension?

2006-08-22 Thread Cliff Wells
On Tue, 2006-08-22 at 21:07 -0700, [EMAIL PROTECTED] wrote: > b = [2, 4, 6, 8, 10, 12] >>> a = [0, 1, 0, 1, 1, 0] >>> b = [2, 4, 6, 8, 10, 12] >>> [ j for i, j in zip ( a, b ) if i ] [4, 8, 10] -- -- http://mail.python.org/mailman/listinfo/python-list

Re: What do you want in a new web framework?

2006-08-22 Thread Cliff Wells
On Tue, 2006-08-22 at 08:15 +, Tim Roberts wrote: > Ordinarily, I think the "do it yourself" nature of Python is a great thing, > and I would never try to dissuade someone from reinventing something > themselves. However, in the case of web frameworks, I believe Marc is > fundamentally correc

Re: ReStructuredText

2006-08-15 Thread Cliff Wells
On Tue, 2006-08-15 at 16:10 +0800, limodou wrote: > On 8/15/06, Cliff Wells <[EMAIL PROTECTED]> wrote: > > On Tue, 2006-08-15 at 16:02 +0800, limodou wrote: > > > On 8/15/06, Cliff Wells <[EMAIL PROTECTED]> wrote: > > > > Thanks for the response. Must

Re: ReStructuredText

2006-08-15 Thread Cliff Wells
On Tue, 2006-08-15 at 00:56 -0700, Cliff Wells wrote: Ah, I got it. From the docs: (Auto-enumerated lists are new in Docutils 0.3.8.) and I've got 0.3.7 Damn. Thanks for the responses. Regards, Cliff -- -- http://mail.python.org/mailman/listinfo/python-list

Re: ReStructuredText

2006-08-15 Thread Cliff Wells
On Tue, 2006-08-15 at 16:02 +0800, limodou wrote: > On 8/15/06, Cliff Wells <[EMAIL PROTECTED]> wrote: > > Thanks for the response. Must be a bug in my version: > > Which version of docutils you are using, in my computer is good. > > u'\nthis is a test\nthis is &

Re: ReStructuredText

2006-08-15 Thread Cliff Wells
On Tue, 2006-08-15 at 09:35 +0200, Sybren Stuvel wrote: > Cliff Wells enlightened us with: > > Why doesn't the above turn out an enumerated list? > > You have to indent the list: > > >>> from docutils.core import publish_parts > >>> t = '

ReStructuredText

2006-08-15 Thread Cliff Wells
Started playing with docutils and don't understand why the following doesn't work: >>> from docutils.core import publish_parts >>> t = ''' ... ... 1. this is a test ... #. this is another line ... #. oh, screw it! ... ... ''' >>> publish_parts ( t, writer_name = 'html' ) [ 'body' ] u'1. this is a

Re: Using Python for my web site

2006-08-03 Thread Cliff Wells
On Thu, 2006-08-03 at 09:49 +0200, Sybren Stuvel wrote: > Cliff Wells enlightened us with: > > 1) PostgreSQL fans are perhaps a bit paranoid about claims of MySQL > > being better. There used to be a tiny bit of truth in this claim > > for certain applications (mostly relati

Re: Using Python for my web site

2006-08-03 Thread Cliff Wells
On Thu, 2006-08-03 at 15:51 +0200, paul kölle wrote: > Cliff Wells wrote: > > > For myself, I handle user-installation of TurboGears pretty much like I > > do all user-installed Python packages: using setuptools. Any user who > > uses easy_install or 'python setup.py

Re: Using Python for my web site

2006-08-02 Thread Cliff Wells
On Wed, 2006-08-02 at 23:13 -0300, Gerhard Fiedler wrote: > Thanks, that's one of the conclusions to which I also came. That final > question was missing, even though I felt it was implied. I really had no > clue that this is such a touchy subject. Every opinion in technology seems to be touchy

Re: Using Python for my web site

2006-08-02 Thread Cliff Wells
On Wed, 2006-08-02 at 10:46 -0300, Gerhard Fiedler wrote: > On 2006-08-02 00:51:28, Conrad wrote: > > > Which begins "A few years ago" > > Exactly. Isn't this a good start for honesty? It doesn't claim to state > anything up to date. > > It continues "I did some research", "some" being a very c

Re: Using Python for my web site

2006-08-02 Thread Cliff Wells
On Tue, 2006-08-01 at 23:26 -0300, Gerhard Fiedler wrote: > Or is there something in PostgreSQL that makes its users acidic? :) Well, ACID is popular in PostgreSQL circles. Cliff -- -- http://mail.python.org/mailman/listinfo/python-list

RE: Static Variables in Python?

2006-08-01 Thread Cliff Wells
On Tue, 2006-08-01 at 07:37 -0400, Michael Yanowitz wrote: > # * class BitsClass * > class BitsClass (object): > def __init__(self, num_bits): > self.bits=[] > for i in range(num_bits): > self.bits.append(0) > de

Re: Using Python for my web site

2006-08-01 Thread Cliff Wells
On Tue, 2006-08-01 at 06:38 -0700, Luis M. González wrote: > Well... yes, you're right. > I guess that the reason for not having used a framework already is > laziness... Trust me, I'm quite familiar with the laziness problem =) > I have experience with Karrigell, which rocks too, but it lacks s

Re: Using Python for my web site

2006-08-01 Thread Cliff Wells
On Tue, 2006-08-01 at 10:41 -0300, Gerhard Fiedler wrote: > On 2006-08-01 04:11:18, Cliff Wells wrote: > > > You say that you haven't tried Django or any other Python framework. > > Perhaps you should. You seem to have at least the start of the right > > idea about

Re: Using Python for my web site

2006-08-01 Thread Cliff Wells
On Mon, 2006-07-31 at 22:25 -0700, Luis M. González wrote: > I don't have experience with Django or any other python framework, but > I have used bare-bones mod_python and it rocks. > I wouldn't use PSP though... > It is not very polished, and they way it handles the "indentation > problem" in pyth

Re: code to retrieve web mail?

2006-07-31 Thread Cliff Wells
On Tue, 2006-08-01 at 01:47 +, John Savage wrote: > I have a free web mail address and would like to use python to retrieve > files that have been emailed to me. The basic code would accommodate > cookies, a login name and password, then download using the full URL I > can provide. From posting

Re: Using Python for my web site

2006-07-31 Thread Cliff Wells
On Mon, 2006-07-31 at 21:57 -0300, Gerhard Fiedler wrote: > On 2006-07-31 18:23:17, Cliff Wells wrote: > > > My point is to stop FUD right at that comment. I don't doubt your > > research from "a few years ago", but ancient research is entirely > >

Re: Nuther problem with 'dive into Python'

2006-07-31 Thread Cliff Wells
On Mon, 2006-07-31 at 14:03 +0100, Ben Edwards wrote: > Am going through Chapter 9 - HTTP Web Services in dive into Python. It > uses the following: > > data = urllib.urlopen('http://diveintomark.org/xml/atom.xml').read() > > The page no longer exists, can anyone recommend an alternative page to

  1   2   >