Re: Newbie: Check first two non-whitespace characters

2015-12-31 Thread Cory Madden
I would personally use re here. test_string = ' [{blah blah blah' matches = re.findall(r'[^\s]', t) result = ''.join(matches)[:2] >> '[{' On Thu, Dec 31, 2015 at 10:18 AM, wrote: > I need to check a string over which I have no control for the first 2 > non-white space characters (which should

Parsing an html line and pulling out only numbers that meet a certain criteria

2013-09-11 Thread Cory Mottice
I am using line.rfind to parse a particular line of html code. For example, this is the line of html code I am parsing: 79°Lo 56° and this is the code I use to split the line to (in this case) pull out the '79'. position0 = line.rfind('{}'.format(date1.strftime("%a"))) if position0 > 0 :

RE: Python won't run

2010-02-23 Thread Nardin, Cory L.
computer and the fact that it isn't there is the sign of some other problem? Thanks Cory From: Sridhar Ratnakumar [mailto:sridh...@activestate.com] Sent: Monday, February 22, 2010 11:54 AM To: Nardin, Cory L. Cc: python-list@python.org Subject: Re: P

Python won't run

2010-02-18 Thread Nardin, Cory L.
MS Visual Studio redistributable package, which I did with no change in outcome. I really have no idea what to do. Any help is appreciated. Thanks, Cory -- http://mail.python.org/mailman/listinfo/python-list

Re: Embedded Boost.Python Enum

2007-10-18 Thread Cory
oking here: http://members.gamedev.net/sicrane/articles/EmbeddingPythonPart1.html It's odd to me that little tidbit got left out of the boost.python tutorial page on embedding... I must have looked at it 100 times. On Oct 18, 12:59 am, Cory <[EMAIL PROTECTED]> wrote: > Hi, > >

Embedded Boost.Python Enum

2007-10-17 Thread Cory
miliar enough with the boost.python library, Python C API, or Python itself to know how to set it up. So My question is this: How can I either make the first method of adding an enum work and not throw the exception, OR once I create the BOOST_PYTHON_MODULE in an embedded python c++ program how to I then import that module into my embedded python? Thanks in advance for any help -Cory -- http://mail.python.org/mailman/listinfo/python-list

Re: distutils linux script installation broken? Sorted

2005-01-14 Thread Cory Davis
Problem solved. I was actually using scipy_distutils and not distutils, without good reason. Changing setup.py to use distutils made the problem go away. Cory. Cory Davis wrote: Hi all, I have been successfully deploying my own python package with distutils for some time now, but lately

Re: distutils linux script installation broken?

2005-01-13 Thread Cory Davis
Thanks for the help Chris. I tried the -E option, and also installing as root with no change - the scripts in the bin directory still end up with #!None on the first line. Next step is to reinstall Python 2.4, and if that doesn't work I'll just stick with 2.3.4. Cheers, Cory. Chri

Re: distutils linux script installation broken?

2005-01-12 Thread Cory Davis
remove incase it disturbs my linux distribution (Fedora Core 2). Its also possible that I have done something silly to an environment variable. To check this I will try installing my package either as root or another user. Cheers, Cory. -- http://mail.python.org/mailman/listinfo/python-list

Re: distutils linux script installation broken?

2005-01-12 Thread Cory Davis
Thanks Albert. I already do use #!/usr/bin/env python in my package directory, but the build_scripts part of "setup.py install" changes this line to #!None before copying to my bin directory. Cheers, Cory. Albert Hofkamp wrote: On Wed, 12 Jan 2005 10:09:03 +, Cory Davis <[EM

distutils linux script installation broken?

2005-01-12 Thread Cory Davis
#!/whereverpythonis/python Has anyone else encountered this? Cheers, Cory. -- http://mail.python.org/mailman/listinfo/python-list