Re: Kansha 1.0.5 released
On 01/10/2015 16:26, Romuald Texier-Marcadé wrote: > Hello everybody! > > On behalf of the *Kansha team*, I am excited to announce the release of > version *1.0.5* of *Kansha*, an open source web application to manage > and share collaborative scrum boards with enhanced todo lists and > Trello-like boards (http://www.kansha.org/). > > This version is the first public release. You can install it from pypi > or run it as a docker container. See > http://kansha.readthedocs.org/en/stable/install.html. > > The package is BSD licensed and you can get the sources from github: > https://github.com/Net-ng/kansha. > > General and developer documentation is available at > http://kansha.readthedocs.org/en/stable/. > > Questions can be directed to the *Kansha* mailing list: > http://groups.google.com/group/kansha-users > > > Cheers, > > Romuald Texier-Marcadé > *Software developer* > Just tried the link to the home page, clicked on "Try It" and got connection refused in Chrome, MS Edge & Firefox - this doesn't give a great first impression. -- Steve (Gadget) Barnes Any opinions in this message are my personal opinions and do not reflect those of my employer. -- https://mail.python.org/mailman/listinfo/python-list
Re: Newbie: Designer Looking to Build Graphics Editor (PS/AI)
Creating a standalone, special-purpose program that does one thing really well seems doable for a beginner. What you are describing sounds much more involved than that though. Frankly, it is overwhelming. I would HIGHLY suggest looking into creating an extension/plugin for an existing open-source program to do what you want. You mentioned vector graphics and logos, so I would recommend looking into Inkscape (http://inkscape.org) as a candidate for your project. Inkscape has add-ons that can be internal C++ extensions or external scripts in Python (or whatever). Look here: https://inkscape.org/en/develop/extensions/ The advantage of this approach is the heavy lifting has already been done for you, and you can focus on implementing whatever feature you need. This is much more plausible for a beginner to tackle. We also have the added bonus of expanding Inkscape's capabilities, which helps out everyone else. -- Blake T. Garretson On Fri, Oct 2, 2015 at 12:41 PM, Kenneth L wrote: > I'm a graphic designer. I'm new to Python. I know html, css, alittle > actioscript and little javascript. I actually build an iOS using Flash. I > understand programming concepts I believe. > > I'd like to build a Illustrator/Photoshop like program. Why, there are > some features that I'd like to personally have. Example, randomizing the > rotation, line height and sizing of text. You have to do this manually. It > would be cool have a little program that is dedicated building logos. Not > trying to reinvent the wheel. Just basic featuring of vector graphics > program plus my enhancements. > Maybe this program could be base and it can export vector and bring into > Photoshop to add finishing touches. > > I heard Python is easy to learn. So my question is Python able to do this > or connect with libraries? Plus where do I start? I watched python > tutorials but they don't really show you how to build an application. How > does one build a graphics program? LOL where do you start? How do you draw > graphics on the screen? > > I'm just confused. > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list
Re: Footnotes in ReST
On Oct 3, 2015 7:40 AM, "Steven D'Aprano" wrote: > I need to add a footnote between [2] and [3], but I don't want to have to > renumber the following 997 footnotes by hand. Is there something I can do, > within the syntax of ReST itself, to help? I would use a regular expression to find and replace all the numbers with the auto-numbering feature. So something like "\[\d+\]_" should be replaced with "\[#\]_". ### Blake T. Garretson -- https://mail.python.org/mailman/listinfo/python-list
python and ARM memory types
I am running python in the ARM architecture (arm64 to be exact). The CPU Arch I use has clusters (2 big cores in a cluster and 2 small cores in another cluster think : A57, A53). It's going to be run in Ubuntu 14.04 I am trying to run traffic that stresses the interconnects of the clusters. One example is dekker's algorithm : pin first process to 1 cluster and another process to another cluster and check the algo (using multiprocessing library). Also I am also trying to run "streaming" traffic - the kind of traffic that you don't want in the cache because it is non-temporal. But how do I specify (streaming,write-combining,write-back) memory types in python ? Is there a library that I can use ? I am thinking of programming some fixed memory space (say 0x1000_000 - 0x2000_000) as "WC or WT or streaming" using the OS and then try to use the mmap facility in python. What set of libraries can I use ? Where should I start ? Fixed memories are discouraged so what kind of alternatives I can use ? Thanks, Vox -- https://mail.python.org/mailman/listinfo/python-list
Re: Footnotes in ReST
Blake Garretson wrote:
> On Oct 3, 2015 7:40 AM, "Steven D'Aprano" wrote:
>> I need to add a footnote between [2] and [3], but I don't want to have to
>> renumber the following 997 footnotes by hand. Is there something I can
>> do, within the syntax of ReST itself, to help?
>
> I would use a regular expression to find and replace all the numbers with
> the auto-numbering feature. So something like "\[\d+\]_" should be
> replaced with "\[#\]_".
With labeled autonumbers:
>>> text = """\
... blah blah blah [1]_ and blah blah blah [2]_.
... blah blah [3]_ blah ... blah blah
... blah blah [999]_.
...
... .. [1] fe
... .. [2] fi
... .. [3] fo
......
... .. [999] fum
... """
>>> print(re.compile(r"\[(\d+)\]").sub(r"[#n\1]", text))
blah blah blah [#n1]_ and blah blah blah [#n2]_.
blah blah [#n3]_ blah ... blah blah
blah blah [#n999]_.
.. [#n1] fe
.. [#n2] fi
.. [#n3] fo
...
.. [#n999] fum
Changing numbers to make room for a new footnote is not much harder (but
less convenient as you have to repeat it for every new footnote):
>>> def replace(match, n=2):
... index = int(match.group(1))
... if index >= n:
... index += 1
... return "[{}]".format(index)
...
>>> print(re.compile(r"\[(\d+)\]").sub(replace, text))
blah blah blah [1]_ and blah blah blah [3]_.
blah blah [4]_ blah ... blah blah
blah blah [1000]_.
.. [1] fe
.. [3] fi
.. [4] fo
...
.. [1000] fum
--
https://mail.python.org/mailman/listinfo/python-list
Re: Footnotes in ReST
Peter Otten wrote:
> Changing numbers to make room for a new footnote is not much harder (but
> less convenient as you have to repeat it for every new footnote):
>
def replace(match, n=2):
> ... index = int(match.group(1))
> ... if index >= n:
> ... index += 1
> ... return "[{}]".format(index)
> ...
print(re.compile(r"\[(\d+)\]").sub(replace, text))
> blah blah blah [1]_ and blah blah blah [3]_.
> blah blah [4]_ blah ... blah blah
> blah blah [1000]_.
>
> .. [1] fe
> .. [3] fi
> .. [4] fo
>...
> .. [1000] fum
Those who remember the old basic dialects might [1]_ like
$ cat insert_footnote_basic.py
#!/usr/bin/env python3
import re
import sys
def step(start, delta):
n = start
while True:
yield n
n += delta
def insert_footnote(text):
lookup = {}
steps = step(10, 10)
def replace(match):
index = int(match.group(1))
try:
new_index = lookup[index]
except KeyError:
new_index = lookup[index] = next(steps)
return "[{}]".format(new_index)
return re.compile(r"\[(\d+)\]").sub(replace, text)
if __name__ == "__main__":
sys.stdout.write(
insert_footnote(sys.stdin.read())
)
$ cat sample.rst
blah blah blah [10]_ and blah blah blah [20]_.
[21] this is new
blah blah [30]_ blah ... blah blah
blah blah [9990]_.
.. [10] fe
.. [20] fi
.. [21] yes it is
.. [30] fo
...
.. [9990] fum
$ ./insert_footnote_basic.py < sample.rst
blah blah blah [10]_ and blah blah blah [20]_.
[30] this is new
blah blah [40]_ blah ... blah blah
blah blah [50]_.
.. [10] fe
.. [20] fi
.. [30] yes it is
.. [40] fo
...
.. [50] fum
$
.. [1] or run away screaming ;)
--
https://mail.python.org/mailman/listinfo/python-list
Re: Newbie: Designer Looking to Build Graphics Editor (PS/AI)
Grant Edwards : > Holy Cow. > > I'd like to build something just like the Brooklyn Bridge, only with > more lanes. Failed grandiose attempts make you into a better software developer. Successful grandiose attempts even more so! Always playing it safe condemns you to mediocrity. Not that mediocrity is all that bad a place to be. Marko -- https://mail.python.org/mailman/listinfo/python-list
Re: function code snippet that has function calls I have never seen before. How does it work.
On Sun, 4 Oct 2015 04:40 am, Ronald Cosentino wrote: > def funA(x,y,z): > return (x+y) * z > def funB(x,y): > return(x-y) > print(funA(4,funB(2,3), funB(3,2))) > > the answer is 3. I don't know how it works. Break it up and consider it a little at a time, starting with the three values given to funA: * calculate 4 (too easy, it's already done) * calculate funB(2, 3) => funB(2, 3) returns 2-3, which gives -1 * calculate funB(3,2) => funB(3, 2) returns 3-2, which gives 1 Then pass those three values to the funA function: * calculate funA(4, -1, 1) => which returns (4 + -1)*1, which gives 3 and finally pass that value to print: * print(3) which prints 3. -- Steven -- https://mail.python.org/mailman/listinfo/python-list
Re: Check if a given value is out of certain range
On Sat, 3 Oct 2015 10:12 pm, Laura Creighton wrote: > Actually, the fact that adults have more difficulty processing > negations is one of the earliest things proven experimentally > in experimental psychology. I don't think I've questioned that under some circumstances some negations can be hard to understand. I've certainly written my share of code involving negatives that I've had to refactor to understand. A typical example: def function(arg, dontpreprocess=False): """Perform function on arg. If dontpreprocess is not true, arg is preprocessed.""" if not dontpreprocess: arg = preprocess(arg) ... And of course there are the legendary chains of negations: don't not cancel the preprocessor suppressor Does the preprocess run or not? :-) But I don't think we can jump from a general observation about negations to the conclusion that a logical disjunction of two different comparisons is necessarily easier to understand than a negated chained comparison. Some negations are easy to understand: Don't touch that! and some negations may technically be harder to understand, but in a practical sense the difference may be negligible: if x == 1: ... if x != 1: ... I refuse to believe that the second is *significantly* harder to reason about than the first. [...] > It seems that people tend to hear what they expect to hear, and that > effect overwhelms any 'this is harder to constuct logically' effect. I can certainly believe that. It explains a class of errors: "I'll have the cheese and salad sandwich, no butter, no salt or pepper." "Okay." [proceeds to make sandwich with butter, salt and pepper] I've had that happen to me more times than I can remember. People only listen with half an ear, especially if they're tired, distracted, emotional, bored, busy, or breathing. > Also, the 'mouse is quicker' experiment was rather more nuanced than > you reported. It seems when measuring 'what is faster' the cognitive > load is important. Time seems to go faster when you are thinking > harder about something, than when you are not. (i.e. how did my > coffee get cold? I just started hacking on this thing?) It seems > that mouse editing was less of a cognitive load than typing, for > the people studied, thus they reported that keyboard was faster, > when it wasn't for them. Thanks for the anecdote, it was fascinating. My point was not so much about the advantage (if any) of mouse over keyboard, which I'm sure will depend on a multitude of factors, but of people's ability to judge their own efficiency, which I maintain is often not very good. -- Steven -- https://mail.python.org/mailman/listinfo/python-list
Re: Newbie: Designer Looking to Build Graphics Editor (PS/AI)
On 2015-10-04, Marko Rauhamaa wrote: > Grant Edwards : > >> Holy Cow. >> >> I'd like to build something just like the Brooklyn Bridge, only with >> more lanes. > > Failed grandiose attempts make you into a better software developer. > > Successful grandiose attempts even more so! > > Always playing it safe condemns you to mediocrity. Not that > mediocrity is all that bad a place to be. Just pointing out that it _is_ a grandiose attempt... If the OP still wants to undertake such a huge task, then I applaud him. It just struck me as amusing they he asked "how do I do it" about such a huge project... -- Grant -- https://mail.python.org/mailman/listinfo/python-list
Neil Gaiman mentions Python
The Moth is a podcast of people telling stories. Many of them are really good. In a recent story, Neil Gaiman talks about his relationship with his dad, and along the way, Python makes a (very brief) appearance: http://themoth.org/posts/stories/a-fathers-pride --Ned. -- https://mail.python.org/mailman/listinfo/python-list
Re: Check if a given value is out of certain range
On Sunday, October 4, 2015 at 7:18:11 PM UTC+5:30, Steven D'Aprano wrote: > On Sat, 3 Oct 2015 10:12 pm, Laura Creighton wrote: > > > Actually, the fact that adults have more difficulty processing > > negations is one of the earliest things proven experimentally > > in experimental psychology. > > I don't think I've questioned that under some circumstances some negations > can be hard to understand. I've certainly written my share of code > involving negatives that I've had to refactor to understand. A typical > example: > > def function(arg, dontpreprocess=False): > """Perform function on arg. If dontpreprocess is not true, > arg is preprocessed.""" > if not dontpreprocess: > arg = preprocess(arg) > ... > > And of course there are the legendary chains of negations: > > don't not cancel the preprocessor suppressor > > Does the preprocess run or not? :-) > > But I don't think we can jump from a general observation about negations to > the conclusion that a logical disjunction of two different comparisons is > necessarily easier to understand than a negated chained comparison. Some > negations are easy to understand: > > Don't touch that! > > and some negations may technically be harder to understand, but in a > practical sense the difference may be negligible: > > if x == 1: ... > > if x != 1: ... > > > I refuse to believe that the second is *significantly* harder to reason > about than the first. [With hermeneutic/semantic hat firmly on] one could make a case that "!=" ≠ "not =" ≠ "≠" [Back with python hat] My preference: not 1 <= x <= 10 -- https://mail.python.org/mailman/listinfo/python-list
Re: Check if a given value is out of certain range
On Monday, October 5, 2015 at 7:58:34 AM UTC+5:30, Rustom Mody wrote: > On Sunday, October 4, 2015 at 7:18:11 PM UTC+5:30, Steven D'Aprano wrote: > > and some negations may technically be harder to understand, but in a > > practical sense the difference may be negligible: > > > > if x == 1: ... > > > > if x != 1: ... > > > > > > I refuse to believe that the second is *significantly* harder to reason > > about than the first. > > [With hermeneutic/semantic hat firmly on] > one could make a case that > "!=" ≠ "not =" ≠ "≠" > [Back with python hat] > My preference: > not 1 <= x <= 10 I take that back: Unarys binding looser than binaries is "yuck" (in my book) SO it would have to be not (1 <= x <= 10) -- https://mail.python.org/mailman/listinfo/python-list
Re: reg multiple login python
On Thursday, 1 October 2015 12:35:01 UTC+5:30, [email protected] wrote: > Hi All, > > Is there anyway i can login to remote servers at once and do the activity, i > can do one by one using for loop.. > > Thanks in advance. Hi Paul, subprocess is used to spawn a new process with in the machine.. my requirement is completely different... -- https://mail.python.org/mailman/listinfo/python-list
Re: reg multiple login python
On Thursday, 1 October 2015 12:35:01 UTC+5:30, [email protected] wrote: > Hi All, > > Is there anyway i can login to remote servers at once and do the activity, i > can do one by one using for loop.. > > Thanks in advance. Hi Laura, yes this is what i require and i don't need more than this. how can i fork a pxssh session ? can i do like this ? os.fork(pxssh.pxssh()), but how can i capture the session variable ?? whereas fork returns child id and pid.. Thanks... -- https://mail.python.org/mailman/listinfo/python-list
