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:/
mplete, it is not clear that
> you will be able to compile it at all. That's the difference between
> a calculator and a computer.
You think a language that is not Turing-complete cannot be compiled?
What nonsense is that. Please Mark, spare us your nonsense.
--
Piet van Oostrum
> functionality differ, Do you have experience with objective usage ?
> http://docs.python.org/2/library/functools.html#partial-objects
>
What do you mean with "objective usage"?
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
my internet connection and then trying
both the back button and entering the URL in the address bar. So it has nothing
to do with referrer, I think.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
Piet van Oostrum writes:
> Νίκος Αλεξόπουλος writes:
>
>> There is no set of cookie returned back when visitor comes from a referer.
>>
>> Isn't this strange?
>> No matter if you visit a webpage as a direct hit or via a referer the
>> cookie on the v
he condition every time through the for loop, even though there
> is no chance for needs_processing to change inside the loop, which does not
> look very efficient.
I bet in most cases you won't notice the time used to check the condition.
Beware of premature optimization!
--
Piet van Oost
sking for
evidence you know you will never get.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
ython should also include the Tcl/Tk header files.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
CONVERT FROM LISTS TO LONG STRINGS SO I CAN STORE SUCCESSFULLY LIST
> PYTHON DATATYPE TO MYSQL SCALAR STRING.
>
> EVERYHTIGN I TRIED FAILED.
Then why don't you use the simple solution: use a relational database to store
the data?
--
Piet van Oostrum
WWW: http://pietvanoostrum.c
returns None. So the print
sequence_b(10) dosn't make sense.
If the print is only for debugging the use the following:
def sequence_b(N):
result = 0
for k in range (1,N):
step = ((-1)**(k+1))/(2*k-1)
print(step) ## debug output
result += step
return result
use an extra table of downlaods that i asoociate with table
> visitors with a foreing key but decided to add an additional 'download'
> column into the existant visitors table:
Nikos, you are an excellent member of the Greek society. Listening to you makes
it so much easier to under
Sibylle Koczian writes:
> Am 07.11.2013 14:14, schrieb Piet van Oostrum:
>> Nick the Gr33k writes:
>>
>>> I have decided to take your advice.
>>> I wasn't able to fit those 'lists' of mine into MySQL's varchar()
>>> datatype afte
',
'#9 /\n58#0#',
'10178#000#C S#S#124##001##DAY#Computer
Systems#Roper,\nPaul#3#MWF#11:00am#11:50am#1170 TMCB ',
'#41 /\n145#0#',
'10178#000#C S#S#124##002##DAY#Computer
Systems#Roper,\nPaul#3#MWF#2:00pm#2:50pm#1170 TMCB ',
'#40 /\n120#0#
e("0", 'string', "eval")
t1 = Timer("eval(dummy); func()", setup="from __main__ import dummy, func")
t2 = Timer("0; eval(code)", setup="from __main__ import code")
And then you'll see that t1 is slightly slower than t2.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
https://mail.python.org/mailman/listinfo/python-list
Terry Reedy writes:
> Indexing objects by their internal id is usually useless.
obj.id is not the internal id.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
http://mail.python.org/mailman/listinfo/python-list
"Fokke Nauta" writes:
> "Piet van Oostrum" wrote in message
> news:m2zkigartn@cochabamba.vanoostrum.org...
>> "Fokke Nauta" writes:
>>
>>
>>> INFO:DAVServer.fshandler:get_data: d:\webdav not found
>>> XXX --- [
or the original sys.stdout.
That can be solved with a dup.
import os, sys
class Unbuff(object):
def __enter__(self):
sys.stdout.flush()
self.stdout_bak = sys.stdout
sys.stdout = os.fdopen(os.dup(sys.stdout.fileno()), 'w', 0)
def __exit__(self, exc_type, e
ge and I am studying about manipulating the images using
> Python. If you also know any websites relating to manipulate the images, can
> you guys tell me? Thank you!
For learning programming you could do the Udacity course Introduction to
Computer Science:
https://www.udacity.com/course/cs101
ge in fn.
In this way you always display the most recent one.
You can make it more sophisticated by removing files that have been
displayed and files that you skip.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
http://mail.python.org/mailman/listinfo/python-list
>
> Could any one help quickly.
>
> Note : If I use sendline(X Y 00:00:00:00:00:00:00 F2) was working fine.
>
sendline("X Y %s %s" % (var, name))
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
http://mail.python.org/mailman/listinfo/python-list
re we got a newer one
except Empty:
break # stop the inner loop
display the image in fn.
In this way you always display the most recent one.
You can make it more sophisticated by removing files that have been
displayed and files that you skip.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
http://mail.python.org/mailman/listinfo/python-list
ed to Python.
>
> I find this surprising too. I am also surprised that it even works,
> given that the highest intermediate value is about 57 billion and I do
> not remember that Basic had infinite precision ints.
That may explain why the Basic version is faster: it gets overflow and
the
;down s-fc3
> f-fl"]//a')
>
> why i can't get nothing?
There is only one in the document and that div
contains only a single but the latter does
not contain any . The URLs that you get in the first code are not
contained in a . They are contained in a , however.
So xpath('//div[@class="m-tdli"]//div[@class="down s-fc3 f-fl"]//a') works.
--
Piet van Oostrum
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
http://mail.python.org/mailman/listinfo/python-list
r and the thing is too old to
survive then you could dump its state to another computer and continue
running there. Or you could archive the state for some time and resume it
when it is convenient.
I imagine that something similar would be possible with my state of mind.
--
Piet van Oostrum
XT files
>>> lying around).
>DS> Strictly speaking, it's not OS X, but the HFS file system that is case
>DS> insensitive. You can use other file systems, such as "UNIX File
>DS> System". Use Disk Utility to create a disk image and then erase it
>DS
>>>>> Grant Edwards <[EMAIL PROTECTED]> (GE) wrote:
>GE> The low 32 bits match, so perhaps you should just use that
>GE> portion of the returned hash?
If the hashed should be unique, 32 bits is much too low if you have
millions of entries.
--
Piet van Oost
ains a definition of a hash function. I know what a hash
function is. But the OP wanted to use the hash as a unique key.
--
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
nterpreter. It is done in the editor in
which you prepare your python source.
--
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
e a tradition hash table. If I
>k> do it this way am I going to get the memory savings I am after? Will
>k> the hash function always generate unique keys? Also, would the same
>k> technique work for a set?
Maybe a Berkeley DB hash file would be a good alternative. It can cont
only evaluated once' is quite clear I would
say. Your problem is that you thought __setitem__ is part of evaluation,
but it isn't. It is part of assignment, while __getitem__ is part of
evaluation. See the definitions of __getitem__ and __setitem__ in the
language reference manual.
--
Piet v
ished. These jobs should run parallel to save time.
Use the subprocess module.
--
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
>>>>> Gerhard Fiedler <[EMAIL PROTECTED]> (GF) wrote:
>GF> On 2006-07-14 16:07:28, Piet van Oostrum wrote:
>AP> 2a) In case you answer yes to question (1). Can you explain me how
>AP> I have to read the language reference in order to deduce this
>AP>
ot fast. You have to read all preceding lines.
If you have to do this many times while the file does not change, you could
build an index into the file.
--
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
use the functions from the locale module, e.g.:
>MP> import locale
>MP> locale.setlocale(locale.LC_ALL, '') # use the current locale settings
>MP> encoding = locale.nl_langinfo(locale.CODESET)
But if LANG isn't set (like on Mac OS X) this doesn't give you the proper
encoding.
On my system I have added LANG to .profile.
--
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
>>>>> Antoon Pardon <[EMAIL PROTECTED]> (AP) wrote:
>AP> On 2006-07-14, Piet van Oostrum <[EMAIL PROTECTED]> wrote:
>>> Just read what it says. `It is only evaluated once' is quite clear I would
>>> say.
>AP> If it is so clear,
>>>>> Antoon Pardon <[EMAIL PROTECTED]> (AP) wrote:
>AP> On 2006-07-17, Piet van Oostrum <[EMAIL PROTECTED]> wrote:
>>>>>>>> Antoon Pardon <[EMAIL PROTECTED]> (AP) wrote:
>>>
>AP> On 2006-07-14, Piet van Oostrum <[E
> print x # doesn't work, x is not defined in main script namespace
>SN> What is the best way to make "print x" work? Using the following:
emacs.py:
def eexecfile(file, glob):
# do other stuff
execfile(file,glob)
main:
import emacs
emacs.eexecfile("te
You are about 7 months early.
--
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
nential time.
>DBR> """
This is the first time I see this called `backup'. I have always used and
seen the term `backtracking'.
--
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
no difference in behavior between the *names*
>SD> this_is_an_integer and this_is_a_string. (The *objects* they point to are
>SD> a different story, naturally.)
The official Python documentation (language reference manual) talks a lot
about variables. So it seems silly to say that Python d
blem. I prefer having Van Straeten and Van Stralen
>RS> next to each other than having them mixed up with names without Van like
>RS> this:
>RS> Straeten, Van
>RS> Straetmans
>RS> Stralen, Van
In Holland it is sorted without the 'van' 'de' etc.
--
>>>>> Fredrik Lundh <[EMAIL PROTECTED]> (FL) wrote:
>FL> Piet van Oostrum wrote:
>>> The official Python documentation (language reference manual) talks a lot
>>> about variables. So it seems silly to say that Python doesn't have
>>> v
;> #then it does it correctly
>CH> No, it's actually behaving like
>CH> for x in t:
>CH> y,z = t
y,z = x
>CH> # do something with y and z
--
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
>>>>> "A.M" <[EMAIL PROTECTED]> (AM) wrote:
>AM> This is my 1st day that I am seriously diving into Python and I have
>AM> to finish this application by the end of today.
Are you serious?
--
Piet van Oostrum <[EMAIL PROTECTED]>
URL: http://www.cs
t;
>>> This is a way:
>>>>>> a = range(10)
>>>>>> del a[:]
>S> or simply
>S> a = []
>>>>>> a
>>> []
Then you *have* deleted the list and created a new one, which is different
from keeping the list and deleting the ele
that what you referring to?
>FAL> ReportLab (the commercial bussiness thing on .com) is where the main
>FAL> developers of ReportLab (a library freely available on www.reporlab.org)
>FAL> work. So what you want really is .org, but apparently it's having
>FAL> problems righ
pet peeve of
>M> mine: "immutable variable."
>M> immutable = can't change
>M> vary-able = can change
>M> Clearly a contradiction in terms.
I would say that immutable = 'can't *be* changed' rather than 'can't
change'. But I am not a na
set of a dictionary be represented as a set instead of a list?
>P> I think the order of the items returned by keys() and values() are
>P> related. I decided on a short empirical test:
yes, it is documented that their order is related. In fact
d.items() == zip(d.keys(), d.valu
clared explicitly, like 'local A'. But that would break
existing code. Or maybe the composite assignment operators should have been
exempted. Too late now!
You have the same problem with:
A = [10]
def inner():
A.append(2)
works but
A = [10]
def inner():
A += [
ave the impression that the defenders try to defend
>AP> those results as a design decision. With your remark above I have
>AP> to wonder if someone really thought this through at design time
>AP> and came to the conclusion that nested variables are harmfull
>AP> and thus may not be rebound but not that harmfull so mutation
>AP> is allowed and if so how he came to that conclusion.
I don't think that was the reasoning. On the other hand I think nested
scopes were mainly added for read-only access (to the namespace that is,
not to the values) . But then Python doesn't forbid you to change mutable
objects once you have access to them.
--
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
CM SIGPLAN Notices, 1973, 8 (2) pp. 28--34).
I think nested variables have the same troubles as global variables, so
they should be used with care.
--
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
be one of them.
You didn't understand it in your OP. Maybe your understanding has gained in
the meantime?
--
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
urther suggestions?
That output is passed to stderr. So you can get it in a string:
output = Popen(["gpg", "--output", "outfile", "--verify", "sigtest"],
stderr=PIPE).communicate()[1]
--
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
>>>>> Antoon Pardon <[EMAIL PROTECTED]> (AP) wrote:
>AP> On 2006-07-07, Piet van Oostrum <[EMAIL PROTECTED]> wrote:
>>>>>>>> Antoon Pardon <[EMAIL PROTECTED]> (AP) wrote:
>>>
>AP> Could you maybe clarify what problem
decided whether the search was
>AP> to stop at the local level or not.
No, it doesn't. There could be another binding in the same scope. The
complicatedness of this particular assignment doesn't decide anything about
how to search for 'a', but rather the presence or absence of a binding
anywhere in the scope.
--
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
nally, the lefthandside can also be a [nested] tuple or list, in which
case it is a collection of parallel assignments. And oh yes, there are also
other binding operations e.g. a function or class definition.)
--
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
>>>>> Bruno Desthuilliers <[EMAIL PROTECTED]> (BD) wrote:
>BD> Actually, and AFAIK, len(obj) = lambda obj : obj.__len__().
You mean: len = lambda obj : obj.__len__().
--
Piet van Oostrum <[EMAIL PROTECTED]>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4
UnboundLocalError.
OK. That could have been chosen. But that would mean that instead of c.a =
b, where c is bound in a non-local scope, you have to write something like:
cc = c
cc.a = b
I don't find that useful.
--
Piet van Oostrum <[EMAIL PROTECTED]>
URL: http://www.cs.uu.nl/~piet
library itself.
I tried your example with cmd='ls -l' and it works. If I put a print
'started' after the xc.start(), it prints that before the output of ls -l,
indicating that ls -l is running in the background. (Of course the actual
order is up to the scheduler.) Maybe running it i
gt; from BINARY_SUBSCR or STORE_SUBSCR)
You need both the __setitem__ and the __getitem__ otherwise it won't work.
I think the "evaluated once" clause is for cases like:
f(a)[g(b)] += 1
where f and/or g have side effects. These side effects should then take
place only once. Side effe
e child process, not in the parent process, I think. Or
do you have a solution for that?
--
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
sing $0 (which is the shell script itself) to python is sure to
>M> break. Try this:
I guess this is a trick to use a python script as a shell script that
executes itself. In other words it is both a shell script and a python
script and when executed as a shell script then it passes itself to the
p
ot;c" in ruby...
>>>
>>> Thanks a lot
>>> Regards,
>>> antoine
>A> Why would they want to make such an obscure API ? ... didn't they have
>A> Python to learn from (I am truly amazed - nothing cynical ...just ...
>A> why ?)
I think
to Qt.
>CM> I like Ice a lot, it's got hardly any of the ramp up time and learning
>CM> curve that CORBA does, and it's extremely efficent. If GPL or cash are
>CM> acceptable licensing options to you, then I encourage you to use it
>CM> before you head to CORBA.
O
pression library. The underlying compression algorithm
>MvL> is LZW.
No, it uses a compression algorithm based on LZ77 (called DEFLATE).
Therefore gzip was not encumbered by the the LZW patent.
--
Piet van Oostrum <[EMAIL PROTECTED]>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE1
gc><>:
>jssgc># Objects created here are local to this scope
>jssgc>a = 1
>jssgc>b = 2
>jssgc>global c
>jssgc>c = a + b
As you want c to be an *instance* variable, the normal idiom would be:
class Test:
def __in
urve stuff (donated by SUN). M2Crypto is a
Python interface to SSL.
--
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
m init
import X,Y explicitely is probably safer. And, by the way, from init import
* can only be used at module level, not in inner namespaces.
--
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
>>>>> Sebastian 'lunar' Wiesner <[EMAIL PROTECTED]> (SW) wrote:
>SW> Linux seems to ignore SUID bit on scripts:
The reason is that obeying SUID bits on scripts would be a security risk.
--
Piet van Oostrum <[EMAIL PROTECTED]>
URL: http://www.cs.uu.nl
It can only be made safe if interpreters can be passed inodes
or opened files by the kernel, but that is not how most interpreters work.
At least not python.
--
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
>>>>> Lawrence D'Oliveiro <[EMAIL PROTECTED]> (LD) wrote:
>LD> No it wouldn't. This security hole was fixed years ago.
How?
--
Piet van Oostrum <[EMAIL PROTECTED]>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: [EMAIL PROTECTED]
There are several ssh and telnet applets on the web. Of course it depends
on the Java support in your IE.
--
Piet van Oostrum <[EMAIL PROTECTED]>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: [EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
u mean with: 'Haskell has a dynamic typing system'?
--
Piet van Oostrum <[EMAIL PROTECTED]>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: [EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
there is also `daily typed' or `monthly typed'?
>XL> http://xahlee.org/UnixResource_dir/writ/jargons.html
--
Piet van Oostrum <[EMAIL PROTECTED]>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: [EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
wise os.write can be used.
As this depends on the OS support for append, it is not portable. But
neither is locking. And I am not sure if it works for NFS-mounted files.
--
Piet van Oostrum <[EMAIL PROTECTED]>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: [EMAIL PROTECTED]
--
htt
like 'this' in Java or C++. It could even have chosen to use a
keyword 'local' to indicate local ones and let instance ones be the
default. But if instance variable would be implicit, local ones should have
been explicit.
--
Piet van Oostrum <[EMAIL PROTECTED]>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: [EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
>>>>> [EMAIL PROTECTED] (Aahz) (A) wrote:
>A> [posted & e-mailed]
>A> In article <[EMAIL PROTECTED]>,
>A> Piet van Oostrum <[EMAIL PROTECTED]> wrote:
>>>
>>> There is.
>>> Inside a method there are 3 kinds of identif
ible?
If the directory is writable, you can delete a file and write a new one
with the same name. The permissions of the file itself are of no importance
in this case.
--
Piet van Oostrum <[EMAIL PROTECTED]>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: [EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
tivestate.com/ASPN/Cookbook/Python/Recipe/302930
--
Piet van Oostrum <[EMAIL PROTECTED]>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: [EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
somedict):
self.data = somedict.copy()
def __hash__(self):
result = 0
for elt in self.data:
result ^= hash(elt) ^ hash(self.data[elt])
return result
def __repr__(self):
return repr(self.data)
__str__ = __repr__
d = immdic
s
iType1 = string.split(str(iType), "'")[1]
NameError: global name 'string' is not defined
Using execfile is a bad way to get the function definition. Import is the
way to go. Just add a line:
import string
to the beginning of whos.py, and the the usage should be:
from w
e Ipaddress?
>pk> I expects below format output
>pk> eg 203.199.200.0
>pk> 203.33.20.0
"%15s" % ip
--
Piet van Oostrum <[EMAIL PROTECTED]>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: [EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
decs.open(filename,"wb", encoding="utf-8")
>HM> file.write(data)
>HM> file_name=sys.argv[1]
>HM> encode(file_name)
I tried this program and for me it works correctly. So you probably used a
wrong input file or you misinterpreted the output. To be sure make h
should use u"" if you're going to take that route, as this
>CM> will fail spuriously if y[0] contains a unicode string that can't be
>CM> implicitly converted to ascii. Personally, I prefer the boolean check
>CM> and I'll let operations fail elsewhere if th
*is* passed when you call it, but it is written before the method name
instead of after it. Some people have called this an "infix" call similar
to infix operators.
--
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
>>>>> Ben Finney <[EMAIL PROTECTED]> (BF) wrote:
>BF> The latter two statements are equivalent. The 'instance.method(args)'
>BF> syntax is just sugar for 'Class.method(instance, args)'.
It is more than just syntactic sugar because the Class i
d with non-8-byte machines (CDC) until the beginning of the
80's. :=( In fact in that time the institution where Guido worked also had such
a machine, but Python came later.
--
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
hackish.
You need e Postscript interpreter, e.g. Ghostscript.
If you have Ghostscript installed PIL can read EPS images. Then they can be
converted to wx images:
http://wiki.wxpython.org/index.cgi/WorkingWithImages
--
Piet van Oostrum <[EMAIL PROTECTED]>
URL: http://www.cs.uu.nl/~piet [PGP
; ... = word1 word2 word3 ...
>d> then only word "word1" should be call to func "word1" with parameters
>d> word2, word3 etc
That depends whether you want function application to be left-associative
or right-associative. For example, in haskell it is left associati
unequal
Huh? Unequal things may hash to the same value. That one of the essential
properties of a hash function.
--
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
def __init__(self, *a, **k):
>>> super(Int, self).__init__(self, *a, **k)
>>>
>>> >>> i = Int(1)
>>> >>> i
>>>
>>> 1
>>>
>>> Regards,
>>> Tor Erik
>CM> While I'm not *totally* sure what
and create a new new child In
>VS> this case who becomes the owner of this child process.
>VS> Is it the thread that spawned becomes the owner or is the main program
>VS> becomes the owner of that child process.
Owner (parent) is the process, not a thread.
--
Piet
didn't help.
I also removed the -c, but then the install failed in the next step.
Has anybody succesfully installed cElementTree on this combination?
--
Piet van Oostrum <[EMAIL PROTECTED]>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: [EMAIL PROTECTED]
--
http
{% endfor %}
>BO>
>BO> {% else %}
>BO> No polls are available.
>BO> {% endif %}
>BO> Whole tutorial is on this page:
>BO> http://www.djangoproject.com/documentation/tutorial3/
>BO> endfor, endif, {{? :)
It is the Django template language.
--
a spurious
comma.
And a and b already print out the same, so it is not clear what you want.
Do you mean that the x and y of the a and b object should be independent?
In that case you should not use static variables but instance variables.
If they have to survive across different HTTP requests
_python it will
not do that because different requests can run in different Apache
processes (on Linux, Unix, Mac OS X etc.). So it this desired behaviour or
not? Your post isn't clear about that. And if it isn't what is the desired
behaviour?
And you certainly should do something about
201 - 300 of 717 matches
Mail list logo