Re: WANTED: Regular expressions for breaking TeX/LaTeX document into tokens

2010-02-24 Thread Wes James
On Wed, Feb 24, 2010 at 5:03 AM, Jonathan Fine wrote: > Hi > > Does anyone know of a collection of regular expressions that will break a > TeX/LaTeX document into tokens?  Assume that there is no verbatim or other > category code changes. I'm not sure how this does it, but it might help: http://

Re: python dowload

2010-02-23 Thread Wes James
> > > NEW QUESTION if y'all are still reading: > > Is there an integer increment operation in Python? I tried > using i++ but had to revert to 'i = i + 1' i+=1 -- http://mail.python.org/mailman/listinfo/python-list

Re: string to list when the contents is a list

2010-02-18 Thread Wes James
On Thu, Feb 18, 2010 at 12:32 PM, Wes James wrote: > On Thu, Feb 18, 2010 at 8:18 AM, Tim Chase > wrote: >> Wes James wrote: > > >> >> Just to add to the list of solutions I've seen, letting the built-in csv >> module do the heavy lifting: >

Re: string to list when the contents is a list

2010-02-18 Thread Wes James
On Thu, Feb 18, 2010 at 8:18 AM, Tim Chase wrote: > Wes James wrote: > > Just to add to the list of solutions I've seen, letting the built-in csv > module do the heavy lifting: > >  >>> s = "['a','b']" >  >>> import

Re: error trying to join #python on irc.freenode.net

2010-02-17 Thread Wes James
On Wed, Feb 17, 2010 at 4:53 PM, Wes James wrote: > When I try to join #python on irc.freenode.net it keeps saying: > > You need to identify with network services to join the room "#python" > on "irc.freenode.net". > > Server Details: > Cannot join chan

error trying to join #python on irc.freenode.net

2010-02-17 Thread Wes James
When I try to join #python on irc.freenode.net it keeps saying: You need to identify with network services to join the room "#python" on "irc.freenode.net". Server Details: Cannot join channel (+r) - you need to be identified with services What does this mean? thx, -wes -- http://mail.python.

string to list when the contents is a list

2010-02-17 Thread Wes James
I have been trying to create a list form a string. The string will be a list (this is the contents will look like a list). i.e. "[]" or "['a','b']" The "[]" is simple since I can just check if value == "[]" then return [] But with "['a','b']" I have tried and get: a="['a','b']" b=a[1:-1].spli

Re: Best Python Web Framework ?

2009-04-21 Thread Wes James
On Tue, Apr 21, 2009 at 12:46 PM, SKYLAB wrote: > Greetings.. > > First , my english is not good . > > I heard that was written in python ( Youtube Programming Language : > PYTHON :S ) Correct ? > > That's not correct ? Then youtube is PHP application ? > > That's correct ; Which python web framew

python twitter

2009-04-15 Thread Wes James
Anyone know if there is a twit for python? I did http://twitter.com/python, but nope on that I was looking for twit py announcements, etc... thx, -wj -- http://mail.python.org/mailman/listinfo/python-list

Re: file open fails.

2009-03-24 Thread Wes James
On Tue, Mar 24, 2009 at 4:32 PM, Wes James wrote: > On Tue, Mar 24, 2009 at 4:04 PM, Scott David Daniels > wrote: >> Atul. wrote: > > > >> In your case, '\r' is a return (a single character), not two >> characters long. I think its sad that 'C:\Th

Re: file open fails.

2009-03-24 Thread Wes James
On Tue, Mar 24, 2009 at 4:04 PM, Scott David Daniels wrote: > Atul. wrote: > In your case, '\r' is a return (a single character), not two > characters long. I think its sad that 'C:\Thesis' doesn't cause > an error because there is no such character as '\T', but I am > probably excessively peda

Re: Upgrade Python on a Mac

2009-03-02 Thread Wes James
On Mon, Mar 2, 2009 at 2:53 PM, Rey Bango wrote: > Hi, > > I'd like to upgrade the installed version of Python that came standard > on OS X (Leopard) with either 2.6.1 or 3.0.1. Before I stick my foot > in it, I just wanted to get a better understanding of the process. I'd recommend you put your

Re: how to conditionally add a dict in-line

2009-02-23 Thread Wes James
Steven. Thx (see my question below...) On Mon, Feb 23, 2009 at 9:47 PM, Steven D'Aprano wrote: > On Mon, 23 Feb 2009 21:35:38 -0700, Wes James wrote: > >> I have this line: >> >> navs.append(A(' '+str(i+1)+' >> ',_href=self.action(arg

Re: how to conditionally add a dict in-line

2009-02-23 Thread Wes James
On Mon, Feb 23, 2009 at 9:35 PM, Wes James wrote: > I have this line: > > navs.append(A(' '+str(i+1)+' > ',_href=self.action(args=request.args,vars={'_page':i,'_query':request.vars._query > or ''}))) > > How do I do somethi

how to conditionally add a dict in-line

2009-02-23 Thread Wes James
I have this line: navs.append(A(' '+str(i+1)+' ',_href=self.action(args=request.args,vars={'_page':i,'_query':request.vars._query or ''}))) How do I do something like this: vars={'_page':i, if request.vars._query not None then insert this key/value pair ('_query':request.vars._query) else insert

parsing text from a file

2009-01-29 Thread Wes James
If I read a windows registry file with a line like this: "{C15039B5-C47C-47BD-A698-A462F4148F52}"="v2.0|Action=Allow|Active=TRUE|Dir=In|Protocol=6|Profile=Public|App=C:\\Program Files\\LANDesk\\LDClient\\tmcsvc.exe|Name=LANDesk Targeted Multicast|Edge=FALSE|" with this code: f=open('fwrules.reg2