e end.
I don't think that's possible if you start as the user kk.
>K> I don't know how to achieve this iffect.
>K> Infact I will need this during a serious deployment because i would have
>K> my application run as a demon as a dedicated user.
>K> I
s assigned to variable
print "Trying %s" % f
if f == ("%s.py" % self._chosen_module):
self._this_module = os.path.join(root, f)
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list
>>>>> Ryniek90 (R) wrote:
>R> "
>R> Didn't worked, so i wil reuse your class, and modify it later. Now i see
>R> that working on private objects complex.
No it's not complex. *You* make it complex.
--
Piet van Oostrum
URL: http://pietvanoos
(I could list files in client's
>J> window).
>J> How can i pass the url information through Pyro ?
What do you mean? Do you want to copy a file or copy file names? Copying
a file between two machines can best be done by a specialized protocol,
like HTTP or scp. Pasting a file doesn
>>>>> Krishnakant (K) wrote:
>K> On Thu, 2009-07-23 at 00:17 +0200, Piet van Oostrum wrote:
>>> Being a sudoer is not a privilege to issue the os.setuid system call. It
>>> is only a permission to use the sudo command.
>>>
>K> Yes, So I wo
>>>>> jayshree (j) wrote:
>j> On Jul 21, 8:59 pm, Piet van Oostrum wrote:
>>> The recipient_public_key.pem file is the public key of the recipient
>>> which means the person that is going to receive the encrypted message.
>>> You should get it
o and let it do a socket tunnelling to postgress, i.e. make a
connection to the postgres server and a socket connection to the
original Python script, and copy everything from one socket to the other
- in both directions. However this can also be done with a ssh tunnel
which might be simpler.
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list
lower ( NAME_ ) = 'fatigue'
>SM>and TEST_COUNT in (3,4)
>SM>and DATETIME > 39814.0
>SM>and SCORE < 30
1) Do you have indices on the join fields?
2) Look at the ANALYZE command
3) Look at the EXPLAIN command
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list
waling a directory with very many files' [sic!]
Message id's:
(ctypes)
(Cython)
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list
>>>>> Naoki INADA (NI) wrote:
>NI> "Writing unicode to a file(-like)" is a simple requirement.
>NI> Does python have any simple resolution for it?
Yes, Python 3 will do this. For Python < 3.0 you will have to use a
codecs wrapper or explicitely do the e
3&hl=en&ct=clnk&gl=us&client=firefox-a
>CR> Anyone know what's the deal with effbot.org? It seems to be broken at
>CR> present, forcing me to use Google's cached version.
>CR> It's a real shame since it has lots of handy Python info.
Just try again.
mpy.memmap using mmap.mmap
On Windows XP the virtual address space of a process is limited to 2 GB
unless the /3GB switch is used in the Boot.ini file.
http://www.microsoft.com/whdc/system/platform/server/PAE/PAEmem.mspx
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4
you write your code? Or look at it after you
have written it?
Sorry if I offend you but you give the impression of just trying some
more or less random stuff and then asking here if it doesn't give the
required result.
That's not the attitude of a researcher, unless your definition of
>>>>> Luis Pedro Almeida (LPA) wrote:
>LPA> Dear all,
>LPA> I would like to know how to convert a list of points into a
>LPA> polygon shapefile (esri).
http://lmgtfy.com/?q=esri+shapefile+Python
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8
mutable
>RJ> objects appear on the scene. While the OP appears to have the right idea,
>RJ> your "correction" here could be quite misleading.
If you read the OP, it is clear that he talked about a class variable,
which is a perfectly legal notion in Python, and is mentioned as
gt;>> [Are there types for which len() returns a value that can't be
>>> indexed?]
>>>
>RJ> Dictionaries.
>RJ> Which doesn't make your point less valid. In fact I'd go so
>RJ> far as to argue that what len() gives you is the numb
r
like os.waitpid(), subprocess.call()
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list
Well actually your subject is `how to get no value'. Your code does that
perfectly. :=)
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list
.php.net/index.php?everythingafterthequestionmark) as a
>>>> single variable (rather than individual variables)?
>>> os.environment('QUERY_STRING')
>SDD> Maybe you mean:
>SDD> os.environ['USER']
Let's take the best of both:
os.environ[&
(most recent call last):
>A> File "test.py", line 7, in
>A> a[:] = c[:]
>A> File "/usr/local/py3.1/lib/python3.1/xml/etree/ElementTree.py", line
>A> 210, in __setitem__
>A> assert iselement(element)
>A> AssertionError
This is a
'0xf0cff00'
>>>>>
>s> so i would like a string like '\xf0\xcf\xf0\x00'
You have the string wrong.
But the correct one you get with:
In [67]: import struct
In [68]: number = 252509952
In [69]: struct.pack('>I', number)
Out[69]: '
to all objects.)
>S> Re errors passing silently, the OP doesn't believe that len(42) should be
>S> an error, so that's not relevant.
>S> And there's nothing ambiguous about len(42).
len(42) should be 7.5 million.
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list
the binding mechanisms in Java
and Python are different I don't think the actual semantics are so much
difference as to cause much confusion (with C it could be more). But
such a study could reveal that.
BTW. Which postings from (say) the last month did you have in mind?
--
Piet van
also create a special sentinel object and use that.
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list
ever, I've noticed that once a module is imported using the
>r> `from pkg import mod' syntax, if its name is deleted from the
>r> package namespace then subsequent imports with `from' will fail.
This is incorrectly stated. Also on the initial import it will fail, not
just on
cimal digits equally reasonable. More so than 1, actually. 1 as the
length of an int doesn't give any information.
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list
are you
>AvdH> want to know whether this is a map you already have encountered.]
So what's the problem?
piet$ python3
Python 3.1 (r31:73578, Jun 27 2009, 21:49:46)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "lic
ds, and the logger should count the sentinels which can have normal
messages between them. It may be a bit fragile to depend on the number
of threads especially when this number is dynamic. One solution would be
to have special StartLogging and StopLogging objects that are put in the
queue when
>>>>> ryles (r) wrote:
>r> On Jul 25, 8:57 am, Piet van Oostrum wrote:
>>> >>>>> ryles (r) wrote:
>>> >r> According tohttp://www.python.org/doc/essays/packages.html:
>>> >r> "The import statement first tests wheth
c and integrated network support would be
>DC> helpful.
>DC> """
>DC> It looks to me like he is looking for Python.
No fast, efficient binaries yet, and no integrated GUI builder.
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list
catch (IllegalBlockSizeException e) {
System.out.println("Illegal block size" + e);
}
catch (NoSuchPaddingException e) {
System.out.println("Illegal padding " + e);
}
catch (BadPaddingException e) {
System.out.println(&quo
>>>>> jayshree (j) wrote:
>j> pk = open('/home/jayshree/my_key.public.pem' , 'rb').read()
By the way, a PEM file is a text file, no reason to open it in binary
mode. Just replace the 'rb' with 'r' or leave it out.
--
Piet van
>>>>> Michael Ströder (MS) wrote:
>MS> Piet van Oostrum wrote:
>>> Please note that the text to be encrypted must be smaller than the key
>>> size (at least 11 bytes smaller). You shouldn't encrypt large data with
>>> RSA anyway: it is too sl
g;
encrypt()
The above line should be shifted to the left. It is not part of the
function otherwise you get an endless recursion.
And to answer another question from stackoverflow.com: RSA.pkcs1_padding
is a good parameter, if the decryption side will also use it.
See also my posting on
do you think the addr is for in
data, addr = mySocket.recvfrom(100)?
>DS> My source:
>DS> #!/usr/bin/env python
>DS> import socket
>DS> mySocket = socket.socket ( socket.AF_INET, socket.SOCK_DGRAM )
>DS> mySocket.bind ( ( '', 514 ) )
>DS> data, addr = my
occurs twice still naturally easier if
>N> also occured just once.
>N> Sincere thanks & regards
>N> Niklas
1. Is this homework?
2. It sounds very confusing. Are you trying to find the longest word in
a series of words seperated by spaces? find and rfind will not help
you much.
>>>>> NiklasRTZ (N) wrote:
>N> Thank you. This seems to work:
>N> sorted("a AAA aa a sdfsdfsdfsdf vv".split(' '),lambda a,b: len(a)-
>N> len(b))[-1]
>N> 'sdfsdfsdfsdf'
simpler:
sorted("a AAA aa a
# cert_file is a PEM formatted certificate chain file.
>j> connection = httplib.HTTPSConnection(host, int(port), key_file,
>j> cert_file)
What happens if you set cert_file to None? This would indicate that you
are not interested in the server's certificate.
By th
y versatile on most systems and can find
>CB> specifically targeted processes like you program), and exit if there
>CB> are already three.
That will surely run into some race conditions. If the limit of 3
processes is soft then that wouldn't be a big deal, however.
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list
?
See http://mysql-python.sourceforge.net/MySQLdb.html
This really has nothing to do with myphpadmin (you probably mean
phpMyAdmin but even then it has nothing to do with it except that both
acess a MySQL database).
And if you give yourself a name than we might have an idea if we are
talking to a
eat asking the same or similar questions in
different threads, especially if you don't take notice of the answers
given. I will repeat it once here:
load_pub_key requires a file name, not the contents of the file.
So use rsa = M2Crypto.RSA.load_pub_key('my_key.public.pem') and
nish, for example:
>M> re.search(r"^(.+|D)*A$", "x" * 25 + "B")
>M> which on my PC (1.8GHz) takes 18.98secs with the re module but <0.01secs
>M> with this new implementation.
Is this version also going to use the Thompson approach?
--
Pi
>>>>> Carl Banks (CB) wrote:
>CB> On Jul 29, 7:14 am, Piet van Oostrum wrote:
>>> >>>>> Carl Banks (CB) wrote:
>>> >CB> On Jul 28, 3:15 pm, John D Giotta wrote:
>>> >>> I'm looking to run a process with a lim
docs.python.org/library/
>JG> subprocess.html#popen-objects) which may be what you need.
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list
de error messages and full tracebacks.
>>>
>>> Cheers,
>>> Chris
>>> --http://blog.rebertia.com
>M> these are errors :
>M> Traceback (most recent call last):
>M> File "echo-client.py", line 11, in M> sockobj.connect((serverHost,
arallel,args=
>m> (hard_work_queue,result_queue,)))
>m> #wait for all hard workers to finish
>m> for worker in hard_workers:
>m> worker.join()
Here you create new hard workers, but you never start them. The join
should then give an exception when it reaches these.
--
Pi
rawinput = str('version=\"1.0\"?>to-ports=\"*\" />')
The str here is unnecessary as you have already a string.
>N> print (rawinput)
>N> b = bytes ( ord(c) for c in raw
variable or to the PythonPath key in the registry. However, PYTHONPATH
>MMM> doesn't exist,
Then create it.
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list
ot;) or
getenv("HTTP_X_FORWARDED_FOR") or
getenv("HTTP_X_FORWARDED_FOR") or
getenv("REMOTE_ADDR") or
"UNKNOWN")
I use getenv() rather than environ[] to avoid exceptions.
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE1
exception trace in your browser (if it gets that far, that is).
import cgitb
cgitb.enable()
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list
ains the byte sequence that starts with
a
b, then a ' ... and ending with the 5 bytes \ x 0 0 ' which is wrong.
Actually it should be:
if buff == b\'\x00':
or
if buff == b\'\0':
>N> print ('policy FOUND >>> sending...')
>N&g
ed.
I wonder if something fishy is happening in the multiprocessing
infrastructure. Or maybe the Fortran code goes wrong because it has no
protection against buffer overruns and similar problems, I think.
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private ema
e, port, username, password)
t = s.get_transport()
chan = t.open_session()
chan.exec_command('sudo -s')
print 'writing password'
chan.send(password + '\n')
print 'write command'
chan.send('whoami\n')
print "try to read"
print chan.recv()
For more control you can use chan.recv_ready() to see if output is available.
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list
yref(self, name):
print 'char:', unichr(name2codepoint[name])
If your HTML may be illegal you should add some exception handling.
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list
t int, long, float to complex
That should be z += 0j
>CH> return atan2(z.imag, z.real)
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list
nicode letters), and that the new stuff also consists of
letters. If your language has additional word constituents like - or '
you have to add this.
You can do this with unicodedata.category or with a regular
expression. If your locale is correct \w in a regular expression may be
helpful.
--
Piet
Calling os.exit in a child process may be dangerous. It can cause
unflushed buffers to be flushed twice: once in the parent and once in
the child.
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list
10
socket.setdefaulttimeout(timeout)
try:
response = opener.open(url)
print response.read()
print"ok = 1"
except:
print "error 1"
>R> output from the above:
>R> Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.11) Gecko/
>R> 20071127 Firefox/2.0.0.11
>R> error 1
>R> Error code: 503
>R> ('Service Unavailable', 'The server cannot process the request due to
>R> a high load')
That suggests that there is a real problem in the server. Or that your
url causes some problems.
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list
ent.
I don't think there is any modern OS that allows that. Unless you use
your own protocol of course, like letting the child write the
environment to its stdout and reading and interpreting it in the parent.
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
x27; t know any way
>DA> a CSS file could cause the content to change, just the display.
>DA> All I can guess is that it has something to do with "browser type" or
>DA> cookies. And that would make lots of sense if this was a cgi page. But
>DA> the URL doesn't look like that, as it doesn't end in pl, py, asp, or any of
>DA> another dozen special suffixes.
>DA> Any hints, anybody???
If you look into the HTML that Firefox gets, there is a lot of
javascript in it.
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list
>>>>> Dave Angel (DA) wrote:
>DA> Piet van Oostrum wrote:
>>>
>DA> If Mozilla had seen a page with this line in an appropriate place, it'd
>DA> immediately begin loading the other page, at "someotherurl" But there's no
>DA>
you can better
look into the general 'grep'-like software. For example start here:
http://arglist.com/regex/
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list
>>>>> Dave Angel (DA) wrote:
>DA> Piet van Oostrum wrote:
>>>>>>>>
>>>>>>>>
>>>
>DA> But the raw page didn't have any javascript. So what about that original
>DA> raw page triggered additional stuf
iated.
When the parent dies, the child should die when it's writing on the
broken pipe. At least that's how it works in Unix systems. I don't know
about Windows, however.
To let the dying be fast you should make sure that stdout in the child
is unbuffered.
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list
f the C code is not manipulating Python objects
or something in the Python interpreter, it could be changed to release
the GIL during the computation. That's also how Numpy does it, IIRC.
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.o
7;e1', 'Albert', [topic1])
expert2 = Expert('e2', 'Leonhard', [topic2])
expert1.add_expert(expert2)
expert5 = Expert('e5', 'Carla', [topic5, topic6])
expert5.add_expert(expert1)
expert5.add_expert(expert2)
for ex in expert1, ex
ot;credits" or "license" for more information.
>>> import testmod
>>> from testmod import TestClass
>>> a = TestClass()
>>> b = TestClass()
>>> a.__class__ is b.__class__
True
>>> reload(testmod)
>>> c = TestClass()
>>> c.__class__ is a.__class__
True
>>> from testmod import TestClass
>>> d = TestClass()
>>> d.__class__ is a.__class__
False
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list
নেক
Or if you write to a file, open it with utf-8 encoding.
I take utf-8 because in general this is the preferred encoding for
non-ASCII text. It could be that Bengali has a different preferred encoding.
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list
-485468-pune_india_vacations-i;_ylc=X3oDMTFka28zOGNuBF9TAzI3NjY2NzkEX3MDOTY5NTUzMjUEc2VjA3NzcC1kZXN0BHNsawN0aXRsZQ--'
hdrs = {'User-Agent': 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US;
rv:1.9.0.13) Gecko/2009073021 Firefox/3.0.13',
'Accept': '
; attic on an old Linux box :-)
>M> That was a quote from A.M. Kuchling.
>M> It's actually hosted on a matchbox-sized multi-core multi-terabyte
>M> wifi-enabled Linux machine that Guido brought back from 2050.
>M> Unfortunately, the dog ate it, so he's had to go a
he exact
>H> number of bytes.
>H>break# leave loop once '1' is found
Mixing an iterator on the file with direct calls (seek/write) isn't
going to work. The iterator does read ahead which causes the file
position not to be
quences' for a reason: that they
are not in standard C++.
test.cpp:
char* temp = "abc\yz";
TEMP> g++ -c test.cpp
test.cpp:1:1: warning: unknown escape sequence '\y'
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list
g.msg').read()
cl = clarify(msgtxt)
gpg=GPG(gnupghome = os.path.join(os.environ['HOME'], '.gnupg'))
if gpg.verify(cl):
print "Signature correct"
else:
print "Signature incorrect"
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list
['spam\nham\neggs\n']
>>>>> bol_re = re.compile('^', re.M)
>>>>> bol_re.split('spam\nham\neggs\n')
>k> ['spam\nham\neggs\n']
>k> Am I doing something wrong?
It says that in the doc of 're':
Note that split
ice from a woman? lol. Thanks for the help.
>SB> Give the attitudes still prevalent in our industry (cf
>SB> <http://tinyurl.com/c5nqju> and many more), I'm sorry to say that I
>SB> don't think this is funny.
seconded
--
Piet van Oostrum
URL: http://pietvanoostr
t;GE> expressions of information. A particular publication
>GE> containing zip code information can be copyrighted. The
>GE> underlying facts themselve cannot be.
But that doesn't help you if you need that information and the only way
to obtain it is from copyrighted sources.
--
Pi
;A> file and I am so lost. Can anyone help or direct me to some
>A> resources? Thank you!
You could try http://sourceforge.net/projects/pyusb/
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list
should be a class, therefore MyBase should be a metaclass. Or is that
not what you want?
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list
which is available for most platforms that have Python whereas
Pycrypto has its own C implementations of crypto algorithms. M2crypto
has a recent release. Also I think because OpenSSL is widely used, its
vulnerabilities are easier detected and corrected, whereas I don't think
that is the case
gt; someone might accidentally type (or intentionally type, having to do
>DM> this in dozens of other programming languages).
You're right. Either hexadecimal should have been 0h or octal should
have been 0t :=)
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private ema
t;VB> ö
>>>>>
>VB> It might be an IDLE issue, but it still isn't one unicode glyph.
>VB> I guess, you have to ensure, that the input data is valid and the
>VB> right encoding is used.
>>> decoded = '\\303\\266'.decode(&qu
ng variable and a literal
>KN> string. Is the difference as simple as:
>KN> somestring = u'hello world'
>KN> fromstring(somestring) <-- string variable
>KN> vs
>KN> XML(u'hello world') <-- literal string
Yes.
Stefan probably means
gt;SDD> .3.100 == 9 (trinary)
>SDD> .Z.100 == 46656 (base 36)
I wonder how you wrote that interpreter, given that some answers are wrong.
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list
cation for data.
Of course they do, but a significant portion of a Python system consists
of imported modules and these are data as far as the OS is concerned.
Only the modules written in C which are loaded as DLL's (shared libs)
and of course the interpreter executable will be share
e the
>>> executable (interpreter) code, and only create a new stack/heap
>>> allocation for data.
>>>
>DA> That's what fork is all about. (See os.fork(), available on most
>DA> Unix/Linux) The two processes start out sharing their state, and only the
>DA
>>>>> sturlamolden (s) wrote:
>s> On 24 Aug, 13:21, Piet van Oostrum wrote:
>>> But os.fork() is not available on Windows. And I guess refcounts et al.
>>> will soon destroy the sharing.
>s> Well, there is os.fork in Cygwin and SUA (SUA is the Un
>>>>> sturlamolden (s) wrote:
>s> On 25 Aug, 01:26, Piet van Oostrum wrote:
>>> That's because it doesn't use copy-on-write. Thereby losing most of its
>>> advantages. I don't know SUA, but I have vaguely heard about it.
>s> SUA is a
ct)
You can also say:
[x+y for x in range(3) for y in range(4) if x < y]
If you want to write this as a loop you have to put the for's on
separate lines separated by colons, so why not the if also? Or would you
also like to have the for's on one line?
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list
locale
>7> LANG=
>7> LC_COLLATE="C"
>7> LC_CTYPE="C"
>7> LC_MESSAGES="C"
>7> LC_MONETARY="C"
>7> LC_NUMERIC="C"
>7> LC_TIME="C"
>7> LC_ALL="C"
IIRC, Mac OS X 10.4 does not set LANG
of roadblocks that have left
>>> me frustrated.
>DBR> Welcome to the wonderful world of SOAP. If you didn't know - the S stands
>DBR> for simple [1].
Stood. Like the O was supposed to stand for Object. Now out of shame
they tend to talk more about `Service Orie
>>>>> Mensanator (M) wrote:
>M> On Aug 26, 4:59 pm, Piet van Oostrum wrote:
>>> >>>>> Mensanator (M) wrote:
>>> >M> That's my point. Since the common usage of "binary" is for
>>> >M> Standard Positional
le the posted code has only 188 lines?
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list
nction that motivated this post would be considerably more
>k> difficult to explain and would have obscured the point of the post.
Classes don't have helper functions; they have methods. Instance
methods, static methods or class methods. Your's isn't either of these.
Methods a
Thanks, now works fine. :-)
>>>>
>>>
>>> And, by the way, how come the traceback refers to
>>> File "backuper.py", line 197, in
>>> while the posted code has only 188 lines?
>>>
>R> Cuz my original code is bit longer - i
ng like Word1%20Word2%20Word3 I want to get Word1
>j> Word2 Word3.
urllib.unquote(string)
>j> Would also like to handle special characters like '",(){}
>j> [] etc/
What would you like to do with them? Or do you mean to replace %27 by ' etc?
--
Piet van Oostr
n! I can't see why.
If you work with matrices, numpy may be interesting for you. It does
have the required functionality: M[:,0] will give you the first column.
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list
e customary meaning of `unary' is the tally system, as a radix
system wouldn't make sense. I don't know when this term came into use
but I have known it for a long time.
--
Piet van Oostrum
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list
woofer is much harder to follow than map, I think.
[myFunc(elt, 'booHoo') for elt in myList] is also a good candidate and
in this case I think it is preferable to both the loop and the map with
a partial or lambda in terms of clarity.
On the other hand when you just want to call a function
t in Python or whether that is to be considered strange should
depend on the availability of a floating point unit in the hardware
where the program runs? Would that make floating point numbers
"fundamentally different" from ints in the sense described above?
--
Piet van Oo
ehave as constant value; 2) mutable numbers, which behave as
>z> variable value?
Numbers are immutable by nature (math). The number 3.14 remains 3.14
whatever you try to do with it. What you call an immutable number is in
fact a container that contains a number. You can change the contents of
601 - 700 of 717 matches
Mail list logo