On Saturday, 28 May 2016 16:35:35 UTC+10, Sayth Renshaw wrote:
> > >
> > >Ok after printing a few things i have found an error.
> > >
> > >def GetArgs():
> > >'''parse XML from command line'''
> > >parser = argparse.ArgumentParser()
> > >
> > >parser.add_argument("path", nargs="+")
> >
Peter Otten wrote:
> Daiyue Weng wrote:
>
>> Hi, I tried to use DataFrame.values to convert a list of columns in a
>> dataframe to a numpy ndarray/matrix,
>>
>> matrix = df.values[:, list_of_cols]
>>
>> but got an error,
>>
>> IndexError: only integers, slices (:), ellipsis (...), numpy.newaxi
So how do i get argparse to read the file arguments correctly?
Looking at the namespace it all gets pushed into path and extension remains
empty.
[sayth@localhost pyXML]$ python3 racemeeting.py data/ *.xml
Namespace(extension='', path=['data/', '*.xml'])
This is the section I am running
parser
On Sat, 28 May 2016 01:53 am, Rustom Mody wrote:
> On Friday, May 27, 2016 at 7:21:41 PM UTC+5:30, Random832 wrote:
>> On Fri, May 27, 2016, at 05:56, Steven D'Aprano wrote:
>> > On Fri, 27 May 2016 05:04 pm, Marko Rauhamaa wrote:
>> >
>> > > They are all ASCII derivatives. Those that aren't don'
On Saturday, 28 May 2016 18:02:06 UTC+10, Sayth Renshaw wrote:
> So how do i get argparse to read the file arguments correctly?
>
> Looking at the namespace it all gets pushed into path and extension remains
> empty.
>
> [sayth@localhost pyXML]$ python3 racemeeting.py data/ *.xml
> Namespace(ex
for item, i in enumerate(aa)
print item
this writing, it can print all values
for item, i in enumerate(aa)
if item == findit:
print item
this only print the first value, means it only print once then not print again,
where is wrong?
--
https://mail.python.org/mailman/listinfo/python-l
On Saturday, 28 May 2016 19:44:53 UTC+10, Sayth Renshaw wrote:
> On Saturday, 28 May 2016 18:02:06 UTC+10, Sayth Renshaw wrote:
> > So how do i get argparse to read the file arguments correctly?
> >
> > Looking at the namespace it all gets pushed into path and extension remains
> > empty.
> >
On Saturday, 28 May 2016 20:19:23 UTC+10, meInvent bbird wrote:
> for item, i in enumerate(aa)
> print item
>
> this writing, it can print all values
>
> for item, i in enumerate(aa)
> if item == findit:
> print item
>
> this only print the first value, means it only print once then not
jobmatt...@gmail.com wrote:
> for item, i in enumerate(aa)
> print item
>
> this writing, it can print all values
>
> for item, i in enumerate(aa)
> if item == findit:
> print item
>
> this only print the first value, means it only print once then not print
> again,
Assuming
aa = ["fo
On Sat, 28 May 2016 08:19 pm, jobmatt...@gmail.com wrote:
> for item, i in enumerate(aa)
> print item
Wrong way around. It should be:
for i, item in enumerate(aa):
print item
For example:
py> for i, item in enumerate(aa):
... print i, item
...
0 c
1 h
2 e
3 e
4 s
5 e
> this writing
>From the "restructuredtext markup specification":
>Anonymous hyperlink targets consist of an explicit markup
>start (".. "), two underscores, a colon, whitespace, and a
>link block; there is no reference name:
>
>.. __: anonymous-hyperlink-target-link-block
>
>An alternate
thanks, i discover that i misunderstand i and item,
they should be swapped
On Saturday, May 28, 2016 at 6:19:23 PM UTC+8, meInvent bbird wrote:
> for item, i in enumerate(aa)
> print item
>
> this writing, it can print all values
>
> for item, i in enumerate(aa)
> if item == findit:
> p
how to write code generator for Isabelle by using pygments?
i am thinking to write a machine learning code to generate code
by learning example from Isabelle code
however, after google, not much information about this.
--
https://mail.python.org/mailman/listinfo/python-list
when read my code again, i discover this error i fixed before
but forget to do for another branch of if statement
now fixed
On Saturday, May 28, 2016 at 6:19:23 PM UTC+8, meInvent bbird wrote:
> for item, i in enumerate(aa)
> print item
>
> this writing, it can print all values
>
> for item,
On Saturday, May 28, 2016 at 8:28:35 AM UTC-4, Sergio Spina wrote:
> From the "restructuredtext markup specification":
>
> >Anonymous hyperlink targets consist of an explicit markup
> >start (".. "), two underscores, a colon, whitespace, and a
> >link block; there is no reference name:
Il giorno sabato 28 maggio 2016 14:37:21 UTC+2, Ned Batchelder ha scritto:
> On Saturday, May 28, 2016 at 8:28:35 AM UTC-4, Sergio Spina wrote:
> > From the "restructuredtext markup specification":
> >
> > >Anonymous hyperlink targets consist of an explicit markup
> > >start (".. "), two u
Sergio Spina writes:
> I need INTERNAL hyperlink targets, not external...
The difference is in how you use the two kinds of references: a named
hyperlink is referenced with the name followed by a single underscore, while
an anonymous one needs *two* underscores. So you have for example::
Samp
On Saturday, May 28, 2016 at 8:58:41 AM UTC-4, Sergio Spina wrote:
> Il giorno sabato 28 maggio 2016 14:37:21 UTC+2, Ned Batchelder ha scritto:
> > On Saturday, May 28, 2016 at 8:28:35 AM UTC-4, Sergio Spina wrote:
> > > From the "restructuredtext markup specification":
> > >
> > > >Anonymous
On Saturday, May 28, 2016 at 11:16:39 AM UTC-4, wxjm...@gmail.com wrote:
> Le samedi 28 mai 2016 06:47:11 UTC+2, Rustom Mody a écrit :
>
> > ...
> > [which AIUI is jmf's principal error]
> >
> > ...
>
> I'm very confident. It's only a question of time until
> the rest of the world dive into this
suppose I have a simple python project setup like this:
Project diectory
prog.py
pkg directory
__init__.py
mod1.py
class A:
In order to have class A (unqualified) available from prog.py, there are a
few options that I know about. I'm currently conside
On Sun, 29 May 2016 02:15 am, Gerald Britton wrote:
> suppose I have a simple python project setup like this:
>
> Project diectory
> prog.py
> pkg directory
> __init__.py
> mod1.py
>class A:
If this is a single project, why do you set it up like this
On Sat, May 28, 2016, at 00:46, Rustom Mody wrote:
> Which also means that if the Chinese were to have more say in the
> design of Unicode/ UTF-8 they would likely not waste swathes of prime
> real-estate for almost never used control characters just in the name
> of ASCII compliance
There are onl
Dear Python friends,
I am on Python 2.7 and Linux . I am trying to extract the address
"1,5,147456:8192" from the below stdout using re.search
(Pdb) stdout
'linux-host-machine-1: Block Address for 1,5,27320320:8192 (block
1,5,147456:8192) --\nlinux-host-machine-1: magic
0xdeaff2fe mark_c
Dear Python friends,
I am on Python 2.7 and Linux . I am trying to extract the address
"1,5,147456:8192" from the below stdout using re.search
(Pdb) stdout
'linux-host-machine-1: Block Address for 1,5,27320320:8192 (block
1,5,147456:8192) --\nlinux-host-machine-1: magic
0xdeaff2fe mark_c
> Date: Sat, 28 May 2016 23:48:16 +0530
> Subject: re.search - Pattern matching review ( Apologies re sending)
> From: ganesh1...@gmail.com
> To: python-list@python.org
>
> Dear Python friends,
>
> I am on Python 2.7 and Linux . I am trying to extract the address
> "1,5,147456:8192" from the bel
On 28May2016 03:32, Sayth Renshaw wrote:
On Saturday, 28 May 2016 19:44:53 UTC+10, Sayth Renshaw wrote:
On Saturday, 28 May 2016 18:02:06 UTC+10, Sayth Renshaw wrote:
> So how do i get argparse to read the file arguments correctly?
>
> Looking at the namespace it all gets pushed into path and
Thank you and ok
--
Sent from Gmail Mobile
--
https://mail.python.org/mailman/listinfo/python-list
On Sun, 29 May 2016 03:00 am, Steven D'Aprano wrote:
> On Sun, 29 May 2016 02:15 am, Gerald Britton wrote:
>
>> suppose I have a simple python project setup like this:
[...]
To which I responded:
> If this is a single project, why do you set it up like this? Is there a
> reason why you don't ju
On Sat, 28 May 2016 02:46 pm, Rustom Mody wrote:
[...]
> In idealized, simplified models like Turing models where
> 3 is 111
> 7 is 111
> 100, 8364 etc I wont try to write but you get the idea!
> its quite clear that bigger numbers cost more than smaller ones
I'm not sure that a tally (base-1
On Sunday, May 29, 2016 at 11:07:51 AM UTC+5:30, Steven D'Aprano wrote:
> On Sat, 28 May 2016 02:46 pm, Rustom Mody wrote:
>
> [...]
> > In idealized, simplified models like Turing models where
> > 3 is 111
> > 7 is 111
> > 100, 8364 etc I wont try to write but you get the idea!
> > its quite
On Sun, 29 May 2016 15:37:35 +1000, Steven D'Aprano wrote:
>
> [1] The worst being that my US English keyboard doesn't have a proper
> curly apostrophe, forcing me to use a straight ' mark in my name like
> some sort of animal.
What do you expect after all US is standard engineering speak for Un
> Perhaps:
> map(int, re.search(search_pat, stdout).groups())
>
>
>
Thanks Albert map saved me many lines of code but map returns a list I
will have to convert the list to string again
Below is how Iam planning to teh conversion
>>> block = map(int, re.search(search_pat, stdout).groups())
>>> p
32 matches
Mail list logo