Re: Tool that can document private inner class?

2023-02-08 Thread Ian Pilcher
On 2/8/23 08:25, Weatherby,Gerard wrote: No. I interpreted your query as “is there something that can read docstrings of dunder methods?” Have you tried the Sphinx specific support forums? https://www.sphinx-doc.org/en/master/support.html Yes. I've posted to both the -user and -dev group

Re: Tool that can document private inner class?

2023-02-08 Thread Weatherby,Gerard
-list@python.org Subject: Re: Tool that can document private inner class? *** Attention: This is an external email. Use caution responding, opening attachments or clicking on links. *** On 2/7/23 14:53, Weatherby,Gerard wrote: > Yes. > > Inspect module > > import inspect > >

Re: Tool that can document private inner class?

2023-02-07 Thread Ian Pilcher
On 2/7/23 14:53, Weatherby,Gerard wrote: Yes. Inspect module import inspect class Mine: def __init__(self): self.__value = 7 def __getvalue(self): /"""Gets seven""" /return self.__value mine = Mine() data = inspect.getdoc(mine) for m in inspect.getmembers(mine): if '__getvalue' in m[0]:

Re: Tool that can document private inner class?

2023-02-07 Thread Weatherby,Gerard
#x27;__getvalue' in m[0]: d = inspect.getdoc(m[1]) print(d) From: Python-list on behalf of Ian Pilcher Date: Tuesday, February 7, 2023 at 3:34 PM To: python-list@python.org Subject: Tool that can document private inner class? *** Attention: This is an external email. Use

Tool that can document private inner class?

2023-02-07 Thread Ian Pilcher
I've been banging my head on Sphinx for a couple of days now, trying to get it to include the docstrings of a private (name starts with two underscores) inner class. All I've managed to do is convince myself that it really can't do it. See https://github.com/sphinx-doc/sphinx/issues/11181. Is t

Re: A trivial question that I don't know - document a function/method

2022-10-24 Thread Mats Wichmann
expect the docstring to stand on its own, or to be processed by a doc-generation tool (like Sphinx). In the former case, make it look nice in a way that suits you. In the latter case, use the reStructuredText conventions that exist (there are at least three common styles) for the document

RE: A trivial question that I don't know - document a function/method

2022-10-24 Thread Schachner, Joseph (US)
22, 2022 4:58 PM To: python-list@python.org Subject: A trivial question that I don't know - document a function/method Hi all! What is the correct way, if any, of documenting a function/method? 1. def foo(a,b): """ A description. a: Whatever 1

Re: A trivial question that I don't know - document a function/method

2022-10-23 Thread Karsten Hilbert
hese days, again as I said). > Then there are all those cases where the signature hasn't been type-annotated True but OPs question was *how* to document so there's no perceived problem with having to document. > I would say that if the types are annotated, the method is simple enou

Re: A trivial question that I don't know - document a function/method

2022-10-23 Thread Paulo da Silva
Às 21:58 de 22/10/22, Paulo da Silva escreveu: Hi all! What is the correct way, if any, of documenting a function/method? Thank you all for the, valuable as usual, suggestions. I am now able to make my choices. Paulo -- https://mail.python.org/mailman/listinfo/python-list

Re: A trivial question that I don't know - document a function/method

