New submission from Leon Mintz :
Could typing.Literal (or analogous) accept a regex pattern to match against?
For example, if I want a duration string,
duration: str # allowed syntax: 3s, 3m, 3h etc.
vs
duration: LiteralPattern['[0-9]+[smh]']
--
messages: 399787
nosy: leon.mintz
Leon Hampton added the comment:
Matthew Barnett & SilentGhost,
Thank you for your prompt responses. (Really prompt. Amazing!)
SilentGhost,
Regarding your response, I used re.search, not re.match. When I used re.match,
the regex failed. When I used re.search, it matched.
Here are my t
Leon Hampton added the comment:
Hello,
There may be a bug in the implementation of the Conditional Construction of
Regular Expressions, namely the (?(id/name)yes-pattern|no-pattern).
In the Regular Expression documentation
(https://docs.python.org/3.7/library/re.html), in the portion about
New submission from Leon Hampton :
Hello,
In the 3.7.7 documentation on Regular Expression, the Conditional Construct,
(?(id/name)yes-pattern|no-pattern), is discussed. (This is a very thorough
document, by the way. Good job!)
One example given for the Conditional Construct does not work
New submission from Leon Matthews :
In the code sample documentation for other modules we show the necessary
imports, we should do the same for dataclasses.
For example, the very first example uses the `dataclass` decorator without
importing it first. It should read::
from dataclasses
New submission from Leon H. :
Current BASIC_FORMAT:
BASIC_FORMAT = "%(levelname)s:%(name)s:%(message)s"
The first thing people do is set the format to
'%(asctime)s:%(levelname)s:%(name)s:%(message)s' or like after importing
logging module.
Could we put the '%(asctime)s' into t
Leon Avery added the comment:
The POSIX guideline suggests that -- should be available as an option argument.
One should be able to say "command --opt --" in order to make '--' the value of
the '--opt' option.
> There are some known problems with this '--', specially when t
Lisabel Leon added the comment:
Thank you Zachary for such a speedy response.
I'll paste text next time.
Rgds!
Lisabel
On Tue, Jul 25, 2017 at 11:56 AM, Zachary Ware <rep...@bugs.python.org>
wrote:
>
> Zachary Ware added the comment:
>
> Take a look at the statement imm
New submission from Lisabel Leon:
The first example of this section shows different results if typed into the
Python interpreter. This is the documentation (documentation.png) and these
are the results as I type it into my environment (testresults.jpg).
--
assignee: docs@python
New submission from Leon Avery:
In the argparse module, the argument '--' is interpreted as a signal that
everything after it is a positional argument. '--' is literally written into
the argparse code, in _parse_known_args. This means that a user who wishes to
use '--' in some other way
New submission from Leon Helwerda:
The logging HTTPHandler sends two Host headers which confuses certain servers.
Tested versions:
Python 3.6.1
lighttpd/1.4.45
Steps to reproduce (MWE):
1) Set up a lighttpd server which is to act as the logging host (we do not
actually implement anything
Leon Weber added the comment:
I noticed an inconsistency between IPv4 and IPv6 in my temporary variable names
when looking at the patch again after a few days. Here’s an updated patch. Not
that it’s important, but I sleep better that way :)
As consensus seems to have settled on leaving out
Leon Weber added the comment:
I’ve changed the wording in the documentation a bit and added an explanatory
sentence, how about this?
I think this should make pretty clear what it does and does not, and also easy
to find in the documentation when searching for “reverse”, “PTR” and “pointer
Leon Weber added the comment:
As for what the host command does, it doesn't add any trailing dots
here:
Oh, interesting. It does on Fedora 19 with version 9.9.3, but not on my Ubuntu
installation with version 9.8.1. So it seems this was added between 9.8.1 and
9.9.3
Leon Weber added the comment:
According to apt-cache, the version I tried with is
1:9.9.3.dfsg.P2-4ubuntu1
Ok, then it depends on something else apparently. It’s not so relevant anyway
because even with the trailing dot, “host” is inconsistent between IPv4 and
IPv6, and we should choose
Leon Weber added the comment:
I can live without the trailing dot, although I’d find it “more correct” to
have it.
I’ve attached an alternative patch that doesn’t return a trailing dot, it’s up
to you guys to decide which one you prefer.
--
Added file:
http://bugs.python.org
New submission from Leon Weber:
I was missing a method to compute the reverse DNS name for an IP address, and I
felt this is something that would belong in the ipaddress module; so here’s a
patch for the ipaddress module adding a reverse_name property to IPv?Address.
This is an example
Leon Weber added the comment:
Thanks for the feedback, I agree reverse_pointer is a better, less ambiguous
name for the property. I’ve amended the patch to reflect this suggestion.
Regarding the trailing dot, I felt it more appropriate to have it that to leave
it out, but I don’t have
Leon Weber added the comment:
Oh nice, then fewer trees have to die. I’ve now signed the contributor’s
agreement.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20480
New submission from leon zheng:
build with prefix point to a arbitrary path, can't find the dynamic lib,
and libffi upstream bug:
./configure --prefix=xxx --enable-shared --enable-ipv6 --with-threads CC=clang
--
components: Build
files: mywork.pitch
messages: 187838
nosy: matrixsystem
Leon Maurer added the comment:
That's a good idea; I'll shoot them a message.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16941
Leon Maurer added the comment:
Well, it looks like the problem is known and can't be fixed:
http://mail.python.org/pipermail/tkinter-discuss/2013-January/003343.html
Oh well.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Leon Maurer added the comment:
It seems to depend on what you're doing. Plus, the delay I needed turned an
already slow animation in to a slide show.
In this case, a better fix seems to be sticking a root.update() right before
the root.after. Then it works with no delay. However, apparently
Leon Maurer added the comment:
Thanks for the update. IDLE does indeed work for me now.
Unfortunately, the program I was trying to get working under OS X still has
lots of problems. At least it doesn't crash due to copy and paste anymore
New submission from Leon Maurer:
I'm running in to a problem where TkInter won't update the display on OS X.
I've attached a simple piece of code that has this problem, and I've also made
a short screen-cast of the problem:
https://mywebspace.wisc.edu/lnmaurer/web/updatebug/updatebug.mov
New submission from Leon Maurer:
I'm getting crashes with IDLE like those that have been reported before (e.g.
by trying to copy using Command-C), but I followed (or at least tried to
follow) the directions at
http://www.python.org/getit/mac/tcltk/
and have installed Python 2.7.3 64-bit/32
Leon Maurer added the comment:
Thanks for the quick response. I don't have access to an older version of
ActiveTcl, but in truth, I'm mostly relieved that it's not just me. (I spent a
long time trying to figure out why some Tkinter code I had written would work
on Linux and Windows but not OS
Changes by Leon Zhang leozh...@cisco.com:
Removed file: http://bugs.python.org/file26015/pygen.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15076
Leon Zhang leozh...@cisco.com added the comment:
No people help me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15076
___
___
Python-bugs
Leon Zhang leozh...@cisco.com added the comment:
Thank ramchandra.apte for the help.
I checked linecache.py, and the file exists. Unfortunately I don't have root
perssion to re-install Python. I also checked another bug
http://bugs.python.org/issue10496;, I think that may be the truth
New submission from Leon Zhang leozh...@cisco.com:
Hello Experts,
I am using Python 2.6.2 on a Linux machine. I found sometimes I have problem to
run my simple python script.
Linux version and Python version
leonz@fxcsgbu2c1% uname -a
SunOS fxcsgbu2c1 5.8 Generic_117350-06
Leon Matthews pyt...@lost.co.nz added the comment:
Thank you Éric and Ezio. I'll produce a patch to convert the javadoc to
docstrings this week, then submit it here.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14006
Leon Matthews l...@lost.co.nz added the comment:
The ElementTree.py module has good JavaDoc-style function-level documentation,
but as it's not in docstring format, it can't be seen from the interactive help.
I'd be willing to convert the current comments into docstrings, as long as I
New submission from Leon Matthews l...@lost.co.nz:
The lxml implementation of the ElementTree API puts a `sourceline` property
onto every Element object, which I recently found useful when producing
diagnostic messages. I think it would be a useful improvement to make the
standard library's
Alex Leon ael...@gmail.com added the comment:
It could have a 2 phase regex match. We match the first one, and if it fails,
match the second and produce a warning.
I think producing a warning is a good idea, as it allows the programmer to know
that the implementation of basic auth
Alex Leon ael...@gmail.com added the comment:
For some reason a caret went missing in the regex fix.
It should read
'realm=([\']?)([^\']*)\\2', re.I)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12541
New submission from Alex Leon ael...@gmail.com:
It looks like some servers using basic authentication don't include quotes
around the realm (example https://api.connect2field.com) as required by rfc
2617. urllib wont handle these requests and silently fails, but a simple change
to the regex
Matthew Leon Grinshpun vertesp...@gmail.com added the comment:
I should be able to do this in November. For the moment I'm a bit busy.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6407
Hi,
I would like to run an external program, and discard anything written
to stderr during its execution, capturing only stdout. My code
currently looks like:
def blaheta_tag(filename):
blaheta_dir = '/home/leon/signal_annotation/parsers/blaheta/'
process = subprocess.Popen
Hi, there,
I'm trying to read the source code of python.
I read around, and am kind of lost, so where to start?
Any comments are welcomed, thanks in advance.
--
http://mail.python.org/mailman/listinfo/python-list
Changes by Leon Matthews l...@lost.co.nz:
--
nosy: +leonov
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6715
___
___
Python-bugs-list mailing
Changes by Leon Matthews l...@lost.co.nz:
--
title: SpooledTemporaryFile operates differently to TemporaryFile -
SpooledTemporaryFile Cleanups
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6541
Changes by Leon Matthews l...@lost.co.nz:
--
title: SpooledTemporaryFile Cleanups - SpooledTemporaryFile cleanups
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6541
New submission from Leon Matthews l...@lost.co.nz:
According the docs for the tempfile module, SpooledTemporaryFile()
should operate exactly as TemporaryFile() does. However, while
playing around trying to learn the module I found a couple of places
where this is not the case:
import tempfile
New submission from Matthew Leon Grinshpun vertesp...@gmail.com:
Multiprocessing's Pool class __init__ method is written in a way that
makes it very difficult for a subclass to modify self._taskqueue. There
are very good reasons for wanting to do this - ie, making the taskqueue
block when
Matthew Leon Grinshpun vertesp...@gmail.com added the comment:
I have attached a patch. All I did was shift the one line from __init__
to _setup_queues.
That's it.
You could take advantage of the change in the following way:
class BlockingPool(pool.Pool):
def _setup_queues(self
I think there are two advantages over java for GUI application
First, python is more productive and has very rich third modules
support,
you can check the demo of wxPython.
Second, you can develop native-looking GUI
BTW: I'm developing GUI application using python and wxPython.
Second,
On
One way, define the object before it is used,
like this:
object = None
.
.
if object is not None:
object.method()
The other way, using try ... catch
try:
object.method()
catch NameError:
pass
for big programs, which is better, or any other way?
Miles
--
On May 5, 3:25 am, Marco Mariani ma...@sferacarta.com wrote:
Leon wrote:
One way, define the object before it is used,
like this:
object = None
This is a good practice anyway. Conditional existance of objects is
quite evil. Resorting to if defined('foo') is double-plus-ugly
Petr,
I am not an expert, but why not to use time.sleep(5)?
If you are using wxPython, you may also try wx.Timer, in which you could set
its interval.
Good luck!
Leon
On Tue, Oct 7, 2008 at 2:07 AM, Petr Jakes [EMAIL PROTECTED] wrote:
I have infinitive loop running script and I would like
Maybe you need to close the socket somewhere else, rather than to close it
when you receive the your response.
On Tue, Sep 30, 2008 at 7:01 AM, Ali Hamad [EMAIL PROTECTED] wrote:
Hello All :
A socket question from a networking newbie. I need to create
a server that:
1) receive a message
On 11 ago, 04:34, SPE - Stani's Python Editor
[EMAIL PROTECTED] wrote:
On 10 aug, 20:42, [EMAIL PROTECTED] wrote:
Hello,
I've installed Eclipse, Python 2.5 and wxPython on Ubuntu 8.04. The
problem is that I can't get code completion for wx module. I don't
know if it occurs the same
Hello,
I've installed Eclipse, Python 2.5 and wxPython on Ubuntu 8.04. The
problem is that I can't get code completion for wx module. I don't
know if it occurs the same with other libraries outside the python
core.
If I compile/run my code containing the wx library, I get an
application running
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import string, sys
from threading import Thread
import os
import time
class test_pipe(Thread):
def __init__(self, fd):
Thread.__init__(self)
self.testfd = fd
def run(self):
print started thread begin -
: the initial 2.6 target is for April 2008
Great !
But I found nothing about Tk 8.5 ?
Leon
--
http://mail.python.org/mailman/listinfo/python-list
version of TK[inter] included in the last version of Python
(2.5.1) ?
Can you give me informations (or links, etc...) about this three
questions ?
Thanx in advance !!!
Leon
--
http://mail.python.org/mailman/listinfo/python-list
Hi everybody,
I am a beginer for Python, hope can get help from you guys.
What I want to do is :
Input an ID - find the ID in the file - copy the whole string str
id='xxx'y/str
stringID = str(raw_input('Enter the string ID : '))
file = open('strings.txt')
sourcefile = file.read()
a newspaper on the screen. Text processing is very new to me, any
ideas on how I could achieve a multi-columned text formatter. Are there
any libraries that already do this?
Thanks and happy holidays!
Leon
--
http://mail.python.org/mailman/listinfo/python-list
be
forever grateful.
Thanks,
Leon
--
http://mail.python.org/mailman/listinfo/python-list
like the processing language -
http://www.processing.org/reference/index.html). The closest thing I
could find was devachan - http://www.cesaremarilungo.com/sw/devachan/,
but its very limited. Any response would be greatly appreciated.
Thanks
Leon
--
http://mail.python.org/mailman/listinfo/python
Thanks guys!, Ill look into your suggestions. I'm actually currently
working directly with pyOpenGL, but hopefully Ill find something that
would make me more efficient. I might end up writing a library myself.
--
http://mail.python.org/mailman/listinfo/python-list
Hi Kevin,
You may notice that, for matching the regex (0|(1(01*0)*1))*, the left
most
three characters of a string must not be ``101 while not followed by
an `0'.
After reading the first `1', automata expects `1' or ``00 or ``010
or ``11,
right?:)
Kevin CH 寫道:
Hi,
I'm currently running
You are right. In fact the procedure is as follows:
The substr ``101101 is no problem, if stop here, match will
successful.
But the tailing `1' occurs, so we may imagine the working automata move
to a state, which according to the regexp's outer most `)', and ready
to repeat
the whole regexp
example:
s = ' ' --- nbsp;
--
http://mail.python.org/mailman/listinfo/python-list
64 matches
Mail list logo