Re: best way to remove leading zeros from a tuple like string

2018-05-21 Thread Wolfram Hinderer via Python-list
to be even simpler. >>> str(tuple(map(int, s[1:-1].split("," '(128, 20, 8, 255, -1203, 1, 0, -123)' Wolfram -- https://mail.python.org/mailman/listinfo/python-list

RE: "Data blocks" syntax specification draft

2018-05-22 Thread Dan Strohl via Python-list
haracters. > > 2. Built-in indentation parsing parameter makes it more or > less natural continuation of Python blocks and is char-precise, > which is very important here. > > 3. Independent of the indent of containing block! > > 4. Parameter descriptor can be developed in such manner >that it allows more customisation and additions in the future. > I would not argue about this being in the spec, but it seems like a un-needed complexity. > > Does seem to be more generalized problem-solving here. > -- https://mail.python.org/mailman/listinfo/python-list

RE: "Data blocks" syntax specification draft

2018-05-23 Thread Dan Strohl via Python-list
s road, what about instead making another reserved word and approaching it like class or def, for example; datablock data: first line second line Then you can also add functions without "breaking" python approaches like: datablock data(foo, bar, blah): First line Second line (*having thrown this out, I don’t know the parser/compiler well enough to know if this would cause more problems or not). Being honest, I'm not sure that even these would be enough to get it added without a stronger case, but the further you stray from the python norms, the less likely it is to even get consideration. -- https://mail.python.org/mailman/listinfo/python-list

RE: Indented multi-line strings (was: "Data blocks" syntax specification draft)

2018-05-23 Thread Dan Strohl via Python-list
iters (and with consistent tabs/spaces). >This leading white space is ignored. > * All the leading white space beyond this 'left edge' is preserved. > * The newlines after the leading '''' and before the trailing '''' are >ignored, all the others preserved. (I thought about preserving the >trailing newline, but it is easier to add one than remove one.) > > hp > > These sound good to me. -- https://mail.python.org/mailman/listinfo/python-list

RE: Indented multi-line strings (was: "Data blocks" syntax specification draft)

2018-05-23 Thread Dan Strohl via Python-list
Or go with a different character (or set of characters) altogether... like $, \, ~, ^, < ? (good catch on it catching on ''''hello' I am not in this''', I forgot about that behavior) I'm not against a prefix character, just throwing out alternatives. (though, to me, the 'i' indicated int) -- https://mail.python.org/mailman/listinfo/python-list

Scripts not downloading Version 3.6.5

2018-05-24 Thread Chester Davies via Python-list
stall to no avail, and also attempted to do various repairs from the installer. How can I rectify this please? Kind regards, Chester -- https://mail.python.org/mailman/listinfo/python-list

Scripts not downloading Version 3.6.5

2018-05-24 Thread Chester Davies via Python-list
stall to no avail, and also attempted to do various repairs from the installer. How can I rectify this please? Kind regards, Chester -- https://mail.python.org/mailman/listinfo/python-list

RE: Indented multi-line strings (was: "Data blocks" syntax specification draft)

2018-05-31 Thread Dan Strohl via Python-list
re are more lines than iterations, the last iteration will be used for subsequent lines. This solves the problem in a very pythonic way, while allowing the flexibility to handle different needs. -- https://mail.python.org/mailman/listinfo/python-list

Override built in types... possible? or proposal.

2018-05-31 Thread Dan Strohl via Python-list
and would not be imported when that module was imported. Thoughts? Dan Strohl -- https://mail.python.org/mailman/listinfo/python-list

RE: Override built in types... possible? or proposal.

2018-05-31 Thread Dan Strohl via Python-list
nestly, I am not so locked into this that I would scream about it not working, but there have been times when it would have been helpful in the past, so I figured I would bring it up and see what others thought. Dan -- https://mail.python.org/mailman/listinfo/python-list

RE: Indented multi-line strings

2018-06-01 Thread Dan Strohl via Python-list
ndent or outdent, so this would clean up those pieces. So... how does one go about suggesting changes to the built in types? I could take a whack at the code for it, but my C skills are no where near what should probably be needed for something this close to the core of the language. I'm not sure if adding a couple of methods is a PEP type of thing. Dan Strohl -- https://mail.python.org/mailman/listinfo/python-list

RE: Indented multi-line strings

2018-06-01 Thread Dan Strohl via Python-list
of recent versions of Python, whereas a PyPI implementation > would work for everyone. Good point, so, basically, there already is a function for this built in textwrap.dedent() and textwrap.indent(), I would think (hope) that that would answer that question. -- https://mail.python.org/mailman/listinfo/python-list

RE: Indented multi-line strings

2018-06-04 Thread Dan Strohl via Python-list
ell be called a lot. Dan -- https://mail.python.org/mailman/listinfo/python-list

Help with 'site' package.

2018-06-04 Thread Erik Martinson via Python-list
al/lib/python3.6/site-packages ['/usr/local/lib/python3.6/dist-packages', '/usr/lib/python3/dist-packages', '/usr/lib/python3.6/dist-packages'] True Thanks, Erik "To error is human ... and to blame it on a computer is even more so." -- https://mail.python.org/mailman/listinfo/python-list

site package does not work

2018-06-05 Thread Erik Martinson via Python-list
al/lib/python3.6/site-packages ['/usr/local/lib/python3.6/dist-packages', '/usr/lib/python3/dist-packages', '/usr/lib/python3.6/dist-packages'] True Thanks, Erik -- https://mail.python.org/mailman/listinfo/python-list

Re: Valid encodings for a Python source file

2018-06-07 Thread Ben Finney via Python-list
| Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

ANN: A new version (0.4.3) of python-gnupg has been released. It contains a security-related change - please update to this version

2018-06-13 Thread Vinay Sajip via Python-list
ist/discussion group [4]). Enjoy! Cheers Vinay SajipRed Dove Consultants Ltd. [1] https://bitbucket.org/vinay.sajip/python-gnupg[2] https://pypi.python.org/pypi/python-gnupg/0.4.3[3] https://bitbucket.org/vinay.sajip/python-gnupg/issues[4] https://groups.google.com/forum/#!forum/python-gnupg[5] https://bitbucket.org/vinay.sajip/python-gnupg/downloads/[6] https://neopg.io/blog/gpg-signature-spoof/ -- https://mail.python.org/mailman/listinfo/python-list

Re: text mining

2018-06-16 Thread Brian Oney via Python-list
stion, you were >successful. Answers like these make me also want ask "questions" like those. Thank you. I hope he's drunk. -- https://mail.python.org/mailman/listinfo/python-list

ANN: Version 0.1.5 of sarge (a subprocess wrapper library) has been released.

2018-06-18 Thread Vinay Sajip via Python-list
#x27;s a lot more information, with examples, than I can put intothis post. You can install Sarge using "pip install sarge" to try it out. Theproject is hosted on BitBucket at https://bitbucket.org/vinay.sajip/sarge/ And you can leave feedback on the issue tracker there. I hope you find Sarge useful! Regards, Vinay Sajip -- https://mail.python.org/mailman/listinfo/python-list

RE: syntax difference (type hints)

2018-06-18 Thread Dan Strohl via Python-list
> -Original Message- > From: Python-list On > Behalf Of Schachner, Joseph > Sent: Monday, June 18, 2018 7:58 AM > To: Ed Kellett ; python-list@python.org > Subject: RE: syntax difference (type hints) > > EXTERNAL MAIL: python-list-bounces+d.strohl=f5@pytho

command line utility for cups

2018-06-20 Thread Brian Oney via Python-list
INTER -l') parser.parse_known_args(['-o', 'sides=one-sided', '-o', 'test=crap']) Namespace(options='test=crap', printer=None)) How should I deal with multiple options being fed into my script? Thanks! Cheers, Brian -- https://mail.python.org/mailman/listinfo/python-list

Re: command line utility for cups

2018-06-20 Thread Brian Oney via Python-list
Thanks Peter! That's pretty slick. I will get it working for sure now. Regards, Brian -- https://mail.python.org/mailman/listinfo/python-list

Re: command line utility for cups

2018-06-20 Thread Brian Oney via Python-list
lib. I have gotten bitten too often. -- https://mail.python.org/mailman/listinfo/python-list

Package directory question

2018-06-24 Thread Robert Latest via Python-list
. Any thoughts? Thanks robert -- https://mail.python.org/mailman/listinfo/python-list

Re: Package directory question

2018-06-25 Thread Robert Latest via Python-list
Ben Finney wrote: > Robert Latest via Python-list writes: > >> Because the main.py script needs to import the tables.py module from >> backend, I put this at the top if main.py: >> >>sys.path.append('../..') >>import jobwatch.backend.tables a

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Ben Finney via Python-list
ite" is a number”. -- \“That's the essence of science: Ask an impertinent question, | `\and you're on the way to the pertinent answer.” —Jacob | _o__) Bronowski, _The Ascent of Man_, 1973 | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list

openstack connection

2018-07-03 Thread jayshankar nair via Python-list
ng_types):            service = service_description.ServiceDescription(service)         # Register the proxy class with every known alias        for attr_name in service.all_types:            setattr(self, attr_name.replace('-', '_'), service)     def authorize(self):        """Authorize this Connection         .. note:: This method is optional. When an application makes a call                  to any OpenStack service, this method allows you to request                  a token manually before attempting to do anything else.         :returns: A string token.         :raises: :class:`~openstack.exceptions.HttpException` if the                 authorization fails due to reasons like the credentials                  provided are unable to be authorized or the `auth_type`                  argument is missing, etc.        """        try:            return self.session.get_token()        except keystoneauth1.exceptions.ClientException as e:            raise exceptions.raise_from_response(e.response) -- | | Virus-free. www.avast.com | -- https://mail.python.org/mailman/listinfo/python-list

Is there a nice way to switch between 2 different packages providing the same APIs?

2018-07-05 Thread Mark Summerfield via Python-list
eate a 'Qt.py' module that imports everything depending on the PYSIDE switch and that I then use in all the other .py files, something like this: from Qt.QtCore import Qt from Qt.QtGui import QIcon ... etc. But I'm just wondering if there's a nicer way to do all this? -- h

[OT] Bit twiddling homework

2018-07-19 Thread Brian Oney via Python-list
Dear Python-List, an old dog wants to learn some new tricks. Due to my contact with microcontrollers, I am learning C/C++. I am aware that this is the endearing, helpful, yet chatty python-list. Many of you are competent C-programmers. The allure of C is that I can play directly with memory

Re: [OT] Bit twiddling homework

2018-07-20 Thread Brian Oney via Python-list
On Fri, 2018-07-20 at 06:37 +, Steven D'Aprano wrote: > On Fri, 20 Jul 2018 08:25:04 +0200, Brian Oney via Python-list wrote: > > > PS: Can I twiddle bits in Python? > > Yes. > > These operators work on ints: > > bitwise AND: & > bitwise OR:

Re: [OT] Bit twiddling homework

2018-07-20 Thread Brian Oney via Python-list
On Fri, 2018-07-20 at 18:07 +0900, xffox wrote: > On Fri, Jul 20, 2018 at 08:25:04AM +0200, Brian Oney via Python-list wrote: > > Therefore, what book or learning course do you recommend? I imagine > > something that tours or skims > > the fundamentals of Boolean algebra a

Re: [OT] Bit twiddling homework

2018-07-20 Thread Brian Oney via Python-list
On Fri, 2018-07-20 at 10:38 -0400, Dennis Lee Bieber wrote: > On Fri, 20 Jul 2018 11:00:09 +0200, Brian Oney via Python-list > declaimed the following: > > > Are 16|1 and 16+1 internally the same operation (for integers)? > > For those integers the EFFECT/RESULT

Re: For next loops

2018-07-23 Thread Brian Oney via Python-list
What if ply != com in the first (0th) iteration?  It's better to have an 'else:'-statement in your case, I suppose. -- https://mail.python.org/mailman/listinfo/python-list

Re: Want to be a rockstar programmer?

2018-07-23 Thread Brian Oney via Python-list
meh, I'm more into 90s and 00s metal rock and punk rock. Oh well, I knew it wasn't meant to be. ;) -- https://mail.python.org/mailman/listinfo/python-list

Re: curses, ncurses or something else

2018-07-23 Thread Dale Marvin via Python-list
ut having to install another library. Ideas invited. You didn't tell us much about your application but for analysis and display I like Jupiter Notebook. Plus it's easy to add graphs etc. Dale -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Console Menu

2018-07-31 Thread Juraj Papic via Python-list
15:36 GMT-03:00 Jerry Hill : > On Tue, Jul 31, 2018 at 12:31 PM juraj.papic--- via Python-list > wrote: > > I will check the links thanks for that tips, is there any page where I > can see more examples? > > I like Doug Hellmann's Python Module of the Week site for in-d

Re: >< swap operator

2018-08-14 Thread Brian Oney via Python-list
anded for more. > > > > > a = 1 > > > > b = 2 > > > > c = "confusion" > > > > > > > > c, a, b = a, b, c > > > > print a > > 2 > > > > print b > > confusion > > > > print c > > 1 Indeed, that is elegant. It doesn't take a special knowledge of syntax, for good guessers. It also doesn't look like two male variables peeing on each others feet. -- https://mail.python.org/mailman/listinfo/python-list

RE: __init__ patterns

2018-08-30 Thread Dan Strohl via Python-list
e __init__ Dan > -Original Message----- > From: Python-list On > Behalf Of Tim > Sent: Thursday, August 30, 2018 6:01 AM > To: python-list@python.org > Subject: __init__ patterns > > EXTERNAL MAIL: python-list-bounces+d.strohl=f5@python.org > > I saw a thread on redd

Why emumerated list is empty on 2nd round of print?

2018-09-06 Thread Viet Nguyen via Python-list
>>> numList [2, 7, 22, 30, 1, 8] >>> aList = enumerate(numList) >>> for i,j in aList:print(i,j) 0 2 1 7 2 22 3 30 4 1 5 8 >>> for i,j in aList:print(i,j) >>> -- https://mail.python.org/mailman/listinfo/python-list

Re: Why emumerated list is empty on 2nd round of print?

2018-09-06 Thread Viet Nguyen via Python-list
On Thursday, September 6, 2018 at 10:34:19 AM UTC-7, Chris Angelico wrote: > On Fri, Sep 7, 2018 at 3:26 AM, Viet Nguyen via Python-list > wrote: > >>>> numList > > [2, 7, 22, 30, 1, 8] > > > >>>> aList = enumerate(numList) > > > >>&g

Re: Why emumerated list is empty on 2nd round of print?

2018-09-06 Thread Viet Nguyen via Python-list
ist2 > [(0, 2), (1, 5), (2, 22), (3, 30), (4, 1), (5, 8)] > >>> numList[3] = -12 > >>> aList2 > [(0, 2), (1, 5), (2, 22), (3, 30), (4, 1), (5, 8)] > >>> aList.__next__() > (2, 22) > >>> aList.__next__() > (3, -12) > >>> aLis

ModuleNotFoundError: No module named 'encodings'

2018-09-06 Thread Jason Qian via Python-list
stem codec ModuleNotFoundError: No module named 'encodings' Thanks for the help Jason -- https://mail.python.org/mailman/listinfo/python-list

Re: I need help to put the output from terminal in a csv file

2018-09-07 Thread Brian Oney via Python-list
;'' # help(json.loads) parsed = json.loads(output) if type(parsed) == dict: if type(parsed['error']) == dict: print("yay!") ``` HTH -- https://mail.python.org/mailman/listinfo/python-list

Re: ModuleNotFoundError: No module named 'encodings'

2018-09-07 Thread Jason Qian via Python-list
, Thomas Jollans wrote: > On 09/06/2018 09:46 PM, Jason Qian via Python-list wrote: > >> Hi >> >> Need some help. >> >> I have a C++ application that invokes Python. >> >> ... >> Py_SetPythonHome("python_path"); >> > > This

Re: "glob.glob('weirdness')" Any thoughts?

2018-09-10 Thread Max Zettlmeißl via Python-list
where. In this case they are not used as escape characters, which makes a lot of sense when considering that the directory separator in Windows is a backslash and additionally using backslashes as escape characters would lead to quite some confusion in this case. [1] https://docs.python.org/3/library/glob.html [2] https://docs.python.org/3/library/fnmatch.html -- https://mail.python.org/mailman/listinfo/python-list

Re: "glob.glob('weirdness')" Any thoughts?

2018-09-10 Thread Max Zettlmeißl via Python-list
./Testfile [[]*'). And in the negative case it would provide many false positives. (e.g. "Testfile [falacy]", "Testfile monty", "Testfile ]not quite" and so on) Even if you wanted to use that strange character class, which is not a good idea (as explained above), using "[[]coment]" would be better, since there is no reason to repeat a character. -- https://mail.python.org/mailman/listinfo/python-list

Re: "glob.glob('weirdness')" Any thoughts?

2018-09-10 Thread Max Zettlmeißl via Python-list
can't see how I came to that wrong conclusion. Your suggested "[][comment]" is exactly what I thought your "[[]comment]" to be and I can't explain to myself anymore how I came to that conclusion. There actually is glob.ecape [1] which escapes all the glob meta-characters in a path and does so exactly as in your example. (Since it is obviously the shortest and therefore in this case best way.) [1] https://docs.python.org/3/library/glob.html#glob.escape -- https://mail.python.org/mailman/listinfo/python-list

Re: Pretty printing dicts with compact=True

2018-09-11 Thread Max Zettlmeißl via Python-list
com/python/cpython/blob/e42b705188271da108de42b55d9344642170aa2b/Lib/pprint.py#L333 -- https://mail.python.org/mailman/listinfo/python-list

Re: Fumbling with emacs + elpy + flake8

2018-09-13 Thread Brian Oney via Python-list
s ~/.emacs.d emacs It may be a rabbit hole, but that adventure belongs to emacs, somehow. Cheers Brian -- https://mail.python.org/mailman/listinfo/python-list

Help on PyList 3.7.0

2018-09-13 Thread Jason Qian via Python-list
ady in the path ? So, If the path contains the newPath, I will not append the newpath. Thanks for help -- https://mail.python.org/mailman/listinfo/python-list

Re: how to convert this psuedo code to python

2018-09-14 Thread Max Zettlmeißl via Python-list
hile epsilon + 1 > 1: epsilon = epsilon / 2.0 epsilon = 2 * epsilon This will not work in Octave. But maybe it will help you in improving your understanding of the solution. -- https://mail.python.org/mailman/listinfo/python-list

Re: Help on PyList 3.7.0

2018-09-14 Thread Jason Qian via Python-list
Thanks a lot. On Thu, Sep 13, 2018 at 5:24 PM, MRAB wrote: > On 2018-09-13 21:50, Jason Qian via Python-list wrote: > >> Hey, >> >> Need some help on PyList. >> >> >> #get path >> PyObject *path = PyObject_GetAttrString(sys, &q

Re: help me in python plssss!!!!

2018-09-14 Thread Max Zettlmeißl via Python-list
it yourself and to present your approaches or at least ideas. Additionally, tu...@python.org seems to be more fitting for the rather basic level of the problems which you present. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python for System Verilog testbench

2018-09-14 Thread Dale Marvin via Python-list
ython scripting will help me to generate the testbench in SV for my DUT ? My confusion at this point is that most of all the literature I am reading suggests linguistic techniques. Any non-linguistic technique ? -- https://mail.python.org/mailman/listinfo/python-list Hi, Perhaps you should check artic

how to get string printed by PyErr_Print( )

2018-09-17 Thread Jason Qian via Python-list
/listinfo/python-list

What is not working with my "map" usage?

2018-09-21 Thread Viet Nguyen via Python-list
ist)) i = 2 BEFORE total = 0 AFTER total = 2 FINAL total = 2 i = 09 BEFORE total = 0 AFTER total = 9 FINAL total = 9 i = 49 BEFORE total = 0 AFTER total = 49 FINAL total = 49 [2, 9, 49] Thanks, Viet -- https://mail.python.org/mailman/listinfo/python-list