2022-10-23 Thread Thomas Passin
On 10/23/2022 2:37 PM, Karsten Hilbert wrote: Am Sat, Oct 22, 2022 at 09:49:55PM -0400 schrieb Thomas Passin: def make_title_from_headline(self, p, h): """From node title, return title with over- and underline- strings. ... RETURNS a string """ def plot(self,

Re: A trivial question that I don't know - document a function/method

2022-10-23 Thread Karsten Hilbert
Am Sat, Oct 22, 2022 at 09:49:55PM -0400 schrieb Thomas Passin: > def make_title_from_headline(self, p, h): > """From node title, return title with over- and underline- strings. ... >RETURNS >a string > """ > def plot(self, stackposition=MAIN, clearFirst=True): > "

Re: A trivial question that I don't know - document a function/method

2022-10-22 Thread Thomas Passin
ons are welcome. Thanks. Paulo This is not a trivial question - not because it is hard but because it is important, and more so when someone else needs to work with your code. It's surprising how easy it is to forget these details about even your own code. Here are some examples of ho

Re: A trivial question that I don't know - document a function/method

2022-10-22 Thread Dan Stromberg
I don't think there is a "correct" way. It depends somewhat on what tools you're using. I like pydocstyle, which I have hung off of vim with syntastic. pydocstyle checks for https://peps.python.org/pep-0257/ conformance. Also, rather than describe the types of formal parameters to functions in

A trivial question that I don't know - document a function/method

2022-10-22 Thread Paulo da Silva
Hi all! What is the correct way, if any, of documenting a function/method? 1. def foo(a,b): """ A description. a: Whatever 1 b: Whatever 2 """ ... 2. def foo(a,b): """ A description. a -- Whatever 1 b -- Whatever 2 """

Re: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-16 Thread Peter J. Holzer
On 2021-06-16 18:32:46 +0200, Dieter Maurer wrote: > Chris Angelico wrote at 2021-6-16 02:20 +1000: > >On Wed, Jun 16, 2021 at 2:18 AM Dieter Maurer wrote: > >> As far as I know, there are no guarantees are the language level. > >> There are some (partially documented) implementation details > >>

Re: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-16 Thread Roel Schroeven
Dieter Maurer schreef op 16/06/2021 om 18:32: Chris Angelico wrote at 2021-6-16 02:20 +1000: On Wed, Jun 16, 2021 at 2:18 AM Dieter Maurer wrote: As far as I know, there are no guarantees are the language level. There are some (partially documented) implementation details for CPython (which is

Re: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-16 Thread Chris Angelico
On Thu, Jun 17, 2021 at 2:32 AM Dieter Maurer wrote: > > Chris Angelico wrote at 2021-6-16 02:20 +1000: > >On Wed, Jun 16, 2021 at 2:18 AM Dieter Maurer wrote: > >> As far as I know, there are no guarantees are the language level. > >> There are some (partially documented) implementation details

Re: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-16 Thread Dieter Maurer
Chris Angelico wrote at 2021-6-16 02:20 +1000: >On Wed, Jun 16, 2021 at 2:18 AM Dieter Maurer wrote: >> As far as I know, there are no guarantees are the language level. >> There are some (partially documented) implementation details >> for CPython (which is just one possible implementation). > >Y

Re: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-16 Thread Jach Feng
Greg Ewing 在 2021年6月16日 星期三上午7:11:35 [UTC+8] 的信中寫道: > On 15/06/21 7:32 pm, Jach Feng wrote: > > But usually the list creation is not in simple way:-) for example: > a = [1,2] > m = [a for i in range(3)] > m > > [[1, 2], [1, 2], [1, 2]] > id(m[0]) == id(m[1]) == id(m[2]) >

Re: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-15 Thread Chris Angelico
On Wed, Jun 16, 2021 at 12:44 PM Avi Gross via Python-list wrote: > > Greg, > > My point was not to ASK what python does as much as to ask why it matters to > anyone which way it does it. Using less space at absolutely no real expense > is generally a plus. Having a compiler work too hard, or even

RE: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-15 Thread Avi Gross via Python-list
sday, June 15, 2021 9:00 PM To: python-list@python.org Subject: Re: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it? On 16/06/21 12:15 pm, Avi Gross wrote: > May I ask if there are any PRACTICAL differences if multi

Re: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-15 Thread Greg Ewing
On 16/06/21 12:15 pm, Avi Gross wrote: May I ask if there are any PRACTICAL differences if multiple immutable tuples share the same address or not? Only if some piece of code relies on the identity of tuples by using 'is' or id() on them. There's rarely any need to write code like that, though

Re: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-15 Thread Chris Angelico
On Wed, Jun 16, 2021 at 10:17 AM Avi Gross via Python-list wrote: > > May I ask if there are any PRACTICAL differences if multiple immutable > tuples share the same address or not? No, there aren't. It's nothing more than an (optional) optimization. This is true of every immutable type, including

RE: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-15 Thread Avi Gross via Python-list
: Re: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it? On 15/06/21 7:32 pm, Jach Feng wrote: > But usually the list creation is not in simple way:-) for example: >>>> a = [1,2] >>>> m = [

Re: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-15 Thread Greg Ewing
On 15/06/21 7:32 pm, Jach Feng wrote: But usually the list creation is not in simple way:-) for example: a = [1,2] m = [a for i in range(3)] m [[1, 2], [1, 2], [1, 2]] id(m[0]) == id(m[1]) == id(m[2]) True The first line is only executed once, so you just get one list object [1, 2]. You the

