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
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 :
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
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
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,
>
>
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
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
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
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
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
#!/whereverpythonis/python
Has anyone else encountered this?
Cheers,
Cory.
--
http://mail.python.org/mailman/listinfo/python-list
11 matches
Mail list logo