Re: What is not working with my "map" usage?

2018-09-21 Thread Brian Oney via Python-list
mon term: https://en.wikipedia.org/wiki/Map_%28higher-order_function%29?wprov=sfla1 HTH On September 21, 2018 11:29:41 PM GMT+02:00, Viet Nguyen via Python-list wrote: >Hi, > >I want to add up all of the list elements. But when I use the "map" >function, it didn't seem to work

Re: 2 Bugs: in Python 3 tutorial, and in bugs.python.org tracker registration system

2018-09-22 Thread Brian Oney via Python-list
That's one thing that confused me. Generators are supposed to be one-off iterators. Iterators, *I understood* as reusable iterables. -- https://mail.python.org/mailman/listinfo/python-list

Re: [OT] master/slave debate in Python

2018-09-26 Thread Brian Oney via Python-list
language? I hear they named it after a person's pretty snake. No? Okay. "I have a vewwy great fwiend in Wome called 'Biggus Dickus'" ... "Can I go now, sir?" -- https://mail.python.org/mailman/listinfo/python-list

Re: JPEGImage() hangs

2018-09-27 Thread Brian Oney via Python-list
Could you please try another tool like `convert'? E.g. $ convert 102_PANA/P1020466.JPG test.png What does that say? -- https://mail.python.org/mailman/listinfo/python-list

Re: So apparently I've been banned from this list

2018-09-30 Thread Max Zettlmeißl via Python-list
> instance for the purposes of transparency and openness. (I don't know if > this will show up on the mailing list or the newsgroup.) [...] > > Forwarded Message > Subject: Temporary Suspension > Date: Mon, 10 Sep 2018 07:09:04 -0700 > From: Ethan Furman

Re: How to change '\\' to '\'

2018-10-01 Thread Alister ware via Python-list
ith forward slashes, that > way, the printed version and the internal escaped version won't be > confusing to you. And besides, which is easier to read? > > This? > > "\\Borland\\Bcc55\\Include" > > Or this? > > "/Borland/Bcc55/Include" > > ??? > > Practicality Beats Purity -- 沾衣欲湿杏花雨,吹面不寒杨柳风。 -- 志南《绝句》 -- https://mail.python.org/mailman/listinfo/python-list

ANN: distlib 0.2.8 released on PyPI

2018-10-02 Thread Vinay Sajip via Python-list
tinfo/python-list

Question about Multi-processing

2018-10-02 Thread Anthony Flury via Python-list
Is the documentation wrong ? is something weird going on ? -- Anthony Flury *Email* : anthony.fl...@btinternet.com <mailto:anthony.fl...@btinternet.com> *Twitter* : @TonyFlury <https://twitter.com/TonyFlury/> -- https://mail.python.org/mailman/listinfo/python-list

Re: Program to find Primes of the form prime(n+2) * prime(n+1) - prime(n) +- 1.

2018-10-02 Thread Max Zettlmeißl via Python-list
as you start showing more effort yourself in the form of your honest attempts to create a program or at least in the form of some serious ideas, you might get replies which better fit what you attempted to receive. -- https://mail.python.org/mailman/listinfo/python-list

Help please installing Python on Windows 10

2018-10-03 Thread Timothy Cowell via Python-list
w of which first was white, and second was black, but I couldn't make them do anything. Could you please tell me what I'm doing wrong? Many thanks, Tim. -- https://mail.python.org/mailman/listinfo/python-list

Re: Observations on the List - "Be More Kind"

2018-10-06 Thread Anthony Flury via Python-list
as a response. Listen to Frank Turner's latest album: "Be More Kind".   That is not a plug to buy the album, but the title seems apposite - and the music is good. Regards Bruce Coram -- https://mail.python.org/mailman/listinfo/python-list

Encounter issues to install Python

2018-10-08 Thread Olivier Oussou via Python-list
Hi!I downloaded and installed python 3.6.4 (32-bit) on my computer but I have problems and can not access the python interface. I need your technical assistance to solve this matter.  Best regard! Olivier OUSSOUMedical entomologist, Benin -- https://mail.python.org/mailman/listinfo/python-list

Re: Encounter issues to install Python

2018-10-13 Thread Anthony Flury via Python-list
installation - if any ? * What interface are you trying to access, and how are you doing that ? * Do you get error messages? Unless you tell us what the problem is we can't possibly help. On 08/10/18 20:21, Olivier Oussou via Python-list wrote: Hi!I downloaded and installed python 3.6.4 (3

Re: ESR "Waning of Python" post

2018-10-16 Thread Brian Oney via Python-list
gabytes. > That's a pretty good stress test for any program, especially one with so much human interaction. -- https://mail.python.org/mailman/listinfo/python-list

email automation

2018-10-22 Thread Brian Oney via Python-list
and kicking, a bit overkill for my use-case); 2. build on the examples in 'Automate the boring stuff'; 3. forget about it. Please tell me about any possible alternatives I missed. Kind regards, Brian -- https://mail.python.org/mailman/listinfo/python-list

Re: Accessing clipboard through software built on Python

2018-10-28 Thread Brian Oney via Python-list
> >Highlight >Ctl-C > >In Python: > >TEXT1 = clipboard.paste() > >Highlight again > >TEXT2 = clipboard.paste() > >X actually has several clipboard buffers and it can be tricky to get >this going. I don't recall, >but either clipboard or pyperclip have a way to get to them all IIRC >... > >HTH, >-Tim > >-- >https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list

Re: regular expression problem

2018-10-28 Thread Brian Oney via Python-list
consider: >>> t = t*2 >>> t '' >>> re.findall('\$<+([^:]+)::([^:]+)::([^:]+)>+\$', t) [('name', 'options', 'range'), ('name', 'options', 'range')] HTH -- https://mail.python.org/mailman/listinfo/python-list

zenity substitution

2018-10-28 Thread listo factor via Python-list
e an equivalent facility in Python 3? If so, what is it? TIA -- https://mail.python.org/mailman/listinfo/python-list

[ANN] maildog, Re: email automation

2018-10-30 Thread Brian Oney via Python-list
s for me. If I have piqued your interest, have a look at https://github.com/oneyb/maildog/ Thank you for the tips. Kind regards Brian -- https://mail.python.org/mailman/listinfo/python-list

Simple, fast responsive, secure way of creating REST services

2016-03-29 Thread David Shi via Python-list
://mail.python.org/mailman/listinfo/python-list

Re: Suggestion: make sequence and map interfaces more similar

2016-03-29 Thread Marco Sulla via Python-list
) method, like sequence types"? Since simply adding get(), items(), keys(), values() to existing sequence interface will likely break existing code, I would try also to write new sequence types, using a common interface with maps. This is my idea. -- https://mail.python.org/mailman/listinfo/python-list

IPython and Jupyter

2016-03-29 Thread David Shi via Python-list
I can switch between the twowhenever required. Regards. David -- https://mail.python.org/mailman/listinfo/python-list

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Mark Lawrence via Python-list
On 29/03/2016 23:29, Marco Sulla via Python-list wrote: Let me add that an items() and keys() for sequences will be also useful for day-by-day programming, since they will be a shortcut for enumerate(seq) and range(len(seq)) I cannot remember the last time I needed range(len(seq)) so I don&#

Adding borders to ttk radiobuttons

2016-03-30 Thread Mark Lawrence via Python-list
s :( What have I missed? Python 3.5.1 on Windows 10. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

Re: Instalação

2016-03-30 Thread Mark Lawrence via Python-list
creasingly rare. Grab 3.5.1 from here https://www.python.org/downloads/ -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

Re: Adding borders to ttk radiobuttons

2016-03-30 Thread Mark Lawrence via Python-list
;Radiobutton.label', {'sticky': 'nswe'})]})], 'sticky': 'nswe'})] That's as may be, but from Table 56 "ttk Radiobutton options not in ttk.Radiobutton" here http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/ttk-Radiobutton.html it says "borderwidth or bd - Configure this option using a style." -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

Re: Adding borders to ttk radiobuttons

2016-03-30 Thread Mark Lawrence via Python-list
, {'side': 'left', 'sticky': '', 'children': [('Radiobutton.label', {'sticky': 'nswe'})]})], 'sticky': 'nswe'})] for more help: http://www.tkdocs.com/tutorial/styles.html For this particular problem not of much use, or I wouldn't be asking :( -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Marco Sulla via Python-list
ible", then he can do so. But to make all dicts and lists behave in > this "terrible" and "strange" way is a terrible idea. You did not understand well what I mean, my dear friend. I applied the word "terrible" to my code, not to the concept. You've demonstrated that a fair thinker, so do not fall in the temptation to play with words. -- https://mail.python.org/mailman/listinfo/python-list

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Marco Sulla via Python-list
python.org/mailman/listinfo/python-list

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Mark Lawrence via Python-list
On 30/03/2016 20:35, Marco Sulla via Python-list wrote: On 30 March 2016 at 02:55, Terry Reedy wrote: To me [seq.items() and seq.keys()] are useless and confusing duplications since enumerate()(seq) and range(len(seq)) are quite different from dict.items and dict.keys. It's true. I

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Mark Lawrence via Python-list
On 30/03/2016 21:00, Marco Sulla via Python-list wrote: Let me also add that even if it seems that my idea will not break any official contracts, I can create a new ABC class and let maps and sequence types inherit from it. IMHO it's absolutely not needed, but at least the discussion will

Re: Adding borders to ttk radiobuttons

2016-03-30 Thread Mark Lawrence via Python-list
ython-tkinter-discuss/3373/ ? -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Array

2016-03-30 Thread Mark Lawrence via Python-list
On 31/03/2016 06:34, tdspe...@gmail.com wrote: I am creating the following aData = [] This is a Python list, not an array as the subject gives. # get my data from database for row in rows: aData.append({row["tierid"]:"name":row["tiername"],"descri

Which plugin allows quick creation of secure REST services?

2016-03-31 Thread David Shi via Python-list
Hello,  Which plugin allows quick creation of secure REST services?  so that Python scripts can be attached to it. Regards. David -- https://mail.python.org/mailman/listinfo/python-list

Re: Suggestion: make sequence and map interfaces more similar

2016-03-31 Thread Marco Sulla via Python-list
uences and maps, apart the fact they are all iterables. -- https://mail.python.org/mailman/listinfo/python-list

Re: Suggestion: make sequence and map interfaces more similar

2016-03-31 Thread Mark Lawrence via Python-list
On 31/03/2016 12:58, Marco Sulla via Python-list wrote: On 31 March 2016 at 04:40, Steven D'Aprano wrote: Enough of the hypothetical arguments about what one could do or might do. Let's see a concrete example of actual real world code used in production, not a mickey-mouse toy prog

Re: Suggestion: make sequence and map interfaces more similar

2016-03-31 Thread Marco Sulla via Python-list
uences, so it's much more natural to make map iteration over values by default, as for sequences. This is why I proposed a vdict. On 31 March 2016 at 14:30, Mark Lawrence via Python-list wrote: > Note that dict also supports > __getitem__() and __len__(), but is considered a mapping ra

Re: Suggestion: make sequence and map interfaces more similar

2016-03-31 Thread Mark Lawrence via Python-list
On 31/03/2016 13:49, Marco Sulla via Python-list wrote: On 31 March 2016 at 14:30, Mark Lawrence via Python-list wrote: Note that dict also supports __getitem__() and __len__(), but is considered a mapping rather than a sequence because the lookups use arbitrary immutable keys rather than

Re: Suggestion: make sequence and map interfaces more similar

2016-03-31 Thread Mark Lawrence via Python-list
r you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

Re: Suggestion: make sequence and map interfaces more similar

2016-03-31 Thread Mark Lawrence via Python-list
On 31/03/2016 14:27, Random832 wrote: On Thu, Mar 31, 2016, at 09:17, Mark Lawrence via Python-list wrote: On 31/03/2016 14:08, Antoon Pardon wrote: Op 31-03-16 om 13:57 schreef Chris Angelico: Okay. I'll put a slightly different position: Prove that your proposal is worth discussi

Re: Suggestion: make sequence and map interfaces more similar

2016-04-01 Thread Mark Lawrence via Python-list
On 01/04/2016 08:59, Antoon Pardon wrote: Op 31-03-16 om 16:12 schreef Mark Lawrence via Python-list: On 31/03/2016 14:27, Random832 wrote: So can we discuss how a unified method to get a set of all valid subscripts (and/or subscript-value pairs) on an object would be a useful thing to have

Re: The next major Python version will be Python 8

2016-04-01 Thread Gisle Vanem via Python-list
n-ubuntu-on-windows-10/ they say Python inside Ubuntu-in-Windows works! Ref. time 03:03. -- --gv -- https://mail.python.org/mailman/listinfo/python-list

Re: Drowning in a teacup?

2016-04-01 Thread Mark Lawrence via Python-list
. I would suggest that you search the archives, but that would upset teacher, so I won't. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

Re: [beginner] What's wrong?

2016-04-01 Thread Mark Lawrence via Python-list
language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

<    28   29   30   31   32   33   34   35   36   37   >