Re: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-15 Thread MRAB
On 2021-06-15 17:18, Dieter Maurer wrote: Chris Angelico wrote at 2021-6-15 19:08 +1000: On Tue, Jun 15, 2021 at 6:32 PM Dieter Maurer wrote: Chris Angelico wrote at 2021-6-15 05:35 +1000: >On Tue, Jun 15, 2021 at 5:12 AM Jach Feng wrote: >> >> >>> n = [(1,2) for i in range(3)] >> >>> n >> [

Re: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-15 Thread Chris Angelico
On Wed, Jun 16, 2021 at 2:18 AM Dieter Maurer wrote: > > Chris Angelico wrote at 2021-6-15 19:08 +1000: > >On Tue, Jun 15, 2021 at 6:32 PM Dieter Maurer wrote: > >> > >> Chris Angelico wrote at 2021-6-15 05:35 +1000: > >> >On Tue, Jun 15, 2021 at 5:12 AM Jach Feng wrote: > >> >> > >> >> >>> n =

Re: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-15 Thread Jach Feng
Greg Ewing 在 2021年6月15日 星期二下午3:01:46 [UTC+8] 的信中寫道: > On 15/06/21 3:18 pm, Jach Feng wrote: > > From a user's point, I don't really care how Python creates thoseinstances, > > > either using an already exist one or create a new one, as > > long as each element (and its sub-element) are independen

Re: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-15 Thread Jach Feng
Chris Angelico 在 2021年6月15日 星期二上午5:23:12 [UTC+8] 的信中寫道: > On Tue, Jun 15, 2021 at 7:11 AM Rob Cliffe via Python-list > wrote: > > > > This puzzled me, so I played around with it a bit (Python 3.8.3): > > > > n = [] > > for i in range(3): > > n.append((1,7,-3,None,"x")) > > for i in range(3

Re: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-15 Thread Dieter Maurer
Chris Angelico wrote at 2021-6-15 19:08 +1000: >On Tue, Jun 15, 2021 at 6:32 PM Dieter Maurer wrote: >> >> Chris Angelico wrote at 2021-6-15 05:35 +1000: >> >On Tue, Jun 15, 2021 at 5:12 AM Jach Feng wrote: >> >> >> >> >>> n = [(1,2) for i in range(3)] >> >> >>> n >> >> [(1, 2), (1, 2), (1, 2)] >

Re: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-15 Thread Greg Ewing
On 15/06/21 3:18 pm, Jach Feng wrote: From a user's point, I don't really care how Python creates thoseinstances, > either using an already exist one or create a new one, as long as each element (and its sub-element) are independent from each other so a modification of one will not influence the

Re: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-15 Thread Chris Angelico
On Tue, Jun 15, 2021 at 6:32 PM Dieter Maurer wrote: > > Chris Angelico wrote at 2021-6-15 05:35 +1000: > >On Tue, Jun 15, 2021 at 5:12 AM Jach Feng wrote: > >> > >> >>> n = [(1,2) for i in range(3)] > >> >>> n > >> [(1, 2), (1, 2), (1, 2)] > >> >>> id(n[0]) == id(n[1]) == id(n[2]) > >> True > >

Re: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-15 Thread Dieter Maurer
Chris Angelico wrote at 2021-6-15 05:35 +1000: >On Tue, Jun 15, 2021 at 5:12 AM Jach Feng wrote: >> >> >>> n = [(1,2) for i in range(3)] >> >>> n >> [(1, 2), (1, 2), (1, 2)] >> >>> id(n[0]) == id(n[1]) == id(n[2]) >> True > >This is three tuples. Tuples are immutable and you get three >references

Re: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-14 Thread Chris Angelico
On Tue, Jun 15, 2021 at 7:11 AM Rob Cliffe via Python-list wrote: > > This puzzled me, so I played around with it a bit (Python 3.8.3): > > n = [] > for i in range(3): > n.append((1,7,-3,None,"x")) > for i in range(3): > n.append((1,7,-3,None,"x")) > print([id(x) for x in n]) > > a = 4 >

Re: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-14 Thread Rob Cliffe via Python-list
This puzzled me, so I played around with it a bit (Python 3.8.3): n = [] for i in range(3):     n.append((1,7,-3,None,"x")) for i in range(3):     n.append((1,7,-3,None,"x")) print([id(x) for x in n]) a = 4 n = [] for i in range(3):     n.append((1,7,-3,a,None,"x")) for i in range(3):     n.appe

Re: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-14 Thread Chris Angelico
On Tue, Jun 15, 2021 at 5:12 AM Jach Feng wrote: > > >>> n = [(1,2) for i in range(3)] > >>> n > [(1, 2), (1, 2), (1, 2)] > >>> id(n[0]) == id(n[1]) == id(n[2]) > True This is three tuples. Tuples are immutable and you get three references to the same thing. > >>> m = [[1,2] for i in range(3)]

Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-14 Thread Jach Feng
>>> n = [(1,2) for i in range(3)] >>> n [(1, 2), (1, 2), (1, 2)] >>> id(n[0]) == id(n[1]) == id(n[2]) True >>> m = [[1,2] for i in range(3)] >>> m [[1, 2], [1, 2], [1, 2]] >>> id(m[0]) == id(m[1]) == id(m[2]) False >>> --Jach -- https://mail.python.org/mailman/listinfo/python-list

pip UX studies: Test pip's new resolver and help us document dependency conflicts

2020-05-21 Thread Bernard Tyers - Sane UX Design
tly, we’re trying to discover all the ways in which pip‘s dependency resolver fails, so that we can work out what error messages and/or debugging information we should display. You can find out what we'd like you to do on this blog post: http://www.ei8fdb.org/thoughts/2020/05/test-pips-alpha-reso

Re: Document Entire Apps

2019-09-21 Thread Albert-Jan Roskam
On 15 Sep 2019 07:00, Sinardy Gmail wrote: I understand that we can use pydoc to document procedures how about the relationship between packages and dependencies ? ==》 Check out snakefood to generate dependency graphs: http://furius.ca/snakefood/. Also, did you discover sphinx already

Document Entire Apps

2019-09-14 Thread Sinardy Gmail
Hi Python Gurus, I am in earlier stage in my apps development, What tools or how is the Python community standard good practice in documenting the apps especially the packages that import another packages. I understand that we can use pydoc to document procedures how about the relationship

Re: find all js/css/image pathnames in a HTML document

2019-05-11 Thread Chris Angelico
On Sat, May 11, 2019 at 6:21 PM iMath wrote: > > To find all js/css/image pathnames in a HTML document, I used regular > expression(in the last line of my code snippet) to do this as the following, > are there any other shorter regular expressions or more efficient ways to do >

find all js/css/image pathnames in a HTML document

2019-05-11 Thread iMath
To find all js/css/image pathnames in a HTML document, I used regular expression(in the last line of my code snippet) to do this as the following, are there any other shorter regular expressions or more efficient ways to do this ? import re translation='''

Re: Mixing R and Python in the same Jupyter Notebook and finding Python code within an RMarkdown document

2018-11-03 Thread Thomas Jollans
pecific language, rpy2's ipython %%R magic lets you intersperse calls to R from Python notebooks (much like the %%cython magic) https://rpy2.bitbucket.io/ example: http://lgautier.github.io/jpd-pdapr-slides/notebooks/potholes.html > > >         2.  How can one find Python code

Mixing R and Python in the same Jupyter Notebook and finding Python code within an RMarkdown document

2018-11-02 Thread Spencer Graves
Hello, All:   Two questions:         1.  Is it feasible to mix R and Python code in the same Jupyter notebook?  If yes, can you please point me to an example?         2.  How can one find Python code from within and R Markdown document?           ** "

Re: How to obtain an up-to-date document of tkinter

2017-04-20 Thread Terry Reedy
On 4/20/2017 3:19 AM, Mok-Kong Shen wrote: Am 20.04.2017 um 02:16 schrieb breamore...@gmail.com: On Thursday, April 20, 2017 at 1:09:45 AM UTC+1, Mok-Kong Shen wrote: How could one obtain an up-to-date document of tkinter. I ask this question because apparently there are stuffs of tkinter that

Re: How to obtain an up-to-date document of tkinter

2017-04-20 Thread Mok-Kong Shen
Am 20.04.2017 um 08:08 schrieb Terry Reedy: On 4/19/2017 8:09 PM, Mok-Kong Shen wrote: [snip] I ask this question because apparently there are stuffs of tkinter that worked in Python 3.5 but no longer in Python 3.6.1. I don't know of any such. Please see my reply to breamoreboy. M. K. Shen

Re: How to obtain an up-to-date document of tkinter

2017-04-20 Thread Mok-Kong Shen
Am 20.04.2017 um 02:16 schrieb breamore...@gmail.com: On Thursday, April 20, 2017 at 1:09:45 AM UTC+1, Mok-Kong Shen wrote: How could one obtain an up-to-date document of tkinter. I ask this question because apparently there are stuffs of tkinter that worked in Python 3.5 but no longer in

Re: How to obtain an up-to-date document of tkinter

2017-04-19 Thread Terry Reedy
On 4/19/2017 8:09 PM, Mok-Kong Shen wrote: How could one obtain an up-to-date document of tkinter. http://www.tcl.tk/man/tcl8.6/TkCmd/contents.htm documents the tcl/tk that tkinter wraps. There are a few things that are not included in tkinter. I ask this question because apparently

Re: How to obtain an up-to-date document of tkinter

2017-04-19 Thread breamoreboy
On Thursday, April 20, 2017 at 1:09:45 AM UTC+1, Mok-Kong Shen wrote: > How could one obtain an up-to-date document of tkinter. I ask this > question because apparently there are stuffs of tkinter that > worked in Python 3.5 but no longer in Python 3.6.1. > > M. K. Shen https://do

How to obtain an up-to-date document of tkinter

2017-04-19 Thread Mok-Kong Shen
How could one obtain an up-to-date document of tkinter. I ask this question because apparently there are stuffs of tkinter that worked in Python 3.5 but no longer in Python 3.6.1. M. K. Shen -- https://mail.python.org/mailman/listinfo/python-list

Re: Coding issue with XML for word document

2017-02-08 Thread accessnewbie
> myBlurb = "My Favorite Cars - > My favorite cars are available at " + > myText + " > > What am I missing here? Sorry about posting in python group. My XML coding was embedded in python script. I will do better next time. The problem was with placement of tags. The following worked: myB

Re: Coding issue with XML for word document

2017-02-08 Thread Pavol_Lisy
;t keep it a secret -- tell us > what it says. COPY AND PASTE the traceback, in full, not just the last > line. I am afraid he means that it create mishmash in word document... Dear accessnewbie I propose divide problem to smaller subproblems. For example make python code as simple

Re: Coding issue with XML for word document

2017-02-08 Thread Deborah_Swanson
ing this question in Microsoft's Office/Word Document forums. Good luck! accessnew...@gmail.com wrote, on February 06, 2017 5:00 PM Subject: Coding issue with XML for word document > > > I am constructing a sentence to insert into a word xml > template. My code is below > > -

Re: Coding issue with XML for word document

2017-02-08 Thread Deborah_Swanson
n261.z1 > Sent: Monday, February 06, 2017 9:52 AM > To: python-list@python.org > Subject: Re: Coding issue with XML for word document > > > From: "Deborah Swanson" > > I don't see any Python in your code. The python.org list > isn't generally familiar with Mi

Re: Coding issue with XML for word document

2017-02-07 Thread Pavol Lisy
et -- tell us > what it says. COPY AND PASTE the traceback, in full, not just the last > line. I am afraid he means that it create mishmash in word document... Dear accessnewbie I propose divide problem to smaller subproblems. For example make python code as simple as possible (avoid pytho

Re: Coding issue with XML for word document

2017-02-07 Thread Deborah_Swanson
From: Deborah_Swanson@f38.n261.z1 From: "Deborah Swanson" I don't see any Python in your code. The python.org list isn't generally familiar with Microsoft proprietary code, which is often quite different from other versions. Try asking this question in Microsoft's Of

RE: Coding issue with XML for word document

2017-02-07 Thread Deborah Swanson
17 9:52 AM > To: python-list@python.org > Subject: Re: Coding issue with XML for word document > > > From: "Deborah Swanson" > > I don't see any Python in your code. The python.org list > isn't generally familiar with Microsoft proprietary code,

Re: Coding issue with XML for word document

2017-02-07 Thread Deborah_Swanson
From: "Deborah Swanson" I don't see any Python in your code. The python.org list isn't generally familiar with Microsoft proprietary code, which is often quite different from other versions. Try asking this question in Microsoft's Office/Word Document forums. Good luck!

Re: Coding issue with XML for word document

2017-02-06 Thread Steven D'Aprano
On Mon, 06 Feb 2017 17:00:25 -0800, accessnewbie wrote: > I am constructing a sentence to insert into a word xml template. My code > is below > > #Create a list > if len(myList) > 0: > if len(myList) > 1: What is myList? Where does it come from? > testText = list_format(myList) + "

RE: Coding issue with XML for word document

2017-02-06 Thread Deborah Swanson
I don't see any Python in your code. The python.org list isn't generally familiar with Microsoft proprietary code, which is often quite different from other versions. Try asking this question in Microsoft's Office/Word Document forums. Good luck! accessnew...@gmail.com wrote,

Coding issue with XML for word document

2017-02-06 Thread accessnewbie
I am constructing a sentence to insert into a word xml template. My code is below #Create a list if len(myList) > 0: if len(myList) > 1: testText = list_format(myList) + " dealers." else: myText = myList[0] + " dealer." #Contruct sentence #m

Re: sphinx (or other means to document python)

2016-10-24 Thread Dan Stromberg
hemselves, but rather .rst files in which you can indeed > instruct Sphinx to just go and document a module. I just evaluated a bunch of docstring-extracting-for-documentation tools, including Sphinx and pydoctor. Sphinx isn't that hard anymore, with autodoc and apidoc. But pydoctor appears

Re: sphinx (or other means to document python)

2016-09-26 Thread jmp
times noweb is considerably simpler - but does not allow for the extraction of docstrings/comments - and does provide for a fairly painless way to combine comments, documentation along with code Hi, Keep in mind sphinx has a greater scope than writing docs from/for python. You could use sphinx to do

Re: sphinx (or other means to document python)

2016-09-24 Thread Yann Kaiser
pydoctor may be something you're looking for. I don't know if it supports exporting to PDF like Sphinx does. As you've no doubt figured out by now, Sphinx doesn't revolve around the Python files themselves, but rather .rst files in which you can indeed instruct Sphinx to ju

Re: sphinx (or other means to document python)

2016-09-24 Thread chitturk
On Sunday, September 11, 2016 at 3:56:36 PM UTC-5, chit...@uah.edu wrote: (about being frustrated with sphinx) I _remain_ frustrated - even as I finally figured out how to use it (thanks to a complete example from a friend) sphinx is very picky about spaces, lines - I had a line with some math f

sphinx (or other means to document python)

2016-09-11 Thread chitturk
Excuse me for being frustrated (!) (with documenting python with Sphinx) I have a source file myfile.py which contains documentation with "docstrings" I am trying to have Sphinx create the pdf (from latex) I have run through sphinx-quickstart - which creates build, source (there is some conf.py

Re: Using python to convert PDF document to MSWord documents

2015-11-05 Thread zbin1986
I'm not a developer, i always use this free online pdf to word converter http://www.online-code.net/pdf-to-word.html to convert pdf to ms doc online. -- https://mail.python.org/mailman/listinfo/python-list

Re: xlrd Can't find workbook in OLE2 compound document

2014-09-17 Thread dieter
Andi Vaganerd writes: > I'm trying to open an excel file (.xlsx) using python module xlrd. > And I'm getting this error over here: > > "Can't find workbook in OLE2 compound document" I interprete this message as follows: the excel content in your file i

xlrd Can't find workbook in OLE2 compound document

2014-09-17 Thread Andi Vaganerd
Hello, I'm trying to open an excel file (.xlsx) using python module xlrd. And I'm getting this error over here: "Can't find workbook in OLE2 compound document" Is there anybody here already got this problem? How do you resolve it? I've a very simple python pro

Re: Adding new lines to word document using zipfile module within python 2.7?

2013-08-27 Thread Christian Gollwitzer
Am 27.08.13 22:45, schrieb accessnew...@gmail.com: Writing text to a word document (word 2007) using the zipfile module via python coding (python 2.7). Below if the section of code I am using to do this. I can't figure out what character I need to use to get it to add new lines to the zi

Adding new lines to word document using zipfile module within python 2.7?

2013-08-27 Thread accessnewbie
Writing text to a word document (word 2007) using the zipfile module via python coding (python 2.7). Below if the section of code I am using to do this. I can't figure out what character I need to use to get it to add new lines to the zipfile. if Count: blurb = "\r\nINSERT TABLE

Re: using pandoc instead of rst to document python

2013-04-24 Thread R. Michael Weylandt
On Wed, Apr 24, 2013 at 12:14 AM, Peng Yu wrote: > I currently use sphinx to generate the doc (in rst). How to figure it > to support pandoc's markdown? If I understand the desired workflow, it's just 1) write in markdown; 2) then run pandoc to convert to rst; 3) then run Sphinx to render html or

Re: using pandoc instead of rst to document python

2013-04-23 Thread Peng Yu
On Tue, Apr 23, 2013 at 5:40 PM, R. Michael Weylandt wrote: > On Tue, Apr 23, 2013 at 6:36 PM, Peng Yu wrote: >> Hi, >> >> I'm wondering if it possible to use pandoc instead of rst to document >> python. Is there a documentation system support this format of py

Re: using pandoc instead of rst to document python

2013-04-23 Thread R. Michael Weylandt
On Tue, Apr 23, 2013 at 6:36 PM, Peng Yu wrote: > Hi, > > I'm wondering if it possible to use pandoc instead of rst to document > python. Is there a documentation system support this format of python > document? Pandoc is a converter while rst is a format so they'r

using pandoc instead of rst to document python

2013-04-23 Thread Peng Yu
Hi, I'm wondering if it possible to use pandoc instead of rst to document python. Is there a documentation system support this format of python document? -- Regards, Peng -- http://mail.python.org/mailman/listinfo/python-list

Re: SOAP web services using python. Would like to change the Envelope Document using MessagePlugin before sending it using suds

2013-02-19 Thread dieter
sarat.devin...@gmail.com writes: > My current SOAP request sent via suds.client looks like this: > > > > > > > > Test > > > > > > > This request fails on my server. If i take the same XML request and massage > it and

SOAP web services using python. Would like to change the Envelope Document using MessagePlugin before sending it using suds

2013-02-17 Thread sarat . devineni
Hi , My current SOAP request sent via suds.client looks like this: Test This request fails on my server. If i take the same XML request and massage it and send it visa SOAPUI, it works fine. What I did was

Re: How to access the document for __call__ from command line?

2012-10-18 Thread Terry Reedy
On 10/18/2012 10:30 PM, Peng Yu wrote: Hi, reference.pdf from python document has the following description. It is not accessible from help() in the command line. Is there an alternative so that I can quickly access these class attributes or method names from the command line? object.__call__

How to access the document for __call__ from command line?

2012-10-18 Thread Peng Yu
Hi, reference.pdf from python document has the following description. It is not accessible from help() in the command line. Is there an alternative so that I can quickly access these class attributes or method names from the command line? object.__call__(self [, args... ]) Called when the

Re: lxml precaching DTD for document verification.

2011-11-28 Thread Gelonida N
Thanks Stefan, On 11/28/2011 08:38 AM, Stefan Behnel wrote: > Gelonida N, 27.11.2011 18:57: >> I'd like to verify some (x)html / / html5 / xml documents from a server. >> >> These documents have a very limited number of different doc types / DTDs. >> >> So what I would like to do is to build a sm

Re: lxml precaching DTD for document verification.

2011-11-27 Thread Stefan Behnel
Gelonida N, 27.11.2011 18:57: I'd like to verify some (x)html / / html5 / xml documents from a server. These documents have a very limited number of different doc types / DTDs. So what I would like to do is to build a small DTD cache and some code, that would avoid searching the DTDs over and o

Re: lxml precaching DTD for document verification.

2011-11-27 Thread Gelonida N
contents, which I am not allowed to post to an external site. > > With regards to XML, he may mean that he wants to validate that the > document conforms to a specific format, not just that it is generally > valid XML. I don't think the w3 validator will do that. > Basically

Re: lxml precaching DTD for document verification.

2011-11-27 Thread John Gordon
of effort by just using > the validator the W3C provides (http://validator.w3.org/). With regards to XML, he may mean that he wants to validate that the document conforms to a specific format, not just that it is generally valid XML. I don't think the w3 validator will do that. -- Joh

Re: lxml precaching DTD for document verification.

2011-11-27 Thread Roy Smith
In article , Gelonida N wrote: > I'd like to verify some (x)html / / html5 / xml documents from a server. I'm sure you could roll your own validator with lxml and some DTDs, but you would probably save yourself a huge amount of effort by just using the validator the W3C provides (http://vali

lxml precaching DTD for document verification.

2011-11-27 Thread Gelonida N
Hi, I'd like to verify some (x)html / / html5 / xml documents from a server. These documents have a very limited number of different doc types / DTDs. So what I would like to do is to build a small DTD cache and some code, that would avoid searching the DTDs over and over from the net. What wou

Can Epydoc be used to document decorated function in Python?

2011-07-28 Thread Victor Khangulov
Hello, is there a way to use epydoc to document a Python function that has been decorated? @decorator def func1(): """ My function func1 """ print "In func1" The resulting output of epydoc is that func1 gets listed as a variable with n

Re: How should I document exceptions thrown by a method?

2011-07-27 Thread Chris Torek
ll invoke x.get() and therefore propagate any exception that x.get() might raise". >> Or should Setting's constructor catch any exceptions raised by the >> ConfigParser and "convert it" to a Settings- specific exception class >> that I then document? > >Pl

Re: How should I document exceptions thrown by a method?

2011-07-27 Thread Ben Finney
gt; to mention that as it might be just implied? In this case IMO it is implied that one might get exceptions from the object one passes as an argument to a callable. > Or should Setting's constructor catch any exceptions raised by the > ConfigParser and "convert it" to a Se

How should I document exceptions thrown by a method?

2011-07-27 Thread Arcadio
I use Doxygen to document my source code, and I'm wondering how exceptions thrown by a method of a class should be documented in the following example. I have a Settings class that is used to hold application settings. A Settings object initializes itself from a ConfigParser that gets pass

Read barcode from the PDF document

2011-06-27 Thread Asif Jamadar
I have PDF document which consist of barcode characters. Now how can I read these barcode characters using python code? Or how can I recognize this barcode? -- http://mail.python.org/mailman/listinfo/python-list

Re: Digitally Signing a XML Document (using SHA1+RSA or SHA1+DSA)

2010-12-30 Thread Stefan Behnel
Jorgen Grahn, 30.12.2010 10:41: If you really *do* have a requirement to make the result XML-like and incompatible with anything else, I'm afraid you're on your own Well, there's always xmlsec if you need it. http://www.aleksey.com/xmlsec/ Stefan -- http://mail.python.org/mailman/listinfo/py

Re: Digitally Signing a XML Document (using SHA1+RSA or SHA1+DSA)

2010-12-30 Thread Jorgen Grahn
On Tue, 2010-12-28, Adam Tauno Williams wrote: > On Tue, 2010-12-28 at 03:25 +0530, Anurag Chourasia wrote: >> Hi All, > >> I have a requirement to digitally sign a XML Document using SHA1+RSA >> or SHA1+DSA >> Could someone give me a lead on a library that I can use

Re: Digitally Signing a XML Document (using SHA1+RSA or SHA1+DSA)

2010-12-28 Thread Anurag Chourasia
something else out there that could help meet my requirement. Regards, Anurag On Tue, Dec 28, 2010 at 6:36 AM, Adam Tauno Williams wrote: > On Tue, 2010-12-28 at 03:25 +0530, Anurag Chourasia wrote: > > Hi All, > > > I have a requirement to digitally sign a XML Document using SH

Re: Digitally Signing a XML Document (using SHA1+RSA or SHA1+DSA)

2010-12-27 Thread Adam Tauno Williams
On Tue, 2010-12-28 at 03:25 +0530, Anurag Chourasia wrote: > Hi All, > I have a requirement to digitally sign a XML Document using SHA1+RSA > or SHA1+DSA > Could someone give me a lead on a library that I can use to fulfill > this requirement? <http://stuvel.eu/rsa> Never u

Digitally Signing a XML Document (using SHA1+RSA or SHA1+DSA)

2010-12-27 Thread Anurag Chourasia
Hi All, I have a requirement to digitally sign a XML Document using SHA1+RSA or SHA1+DSA Could someone give me a lead on a library that I can use to fulfill this requirement? The XML Document has values such as -BEGIN RSA PRIVATE KEY- MIIBOgIBAAJBANWzHfF5Bppe4JKlfZDqFUpNLrwNQqguw76g

Help on formatting xml document

2010-10-04 Thread Santosh Mohan
Hi, Need help in formatting xml document using xml.doc.minidom I have a raw xml output, I need to format the xml output and write it to a file. rawdata="""Santosh 29 Bangalore """ I would appreciate your help. Thanks, Santosh -- http://mail.python.org/mailman/listinfo/python-list

Re: Help on formatting xml document

2010-10-04 Thread Nitin Pawar
use minidom to parse from string and then write it to a file from xml.dom.minidom import parse, parseString parseString(rawdata) On Mon, Oct 4, 2010 at 11:33 AM, Santosh Mohan wrote: > Hi, > > Need help in formatting xml document using xml.doc.minidom > > > I have a raw xml

Re: How to Convert IO Stream to XML Document

2010-09-11 Thread naugiedoggie
On Sep 10, 12:20 pm, jakecjacobson wrote: > I am trying to build a Python script that reads a Sitemap file and > push the URLs to a Google Search Appliance.  I am able to fetch the > XML document and parse it with regular expressions but I want to move > to using native XML tools to d

Re: How to Convert IO Stream to XML Document

2010-09-10 Thread Stefan Behnel
jakecjacobson, 10.09.2010 18:20: response = urllib2.urlopen(request) pageguts = response.read() xmldoc = minidom.parse(pageguts) Check the minidom docs, there's a parseString() function that does what it says. Also, don't forget to take a look at xml.etree.ElementTree

Re: How to Convert IO Stream to XML Document

2010-09-10 Thread Nitin Pawar
> XML document and parse it with regular expressions but I want to move > to using native XML tools to do this. The problem I am getting is if > I use urllib.urlopen(url) I can convert the IO Stream to a XML > document but if I use urllib2.urlopen and then read the response, I > get

  1   2   3   4   >