ts someone from tampering with
>FP> the sequence number without being detected.
Of course. But with the originators manually sending the requests by email
(at least that's how I understood it), this may be a nuisance.
--
Piet van Oostrum <[EMAIL PROTECTED]>
URL: http://www.cs.
threads was done properly, it would
swallow up all available threads for one port_number, rather than starting
one thread per port_number. And it doesn't handle the case when the threads
are exhausted: it should wait until a thread becomes available before
continuing.
--
Piet van Oostrum <
bers. The latter approach would be simpler IMO.
You may also have to take into account if your OS allows a maximum number
of open sockets for a process.
--
Piet van Oostrum <[EMAIL PROTECTED]>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: [EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
uot;command", execution blocks until I kill the called script. Is
>T> there a way around this??
Use the subprocess module. If you have an older python, you could use
os.system(command + "&") or install the subprocess module yourself.
--
Piet van Oostrum <[EMAIL PRO
ght.
You can post a signal to the main thread, however, to catch the exception:
def TimeoutHandler():
print '!'
os.kill(0, signal.SIGUSR1)
def handler():
raise Exception
class Active:
def __init__(self):
signal.signal(signal.SIGUSR1, handler)
timer = Ti
Please don't post the same question twice with different subjects.
--
Piet van Oostrum <[EMAIL PROTECTED]>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: [EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
me ISP's smtp server and my
work's smtp server (but only if I am at the proper location).
--
Piet van Oostrum <[EMAIL PROTECTED]>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: [EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
inter.py", line 38, in ?
>MT> import _tkinter # If this fails your Python may not be configured for
>MT> Tk
>MT> ImportError: No module named _tkinter
>MT> I have looked everywhere on the net, and can't figure out how to configure
>MT> python so
>>>>> [EMAIL PROTECTED] (Sean McIlroy) (SM) wrote:
>SM> Can anybody help me make sense of the fact that the following script
>SM> doesn't work? It's so simple I can't imagine what I'm missing. Any
>SM> help will be much appreciated.
Wha
dnowism.
>DBR> It could be that he means that creating PDFs on windows is done using
>DBR> a fake printer that will produce the pdf when being printed to - and
>DBR> that fake printer is implemented as a driver.
But that is about creating a PDF file, whereas the OP was speaking abou
ge reference manual rather than reading in detail.) So, yes,
> they're O(n) operations. Thanks for hunting that down.
>
> ChrisA
It would be so much better to use the Flexible String Representation.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
t helped a bit these would have been done in a couple of hours.
How could anyone have known that this was the problem? AFIAK you didn't even
tell about the VPS. And moreover this wasn't a Python problem, so off topic
here.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
of 1 sec s.settimeout() call after the send call but it
> doesnot help.
>
> I tried by commenting s.close() still it did not work.
>
> Any idea what is the problem?
Length(reply) == 0 means that the other side closed the socket without sending
anything back.
--
Piet van Oostr
";"+r1
>
> f=open("test.txt","r")
> conten = f.read()
> print conten
> f.close()
>
> #f=open("test.txt","a")
> #f.write(infos)
> #f.write('\n')
> #f.close()
>
>
> thank you =)
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
r
information with it also (and then it would be partly a Django problem
because you would get the user id from Django).
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
utc from the doc and use
that:
from datetime import tzinfo, timedelta, datetime
ZERO = timedelta(0)
class UTC(tzinfo):
"""UTC"""
def utcoffset(self, dt):
return ZERO
def tzname(self, dt):
return "UTC"
def dst(self, dt):
; elegant solution (for text: Unicode; for time zones: twelve simple,
>> static zones that never change)
>
> Twelve or twenty-four? Or are you thinking we should all be an even
> number of hours away from UTC, which would also work?
Even 24 doesn't take into account DST.
--
Pie
Chris Angelico writes:
> On Fri, Jan 10, 2014 at 1:06 AM, Piet van Oostrum wrote:
>> Chris Angelico writes:
>>
>>> On Thu, Jan 9, 2014 at 2:34 PM, Ben Finney
>>> wrote:
>>>> With time zones, as with text encodings, there is a single technically
narrow-minded and Unicode
> illiterate. They are neither of these things.
>
> Continuing to post these comments with no interest in learning is rude.
> Other recent threads have contained details rebuttals of your views,
> which you have ignored. This is rude. Please stop.
Please ign
Ian Kelly writes:
> I suggest defining x as a normal function and writing the assignment
> as "Foo.x = staticmethod(x)" to keep x callable from the global
> namespace. Or just del it after doing the monkey patch.
You can use Foo.x = staticmethod(lambda: 2)
--
Piet van
t.
m4_treap.m4 contains this instruction twice:
ifdef(/*pyx*/,cp)if current is None:
ifdef(/*pyx*/,cp)raise KeyError
Which when generating pyx_treap.pyx (with *pyx* defined) expands to the
syntactically incorrect
cpif current is None:
cpraise KeyError
--
P
Travis Griggs writes:
> Personally, I wish they’d start python4, sure would take the heat out of
> the 3 vs 2 debates. And maybe there’d be a program called twentyfour as
> a result.
twelve would be sufficient, I would think.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com
_, mn, dy, _, _, _, wd, _, _ in [localtime(then)]]
Python misses a 'where' or 'let'-like construction as in Haskell.
Anybody has a more elegant solution?
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
Rustom Mody writes:
> On Saturday, January 18, 2014 4:49:55 AM UTC+5:30, Piet van Oostrum wrote:
[...]
>
>> Python misses a 'where' or 'let'-like construction as in Haskell.
>
> +1
> Yes Ive often been bitten by the lack of a 'comprehension-let
Alain Ketterlin writes:
> Piet van Oostrum writes:
> [...]
>> Python misses a 'where' or 'let'-like construction as in Haskell.
>
> "let x = v in e" really is (lambda x:e)(v)
>
You are right, but it is a lot less readable IMHO.
--
Piet v
where (sic!) the last part means as much as
where _, mn, dy, _, _, _, wd, _, _ = localtime(then)
I find the list comprehension preferable because it makes it more clear
that a new list is constructed from an existing list, something that is
not as immediately clear with the append construction.
of
a sequence/iterator. There is no way to bind the name(s) to a single
object other than putting that object in a one element sequence. I was
just looking for a way to avoid that. Functional programming languages
have a way to do this with the 'let' or 'where' construction
wxjmfa...@gmail.com writes:
> In fact, Python just becomes the last tool I (would)
> recommend, especially for non-ascii users.
>
> jmf
In fact, Python 3 is one of the best programming tools for non-ASCII users.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE
xtract an element of a list use indexing, like mylist[0].
If you don't know these things or can't find this out yourself, you have a
serious lack of knowledge about Python, or maybe about programming, and it is
time to learn that first.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
der.com
>
I seriously think jmf has a mental disorder. So these reactions won't do
anything useful. Just ignore.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
Vinay Sajip writes:
> A new version of the Python module which wraps GnuPG has been
> released.
>
There seem to be 2 gnupg modules for Python. The other one has version number
1.2.5. Very confusing!
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
t of it; but
> we already have it built in :-)
There is a use case for a singleton class: when creating the singleton
object takes considerable resources and you don't need it always in your
program.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
me, mimetype, body))
return
and then use it like:
form.add_fake_file('file', 'test1.txt', 'This is a test.')
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
http://mail.python.org/mailman/listinfo/python-list
text. I use Komodo IDE when i want an IDE functionality,
> and never restart Komodo, over hours of work.
>
IPython's IDE just works the way alex23 described.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
http://mail.python.org/mailman/listinfo/python-list
srcnode.find_previous_sibling('div').string
print("Date: {0}".format(date))
print("Source: {0}".format(source))
cont = srcnode.find_next_siblings('p', class_='articleParagraph
enarticleParagraph')
contents = '\n'.join([c.get_text() for c in cont])
print("Contents: {0}".format(contents))
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
http://mail.python.org/mailman/listinfo/python-list
;])
print url
html = urlopen(url).read()
fn = generate_filename(url)
with open(fn, 'wb') as outfile:
outfile.write(html)
####
You should add a more intelligent filename generator, filter out mail:
urls and possibly others and add
expressions, so this helps. We don't
have to emulate booleans and conditions with weird lambda expressions.
In Python's lambda expressions you can not use statements, only
expressions, so without conditional expressiosn Python's booleans
wouldn't be very useful.
The rema
nside a lambda expression,
so this makes all this even nicer.
--
[1] http://en.wikipedia.org/wiki/Fixed-point_combinator#Y_combinator
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
http://mail.python.org/mailman/listinfo/python-list
address) and certain Microsoft programs use that to display as
the From address instead of the real From address. It's against the
rules, but then, Microsoft makes its own rules and who is going to stop
them?
And maybe there are other mail programs that do the same. AFAIK there is
no way to get rid of that Sender line.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
s an error in the transmission, error messages should go to
Charles.
At least that is what the RFC's say. And I think that is the logical way
to do it. Now some Microsoft mail programs will send replies to Charles,
which is incorrect.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP
,
SUBJECT ) + MESSAGE + "\r\n"
You could even change that to:
MESSAGE = "From: %s\r\n" + "To: %s\r\n" + "Subject: %s\r\n\r\n%s\r\n" % (FROM,
TO, SUBJECT, MESSAGE)
which I think is nicer.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
he sent email, as this is something
Gmail automatically provides. Maybe as some kind of spam detector, which
is reasonable. Actually providing the Sender in situations like this is
what the RFC requires, so Gmail is totally, completely correct in doing
this. The problem is completely on the rec
, let it show all headers. Or if you don't
trust that, just let the mail be sent to me. I can see exactly how it is.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
Piet van Oostrum writes:
> Ferrous Cranus writes:
>
>> I this hoq you mean?
> [...]
>>
>> SUBJECT = u"Mail από τον επισκέπτη: ( %s )" % FROM
>>
>> MESSAGE = &qu
. Comments begin at any #
> character that is not inside a string (something inside ' or " pairs).
You could consider this a kind of nested comment :)
# if condition:
# # calculate the amount
# amount = sum(parts)
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DA
# send the mail
> server.sendmail( MESSAGE )
>
> both fail.
The first thing you should do then is to look up the documentation of
sendmail. http://docs.python.org/ has a good index where you can look
for sendmail.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE14
t all ticks are deliverd. In my system, only one tick
per thread, and then it disappears. I have no idea if this is a bug. I
certainly couldn't find it documented.
The solution to this is to put a join statement in gogo:
def gogo(qu):
w = Worker(qu)
w.start()
w.join()
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
Piet van Oostrum writes:
> def run(self):
> for n in range(5):
> self.que.put('%s tick %d' % (self._pid, n))
> # do some work
> time.sleep(1)
> self.que.put('%s has exited' % self._pid)
To preven
olution would be to filter your mesaage through
procmail or similar on your receiving computer. For example put the from
address in an X-From header and let the filter replace the From header
with the address from the X-From.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
d
value to be lost and the file probably to be closed. Just messy.
print("writing %s" % str(keys[0])+pasw)
f.write(str(keys[0])+pasw)
f.close()
else:
hesin=0
And how are people supposed to guess an 8 character password? Are they
supposed to do that weird calculation on their calculators or some such?
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
there are none. And you would have a lot more
peace of mind if you stopped doing this.
[*] array in the C sense.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
)
msg = self.q.get()
print(msg)
if 'END' in msg:
break
..main..
processes = []
for i in range(5):
d = Process(target=Worker, args=(debug_q,))
d.start()
processes.append(d)
for p in processes:
user. If you use an internet connection then
of course you can keep the relevant data outside of the reach of the
user.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
isking that temporarily your email cannot be delivered.
I think you should give up this unholy idea, and just stick with the standard.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
ultiprocessing.current_process().name
My advice would be to just do the GUI in the main module, and if the
Action needs more time, the create a new Thread or Process in the Action
class.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
. Very, very long files usually are not a good idea.
Also you imported multiprocessing through anothe module. This obscures
the structure of the application, and is unnecesary. You should only
access a module through another module if you add a layer of abstraction
that makes it easier or more
ater. But if I am correct then the following might
work:
\newcommand{\filename}{}
\edef\filename{\py{outputfile}}
\includegraphics[scale=0.75]{\filename}
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
ion. The only difference is Fedora 18 v
> Fedora 17.
>
> The BOMs are certainly there:
>
> <86> %R 10C0203z-621
> %A François-Xavier Le_Bourdonnec
>
> 000 206 255 373 % R 1 0 C 0 2 0 3 z -
>
That is not a BOM or SIG. It isn't
ADDR'] )[0] or
> UnKnown Host'
>^
> SyntaxError: invalid syntax
>
>
> i dont see anything wrong with that line, and the carret is actually
> pointing to the "host".
There is an apostrophe (') missing before UnKnown.
host = socket.gethostbyaddr(
python-requests.org/en/latest/) or
the Uploading Files part from Doug Hellmann's page
(http://doughellmann.com/2009/07/pymotw-urllib2-library-for-opening-urls.html).
This is for Python2; I can send you a Python3 version if you want.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP k
hars are
> returned as single characters, so there is no need to peek ahead and the
> lineno is not altered.
>
> In short: this looks like an implementation accident.
I think shlex should be changed to give the line number of the start of
the token in self.lineno. It isn't
> point you react that you want to get to Londen without boat
> or plane but just by bicycle. And in further exchange make it
> clear that using a bike is more important than arriving in London.
And then the easiests would be to put your bicycle in the train.
--
Piet v
les?
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
ding:
import codecs
sys.stdout = codecs.getwriter("utf-8")(sys.stdout.detach())
[Note: I haven't tested this]
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
is
> bullshit.
Tail recursion optimization throws away valuable stack trace information in
case of an error.
> 2. Lambda-expression body is limited to one expression. Why ?
Allowing general statements in a lambda body makes indentation more difficult,
I think.
--
Piet van Oostrum
W
Antoon Pardon writes:
> Op 30-09-13 20:55, Piet van Oostrum schreef:
>> Franck Ditter writes:
>>
>>> Good approach of FP in Python, but two points make me crazy :
>>> 1. Tail recursion is not optimized. We are in 2013, why ? This is known
>>> technolo
FILE ON MY
> ACCOUNT?
>
> PLEASE ANSWER ME, I WONT GET MAD, BUT THIS IS AN IMPORTANT SECURITY RISK.
>
> SOMEONES MUST HAVE ACCESS TO MY ACCOUNT, DOES THE SOURCE CODE OF MY MAIN
> PYTHON SCRIPT APPEARS SOMEPLACE AGAIN?!?!
These questions show that the one who put that
FILE ON MY
> ACCOUNT?
>
> PLEASE ANSWER ME, I WONT GET MAD, BUT THIS IS AN IMPORTANT SECURITY RISK.
>
> SOMEONES MUST HAVE ACCESS TO MY ACCOUNT, DOES THE SOURCE CODE OF MY MAIN
> PYTHON SCRIPT APPEARS SOMEPLACE AGAIN?!?!
This shows that the warning was correct.
--
Piet van Oos
also find it interesting to
solve Python problems.
I did not like Nikos' arrogance, ignorance and his refusal to use perfectly
good solutions.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
ist now, thanks again.
Also make sure that l_ip and l_result are Queues instead of lists, as MRAB
suggested.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
sing, and
also to study the underlying computer science concepts.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
7;'.join(tulemus2), and then to convert it to a string you have to specify
the encoding, which should be 'ascii', as you say it is ASCII.
str(b''.join(tulemus2), 'ascii')
or
b''.join(tulemus2).decode('ascii')
But note: If your
\\', b'r', b'3',
> b'\x1f', b'V', b's', b'9', b'\x1d']
>
> the Key-0000 is the key im using to decrypt the code. everything else is
> generated by the decrytion process and the unhexlify command. So my guess is,
> the join command cant handle the b"u" type of format. how can i get rid of
> the b.
>
> Or does anyone have a better idea how to translate HEX into ASCII and sort
> out the lines that make sense
Why do you post the same question twice under different subjects?
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
nd
convert them one after one if you think it is necessary. For example a script
that is seldom used can stay as CGI script.
And last but not least: not every Apache installation has mod-wsgi enabled. I
think most hosting providers don't.
--
Piet van Oostrum
WWW: http://pietva
oint with xxx = b''.join(tulemus2), and then you have
another byte string. If you are sure this is ASCII (which means all bytes are <
128), the you can convert it to a string with str(xxx, 'ascii') or
xxx.decode('ascii'). If there are bytes > 127 then you ha
Alain Ketterlin writes:
> BTW, does the original callable object have a ref counter? Is it garbage
> collected in that case? If not, would it be considered a bug?
In CPython ALL objects have ref counters.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE1
mputation are you talking about? And what magica;
effects? AFAIK there is no magic in computer science, although every
sufficiently advanced ...
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
ll optimization there is no
need to do tail recursion optimization.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
(7)()
> -> pattern = re.compile(r'(?P\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\s+'
> (Pdb) n
>> /Users/user/Documents/Python/apache.py(17)()
> -> match = re.search(pattern, string)
> (Pdb)
Also as Andreas has noted the r'(?P\"\")\s+' part is wrong. It should
probably be
r'(?P\".*?\")\s+'
And the r'(?P\((.*?)\))') will also not match as there is text outside
the (). Should probably also be
r'(?P\".*?\")') or something like it.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
65 # this cookie will
> expire in a year
>
As Ian already has told you (but apparently you didn't pay attention to), your
expires is wrong. So if your cookies disappear you should get this right first.
from datetime import datetime, timedelta
expiretime = datetime.u
in this area). In Python, however, you can define the __call__
method and with this they become almost identical in behaviour.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
27;c:/testfile.h5'
filename = 'c:\\testfile.h5'
filename = r'c:\testfile.h5'
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
h the same problem posted a smaller, more complete example here:
>
Then you should give us real code (a minimal example) that we can try. You use
myFunction in your example that isn't defined in your code. And by the way, why
don't you close f just after reading? Or even better, use
therefore
_WorldProper is not defined.
from import * is considered bad practice anyway. It is better just to import
the things you need.
from pykkar import World, Pykkar, _WorldProper
I have looked a bit in this pykkar.py and I think it is badly structured for
extension. The three classes
e Python will serve you just fine! Check out the threading
> module, knock together a quick test, and spin it up!
But it only works if the external C library has been written to release
the GIL around the long computations. If not, then the OP could try to
write a wrapper around them that does th
more help. But you can do everything you want with 2.x, I think.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
ditions.
File locking is generally the best solution for this kind of problems, unless
you can make use of OS level semaphores.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
can be done in a platform independent
way without the risk of race conditions. Maybe I have to find out.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
Skip Montanaro writes:
> I don't have the time or inclination to continue supporting lockfile (
> https://pypi.python.org/
> pypi/lockfile/). If you'd like to take it over, let me know.
>
> Skip
Hi Skip,
I am interested.
--
Piet van Oostrum
WWW: http://pi
cc, that I did not
know) and used it to generate a parser for Algol 68.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
socket.setdefaulttimeout(5)
>
> and it didn't make any difference.
>
> In both cases, Python version is "Python 2.7.3".
>
> Am I missing something ?
>
I would guess the difference to be caused by DNS. Maybe the DNS configuration
on the RPi is not optimal.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
IRC Lisp uses % for comments, but it may need to be doubled. (It's
> been doubled in the examples I've seen, and I don't remember the
> syntax.)
> Perhaps Scheme has the same convention, but Scheme could be considered a
> part of the Lisp clade.
Lisp and scheme use
ll due respect, Mark, your remarks are rubbish. Nobody talked about
parsing input with binary switches except you. I answered that 40 years ago I
wrote a parser generator that generated a parser for Algol 68 (and another one
for Algol 60 I should have added). And all this was using punched cards.
ors that translated into pure C
code, which was then compiled with a C compiler. The resulting intermediate C
code would be an object-oriented program in C. IIRC, the C code was reasonably
clear, not really convoluted, so you would have been able to write it yourself.
--
Piet van Oostrum
WWW: http://piet
t.show()
>
> I would like to place markers on the 4 curves when the price is equal to $20
> label it A, and when the price is equal to $40 and label it B. Does anyone
> know how I can accomplish this.
Something like:
plt.plot(20,40, 'bo')
plt.annotate('B', (20,40), xytex
with tcl.h from
Tcl 8.5
lipo: can't figure out the architecture type of:
/var/folders/5r/5r4ywY4e2ReN7U+8ZPQSJTI/-Tmp-//ccXN6p4b.out
error: command 'gcc-4.2' failed with exit status 1
You have new mail in /var/mail/piet
bash-3.2$ hg ftp -su
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
Ned Deily writes:
> In article ,
> Piet van Oostrum wrote:
>> I tried to install it from source, on Mac OS X 10.6.8, with Python
>> 3.3.2, and Tck/Tk 8.5 installed as Frameworks, but I get an error during
>> compilation. It seems it doesn't find the Tcl/TK f
could make it easy.
A language specification in BNF is just syntax. It doesn't say anything
about semantics. So how could this be used to produce executable C code
for a program? BNF is used to produce parsers. But a parser isn't
sufficient.
--
Piet van Oostrum
WWW: http://pietvanoos
kens relate to each other.
Syntax is grammar. Tokens are part of the grammar (but often specified
separately with a different grammar, usually regular expressions, which is a
subset of BNF).
So are you just confused or are you trollong?
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
Neil Cerutti writes:
>
> Context-sensitive grammars can be parse, too.
>
That's not English. Do you mean "parsed"?
But context-sentitive grammars cannot be specified by BNF.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https:/
101 - 200 of 712 matches
Mail list logo