>>>>> "Andy" == Andy <[EMAIL PROTECTED]> writes:
> if keyword.iskeyword(tempwords):
> print tempwords
for word in tempwords:
if keyword.iskeyword(word):
print word
Ganesan
--
Ganesan Rajagopal
--
http://ma
suggested for the actual declarations of local variables,
> and no discussion whether this is meant to apply to local variables
> only, or also to global variables and object attributes.
None of the above links talk about variable declarations but object
attributes are considered.
Ganesan
--
Ganesan Rajagopal
--
http://mail.python.org/mailman/listinfo/python-list
self.child.logfile = sys.stdout
That should give you some clue.
Ganesan
--
Ganesan Rajagopal
--
http://mail.python.org/mailman/listinfo/python-list
the requirement. If the intention is to just to
discourage someone with messing around with some config
settings, it's good enough. If the user can figure out that
it's base64 encoded and takes pains to decode, modify, encode
and save it back, then he's earned the right to mess around
fuscate the string. How about this?
import base64
text = 'supercalifragilisticexpialidocius'
open('sambleb.conf', 'w').write(base64.encodestring(text))
print base64.decodestring(open('sambleb.conf', 'r').read())
Ganesan
--
Ganesan Rajagopal
--
http://mail.python.org/mailman/listinfo/python-list
27;module' object has no attribute 'randrange'
>>>>
> Here it does not work.
Here's a clue.
==
>>> import numpy
>>> numpy.random
===
Ganesan
--
Ganesan Rajagopal
--
http://mail.python.org/mailman/listinfo/python-list
hreads stack size is
8MB. Linux user space is 3GB (Kernel is mapped at upper 1GB).
382 * 8 = 3056MB.
Basically, you're running out of address space. I don't know if you have any
control at python level. In C you can call pthread_attr_setstacksize().
Ganesan
--
Ganesan Rajagopal
--
http://mail.python.org/mailman/listinfo/python-list
fter. He's seems to be looking for
points when the direction changes.
Ganesan
--
Ganesan Rajagopal
--
http://mail.python.org/mailman/listinfo/python-list
Linux to set these parameters before you use
pexpect.
Ganesan
--
Ganesan Rajagopal
--
http://mail.python.org/mailman/listinfo/python-list
, but in some restricted cases, yes. See
http://forum.nokia.com/python
--
Ganesan Rajagopal
--
http://mail.python.org/mailman/listinfo/python-list
n binary. In your case it's
obvious that the python binary is linking to a shared python library.
Ganesan
--
Ganesan Rajagopal
--
http://mail.python.org/mailman/listinfo/python-list
labitiy, what if
> the file was huge, like some sort of log file.
Considering that you've already read in the whole file into a list, it's too
late to worry about scalability when writing out :-). Have you considered
the fileinput module?
Ganesan
--
Ganesan Rajagopal
--
http://mail.python.org/mailman/listinfo/python-list
>const struct pam_conv *pam_conv, pam_handle_t **pamh)
Note that pam_conv is a structure. Passing a string 'PAM_PROMPT_ECHO_ON' and
not passing a pointer for getting the pam_handle_t are both candidates to
cause a crash.
Ganesan
--
Ganesan Rajagopal
--
http://mail.python.org/mailman/listinfo/python-list
umber. It's sufficient to do
while d.has_key(key):
key += 1
> I am a little surprised that hash(hash(s)) == hash(s), is that actually
> true?
>>> hash(42)
42
Ganesan
--
Ganesan Rajagopal
--
http://mail.python.org/mailman/listinfo/python-list
>>>>> Helmut Jarausch <[EMAIL PROTECTED]> writes:
> Using sys.exit(0) produces an error message which looks dangerous to an
> uninitiated user.
What message? Your program should exit silently when you call sys.exit(0).
Ganesan
--
Ganesan Rajagopal
--
http://mail.
elif i == 2:print 2
> elif i == 3:print 3
You don't need the second pattern, the first pattern will catch the second
case also. You also need to break when i == 2 or i == 3.
Ganesan
--
Ganesan Rajagopal
--
http://mail.python.org/mailman/listinfo/python-list
plete. Put the body
of the "try:" in a while loop.
Ganesan
--
Ganesan Rajagopal
--
http://mail.python.org/mailman/listinfo/python-list
useful fro debugging
> import pexpect
> cmd = '/usr/bin/rsync config [EMAIL PROTECTED]:/tmp/.'
> #cmd = 'ssh [EMAIL PROTECTED]'
> child = pexpect.spawn(cmd)
Add "child.logfile = sys.stdout" here and check what's going on.
Ganesan
--
Ganesan Rajagopal
--
http://mail.python.org/mailman/listinfo/python-list
>>>>> sinan nalkaya <[EMAIL PROTECTED]> writes:
> i want to use rsync for remote file transfer via popen, but couldnt pass
> the Password yet.
For interactive input try the pexpect module instead of popen (see
http://pexpect.sf.net).
Ganesan
--
Ganesan Rajagopal
the US. The site is a directory of
URLs.
Ganesan
--
Ganesan Rajagopal
--
http://mail.python.org/mailman/listinfo/python-list
file is huge. Even if it's only a CD image (approx
650MB), reading it all into memory in a single string is not a good idea.
> The python zipfile module is obviously broken...
Indeed. I am surprised that there is no API that returns a file object.
Ganesan
--
Ganesan Rajagopal
--
http://mail.python.org/mailman/listinfo/python-list
only if you create the table after the connect.
Ganesan
--
Ganesan Rajagopal (rganesan at debian.org) | GPG Key: 1024D/5D8C12EA
Web: http://employees.org/~rganesan| http://rganesan.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
>>>>> Liyana Robert <[EMAIL PROTECTED]> writes:
> Pls help me to know About undisclosed recipient.
> How we can sent mails to other like this.
Use Bcc header instead of To or Cc.
Ganesan
--
Ganesan Rajagopal
--
http://mail.python.org/mailman/listinfo/python-list
sting C app.
What platform? Linux includes a regex(7) implementation in the C
library. However, it doesn't support many of the extensions that Python
regexes support. Try http://www.pcre.org/. There are pre-build binaries for
Windows also.
Ganesan
--
Ganesan Rajagopal (rganesan
the default debian
python. You have two alternatives:
1. Compile the python packages manually.
2. Debian already has python 2.4. Install python2.4 using synaptic. Also
install any required python2.4-* packages. You will need a symlink to
make sure you get python2.4 by default.
Ganesan
>>>>> mike klaas <[EMAIL PROTECTED]> writes:
> Thanks guys, that is probably the most ridiculous mistake I've made in
> years
I was taken too :-). This is quite embarassing, considering that I remember
reading a big thread in python devel list about this a w
oduce this on Debian Linux testing, both python 2.3 and python
2.4. Seems like a bug. search() also exhibits the same behavior.
Ganesan
--
Ganesan Rajagopal (rganesan at debian.org) | GPG Key: 1024D/5D8C12EA
Web: http://employees.org/~rganesan| http://rganesan.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
>>>>> "Fredrik" == Fredrik Lundh <[EMAIL PROTECTED]> writes:
> Ganesan Rajagopal wrote:
>>> unicodeStrFromNetwork = '\u5927'
>>> unicodeStrNative = _unicodeRe(unisub, unicodeStrFromNetwork)
>>
>> How about unicodeStr
t; unicodeStrNative = _unicodeRe(unisub, unicodeStrFromNetwork)
How about unicodeStrNative = eval("u'%s'" % (unicodeStrFromNetwork,))
Ganesan
--
Ganesan Rajagopal (rganesan at debian.org) | GPG Key: 1024D/5D8C12EA
Web: http://employees.org/~rganesan| http://rganesan.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
>>>>> Alex Martelli <[EMAIL PROTECTED]> writes: > Ordered
*by order of key insertion*: Java, PHP > Ordered *by other
criteria*: LISP, C++ Java supports both ordered by key insertion
(LinkedHashMap) as well as ordered by key comparison (TreeMap).
Ganesan
--
Gan
order. Java calls this
a SortedMap. See
http://java.sun.com/j2se/1.4.2/docs/api/java/util/SortedMap.html
C++ STL map container is also a Sorted Associative container. See
http://www.sgi.com/tech/stl/Map.html Ganesan
--
Ganesan Rajagopal (rganesan at debian.org) | GPG Key:
1024D/5D8C12EA We
script as the new user? Or do you want to run other commands as teh
new user? In any case, take a look at pexpect
(http://pexpect.sourceforge.net) and see if it fits your purpose.
Ganesan
--
Ganesan Rajagopal (rganesan at debian.org) | GPG Key: 1024D/5D8C12EA
Web: http://employees.org/~rgane
gadfly (http://gadfly.sourceforge.net/gadfly.html) or
KirbyBase (http://www.netpromi.com/kirbybase.html) but they are also
separate packages to install. I would personally stick with SQLite.
Ganesan
--
Ganesan Rajagopal (rganesan at debian.org) | GPG Key: 1024D/5D8C12EA
Web: http://employees.org/~rganesan| http://rganesan.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
b = b.tostring()
> or
> b = "".join([chr(ord(c) ^ 255) for c in a])
I wish python would soon get a byte array type. For now I find numarray to
be very convenient to do stuff like this.
import numarray
b = (numarray.array(a, type = 'u1') ^ 255).tostring()
It
>>>>> "billie" == billie <[EMAIL PROTECTED]> writes:
> Piet van Oostrum wrote:
>> I think you need something like pyexpect for this.
> PyExpect seems to be no more mantained.
Try pexpect instead. http://pexpect.sourceforce.net/
Ganesan
--
Ganesan R
ussions
on libraries in python-dev. Is there some other list with more discussions
on libraries?
Ganesan
--
Ganesan Rajagopal (rganesan at debian.org) | GPG Key: 1024D/5D8C12EA
Web: http://employees.org/~rganesan| http://rganesan.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
o see the DB API move forward, and experimental new innovations
like static typing (with automatic type inferencing), stackless python
etc. If the experiments don't survive, fine. It's still better than
quibbling over minor syntactic detail.
Ganesan
--
Ganesan Rajagopal (rganesan at debian.org) | GPG Key: 1024D/5D8C12EA
Web: http://employees.org/~rganesan| http://rganesan.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
on't care about the child process
> anymore. I would effectively want to "detach" from it.
How about just calling close(), i.e. without wait=1? No need to spawn a new
thread.
Ganesan
--
Ganesan Rajagopal (rganesan at debian.org) | GPG Key: 1024D/5D8C12EA
Web: http://
>>>>> "darren" == darren kirby <[EMAIL PROTECTED]> writes:
> quoth the Ganesan Rajagopal:
>> I am stuck on level 3. I've tried every re that I can think of. Some body
>> give me a clue.
>>
>> Ganesan
>>
>> --
>> G
I am stuck on level 3. I've tried every re that I can think of. Some body
give me a clue.
Ganesan
--
Ganesan Rajagopal
--
http://mail.python.org/mailman/listinfo/python-list
ww.everything2.com/index.pl?node_id=1409551
Ganesan
--
Ganesan Rajagopal (rganesan at debian.org) | GPG Key: 1024D/5D8C12EA
Web: http://employees.org/~rganesan| http://rganesan.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
41 matches
Mail list logo