On Sunday, November 9, 2014 6:12:24 AM UTC-5, satish...@gmail.com wrote:
> What is rstrip() in python?
>
> What does it do in the following piece of code?
>
> import sqlite3
> conn = sqlite3.connect('dbase1')
> curs = conn.cursor()
>
> file = open(
On Sun, Nov 9, 2014 at 12:46 PM, Terry Reedy wrote:
> On 11/9/2014 6:11 AM, satishmlm...@gmail.com wrote:
>>
>> What is rstrip() in python?
google on 'rstrip python' gets this at first link:
https://docs.python.org/2/library/stdtypes.html#str.rstrip
google is your frien
On 11/9/2014 6:11 AM, satishmlm...@gmail.com wrote:
What is rstrip() in python?
The manuals have a rather complete index. If 'rstrip' is missing from
the index, let us know so we can fix it.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
On 09/11/2014 11:11, satishmlm...@gmail.com wrote:
What is rstrip() in python?
It's a function or method call.
What does it do in the following piece of code?
I'm not actually sure. Would you be kind enough to look it up in the
documentation for me and let me know, thanks?
satishmlm...@gmail.com wrote:
> What is rstrip() in python?
Have you read the Fine Manual?
Did you try googling first?
https://duckduckgo.com/html/?q=python+rstrip
> What does it do in the following piece of code?
It removes trailing whitespace.
> import sqlite3
> conn = sql
On Sun, Nov 9, 2014 at 10:11 PM, wrote:
> What is rstrip() in python?
>
> What does it do in the following piece of code?
>
> import sqlite3
> conn = sqlite3.connect('dbase1')
> curs = conn.cursor()
>
> file = open('data.txt')
> rows = [line.
What is rstrip() in python?
What does it do in the following piece of code?
import sqlite3
conn = sqlite3.connect('dbase1')
curs = conn.cursor()
file = open('data.txt')
rows = [line.rstrip().split(',') for line in file]
--
https://mail.python.org/mailman/listinfo/python-list
Dennis Lee Bieber wrote:
> On Sun, 18 Jul 2010 17:49:11 +0100, MRAB
> declaimed the following in gmane.comp.python.general:
>
>> How about 'strip_str', 'lstrip_str' and 'rstrip_str', or something
>
> Not sure what the first would do... unless one is envisioning
>
> "abracadabra".str
And don't forget the oft requested strip_tease().
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
MRAB wrote:
[snip]
How about 'strip_str', 'lstrip_str' and 'rstrip_str', or something
similar?
+1 on the names
~Ethan~
--
http://mail.python.org/mailman/listinfo/python-list
> a string like ' \t'.
>>
>> The doc is rather clear about it:
>> str.rstrip([chars])
>>
>> It is marked 'chars' and not 'suffix'
>>
>> The textual description is even clearer:
>> "The chars argument is not a suffix
is even clearer:
"The chars argument is not a suffix; rather, all combinations of its
values are stripped:"
When I asked in this grpup about a way of how to strip off a prefix I
never even considered strip as a solution having read the doc before.
I also think, that the function
and not 'suffix'
The textual description is even clearer:
"The chars argument is not a suffix; rather, all combinations of its
values are stripped:"
When I asked in this grpup about a way of how to strip off a prefix I
never even considered strip as a solution having read the do
On 07/18/2010 01:18 PM, News123 wrote:
> Mark Lawrence wrote:
>> On 17/07/2010 23:17, MRAB wrote:
>>> Chris Rebert wrote:
On Fri, Jul 16, 2010 at 10:27 AM, MRAB
wrote:
> Jason Friedman wrote:
It's a pity that str.strip() doesn't actually take a set() of length-1
string
Mark Lawrence wrote:
> On 17/07/2010 23:17, MRAB wrote:
>> Chris Rebert wrote:
>>> On Fri, Jul 16, 2010 at 10:27 AM, MRAB
>>> wrote:
Jason Friedman wrote:
>>>
>>> It's a pity that str.strip() doesn't actually take a set() of length-1
>>> strings, which would make its behavior more obvious and
On 17/07/2010 23:17, MRAB wrote:
Chris Rebert wrote:
On Fri, Jul 16, 2010 at 10:27 AM, MRAB
wrote:
Jason Friedman wrote:
$ python
Python 2.6.4 (r264:75706, Dec 7 2009, 18:43:55)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" f
Chris Rebert wrote:
On Fri, Jul 16, 2010 at 10:27 AM, MRAB wrote:
Jason Friedman wrote:
$ python
Python 2.6.4 (r264:75706, Dec 7 2009, 18:43:55)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
"x.vsd-d
On Fri, Jul 16, 2010 at 10:27 AM, MRAB wrote:
> Jason Friedman wrote:
>>
>> $ python
>> Python 2.6.4 (r264:75706, Dec 7 2009, 18:43:55)
>> [GCC 4.4.1] on linux2
>> Type "help", "copyright", "credits" or "license" for more
Jason Friedman wrote:
> $ python
> Python 2.6.4 (r264:75706, Dec 7 2009, 18:43:55)
> [GCC 4.4.1] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> "x.vsd-dir".rstrip("-dir")
On Jul 16, 10:58 am, Jason Friedman wrote:
> $ python
> Python 2.6.4 (r264:75706, Dec 7 2009, 18:43:55)
> [GCC 4.4.1] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>> "x.vsd-dir".rstrip(&
Jason Friedman wrote:
$ python
Python 2.6.4 (r264:75706, Dec 7 2009, 18:43:55)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
"x.vsd-dir".rstrip("-dir")
'x.vs'
I expecte
On Fri, Jul 16, 2010 at 12:58 PM, Jason Friedman wrote:
> $ python
> Python 2.6.4 (r264:75706, Dec 7 2009, 18:43:55)
> [GCC 4.4.1] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> "x.vsd-
On 07/16/2010 06:58 PM, Jason Friedman wrote:
> $ python
> Python 2.6.4 (r264:75706, Dec 7 2009, 18:43:55)
> [GCC 4.4.1] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> "x.vsd-dir".
On Fri, Jul 16, 2010 at 10:28 PM, Jason Friedman wrote:
> $ python
> Python 2.6.4 (r264:75706, Dec 7 2009, 18:43:55)
> [GCC 4.4.1] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> "x.vsd-
$ python
Python 2.6.4 (r264:75706, Dec 7 2009, 18:43:55)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> "x.vsd-dir".rstrip("-dir")
'x.vs'
I expected 'x.vsd' as a return value.
--
http://mail.python.org/mailman/listinfo/python-list
_extract_bookmarks_from_url_history
>timestamp = datetime.datetime.strptime(month_string, '%b ‘
>%y')
>AttributeError: type object 'datetime.datetime' has no attribute
>'strptime'
I suppose it is cruel of me, but I find it hilarious that you looked at
t
dirkheld <[EMAIL PROTECTED]> wrote:
> Here it is : I tought that I didn't matter because the deliciousapi
> worked fine on my mac.
> Traceback (most recent call last):
> File "delgraph.py", line 62, in ?
> url_metadata = d.get_url(site.rstrip())
> File "deliciousapi.py", line 269, in get_
>
> What is the actual error message [SyntaxError, NameError? etc] that you
> clipped?
Here it is : I tought that I didn't matter because the deliciousapi
worked fine on my mac.
Traceback (most recent call last):
File "delgraph.py", line 62, in ?
url_metadata = d.get_url(site.rstrip())
F
rstrip() works fine in python 2.4.3. May be the problem lies in
somewhere else.
I tried it in FC6 with Python 2.4.3:
>>> url = "abc.com\n"
>>> url.rstrip()
'abc.com'
regards,
Subeen.
http://love-python.blogspot.com/
On Feb 29, 2:30 am, dirkheld <[EMAIL
"dirkheld" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| Hi,
|
| I wrote some python code that retrieves urls from a txt file. In this
| code I use .rstrip() for removing the '\n' at the end of every url.
| While this code works on my mac (leopard) wi
Hi,
I wrote some python code that retrieves urls from a txt file. In this
code I use .rstrip() for removing the '\n' at the end of every url.
While this code works on my mac (leopard) with python 2.5.1, this same
code fails to work on an ubuntu server with python 2.4.3
I was wonderin
31 matches
Mail list logo