On Sun, 05 Feb 2006 03:31:24 +, Neil Schemenauer wrote:
> Peter Hansen <[EMAIL PROTECTED]> wrote:
>> More precisely, the state of the function is *saved* when a yield
>> occurs, so you certainly don't *recreate* it from scratch, but merely
>> restore the state, and this should definitely be
On Sun, 05 Feb 2006 05:45:24 +, Avi Kak wrote:
> Hello:
>
> Does Python support a peek like method for its file objects?
>
> I'd like to be able to look at the next byte in a disk file before
> deciding whether I should read it with, say, the read() method.
> Is it possible to do so
On Sun, 05 Feb 2006 19:25:21 +1100, Steven D'Aprano wrote:
> On Sun, 05 Feb 2006 05:45:24 +, Avi Kak wrote:
>
>> Hello:
>>
>> Does Python support a peek like method for its file objects?
>>
>> I'd like to be able to look at the next byte in a disk file before
>> deciding whether I sho
Avi Kak wrote:
> Hello:
>
> Does Python support a peek like method for its file objects?
>
> I'd like to be able to look at the next byte in a disk file before
> deciding whether I should read it with, say, the read() method.
> Is it possible to do so in Python?
>
> Your answer would be m
Here's a version that should work in text mode as well:
fp = file("some file on disk", "r")
b = ""
while 1:
p = fp.tell()
# peek at the next byte; moves file position only if a byte is read
c = fp.read(1)
# decide whether to read it
if c == "?":
# pretend we never read
Steven D'Aprano wrote:
> So on the basis of my tests, there is a small, but significant speed
> advantage to _calling_ a function versus _resuming_ a generator.
now add state handling to your micro-benchmark, and see if the function
example still runs faster.
(hint: functions and generators do d
Alex Martelli wrote:
> As you see, static methods have a small extra lookup cost (a couple
> hundred nanoseconds on my oldish laptop);
I would've expected the opposite effect...I guess the runtime
considers instances more active than the static portion of
a class.
> "Premature
> optimization is
Why is no one talking about ActiveGrid, which at least on the surface
seems to be the most polished way to build web applications in Python
so far. They have a sound financial backing, $10 million when I last
heard, made news on non-Python circles, have a relatively friendly
authoring environment
ye juan schrieb:
> Hi,
>
> Anyone tries to use BeautifulSoup (
> http://www.crummy.com/software/BeautifulSoup/ ) in
> Jython? I can not run that ,the error that Jython
> gives me is: unpack sequence too long.
You've asked that on th jython mailing list and got a negative answer.
What makes you
Hi there,
unfortunately I am new to Jython and my "Jython Essentials" book is
still in the mail. I looked into the Jython API Doc but could not find
the information.
I am porting a Python library to Jython and some parts are missing. My
question basically is where do I find information on what to
Steven D'Aprano wrote:
t1.timeit()
> 0.63980388641357422
...
t2.timeit()
> 0.82081794738769531
>
> So on the basis of my tests, there is a small, but significant speed
> advantage to _calling_ a function versus _resuming_ a generator.
I get the same, but the difference is much less on
Because many authors of books related to Python will be in attendance at
PyCon, we would like to organize a book signing activity. It seems logical
to hold it Saturday night at the party at the Nerdbooks.com bookstore.
Bring your own books or buy new ones in the store!
And if you're an author
On Sun, 05 Feb 2006 09:49:21 +0100, Fredrik Lundh wrote:
> Steven D'Aprano wrote:
>
>> So on the basis of my tests, there is a small, but significant speed
>> advantage to _calling_ a function versus _resuming_ a generator.
>
> now add state handling to your micro-benchmark, and see if the funct
Hi there,
I at the moment port a library from Python to Jython (at lease I try to
do so :-))). The library uses the Rexec to form a type adapter to cast
parameters given as text into the according Jython type. I learned
rexec is not available in Jython. Is something that is commonly used in
Jython
Hi there,
I at the moment port a library from Python to Jython (at lease I try to
do so :-))). The library uses the Rexec to form a type adapter to cast
parameters given as text into the according Jython type. I learned
rexec is not available in Jython. Is something that is commonly used in
Jython
Mark Fink schrieb:
> Hi there,
>
> unfortunately I am new to Jython and my "Jython Essentials" book is
> still in the mail. I looked into the Jython API Doc but could not find
> the information.
> I am porting a Python library to Jython and some parts are missing. My
> question basically is where
I have arranged for the creation of a new mailing list under python.org for
the discussion of software development for PyCon, of any type and for any
year. We've been sending a lot of email privately and making the process
more visible would be good I think. There are a few disjoint efforts an
sorry for the double post!
It is the r_eval() functionality of the rexec module I am looking
forward to replace
--
http://mail.python.org/mailman/listinfo/python-list
this is really funny...
I tried to use eval(String) as an replacement. It works now but the
calculation results from my tests are not as expected: 2 + 3 = 23 !!! 2
- 3 = 2-3...
I have the feeling that there is a really easy solution for this.
Unfortunately I have no enough experience
--
http://ma
Giovanni Bajo wrote:
> Also Python code is pretty bare-metal, so that
> file.write or socket.write go to the syscall immediately. Try that in Java and
> you'll find 30 layers of complex abstractions for doubtful benefits and
> obvious
> slowness.
+1 QOTW
(I'd recommend the whole post but it might
Mark Fink wrote:
> this is really funny...
> I tried to use eval(String) as an replacement. It works now but the
> calculation results from my tests are not as expected: 2 + 3 = 23 !!! 2
> - 3 = 2-3...
> I have the feeling that there is a really easy solution for this.
> Unfortunately I have no en
On Sat, 04 Feb 2006 15:50:00 -0600, Larry Bates wrote:
> Thomas Guettler wrote:
>> Hi,
>>
>> Is there an application like Squirrelmail[1] written in python?
>>
>> I want to access IMAP folder with a web-browser.
>>
>> Google shows me some dead projects. Most webmail applications
>> seem to be w
John J. Lee wrote:
> I guess the same is true of Python in some respects: it's still
> incrementally changing (more than C++, I guess), and isn't all that
> much younger than C++ (around 15 and 23 years old respectively).
But C++ is almost entirely backwards compatible with C, which
adds another d
This is the original code section of the library including the
comments:
class AutoAdapter(TypeAdapter):
"""
This adapter returns a type based on the format of the table cell
contents, following python's rules for literals (plus a few
others).
We could fall back on this when we don'
Hi all!
I use python for writing terminal applications and I have been bothered
by how hard it seems to be to determine the terminal size. What is the
best way of doing this?
At the end I've included a code snippet from Chuck Blake 'ls' app in
python. It seems to do the job just fine on my com
Mark Fink wrote:
> This is the original code section of the library including the
> comments:
> class AutoAdapter(TypeAdapter):
> """
> This adapter returns a type based on the format of the table cell
> contents, following python's rules for literals (plus a few
> others).
> We co
Simon Faulkner wrote:
> Pardon me if this has been done to death but I can't find a simple
> explanation.
>
> I love Python for it's ease and speed of development especially for the
> "Programming Challenged" like me but why hasn't someone written a
> compiler for Python?
>
> I guess it's not
Hello,
I am considering embedding Python in a C++ application, which works
internally in UTF-16. The only API I can find for running scripts is
PyRun_SimpleString(const char*). Does that mean that Python is unable to
execute scripts containing characters from more than one code page?
Thanks,
Hello:
I am using the following versions of Python and packages on Windows XP
(SP2):
Python 2.4.2
NumPy 0.9.4.win32-py2.4
SciPy 0.4.4 for Python 2.4 and Pentium 4/SSE2
In the Python Shell I am running the following:
>>> from scipy.optimize import fmin
>>> def rosen(x):
return su
Keith MacDonald wrote:
> I am considering embedding Python in a C++ application, which works
> internally in UTF-16. The only API I can find for running scripts is
> PyRun_SimpleString(const char*). Does that mean that Python is unable to
> execute scripts containing characters from more than on
>> For short : this was kind of a joke... I understand that what you were
looking for is a 'native code' compiler. AFAIK, this could of course be
done, but due to Python's very dynamic nature, it's not sure this would
lead to drastically better performances.
This is a standard response to a rather
Ravi Teja wrote:
> This is a standard response to a rather frequent question here. But I
> am not sure I ever understood. Scheme / Lisp are about as dynamic as
> Python.
if that were fully true, it would be fairly trivial to translate Python to
scheme or lisp and compile it.
> Another standard r
jason wrote:
> Hello:
>
> I am using the following versions of Python and packages on Windows XP
> (SP2):
>
> Python 2.4.2
> NumPy 0.9.4.win32-py2.4
> SciPy 0.4.4 for Python 2.4 and Pentium 4/SSE2
I fell for that yesterday. Cost me two hours. You have to install NumPy
0.9.2. Make sure you clea
:-))) it works!
I replaced it to "return eval(s)" and the results look extremely well
guess I should get one of this crystal balls myself.
one minor issue is still left:
correct me if I am wrong: result of 2/-3 is 0 (at least this is how it
is defined in the testcase)
In Jython 2.1.3:
>>> 2/-3
-1
On 2006-02-05, Joel Hedlund <[EMAIL PROTECTED]> wrote:
> I use python for writing terminal applications and I have been
> bothered by how hard it seems to be to determine the terminal
> size. What is the best way of doing this?
The way used in the code you found. Alternatively, yould use
ncurses,
> This is a standard response to a rather frequent question here. But I
> am not sure I ever understood. Scheme / Lisp are about as dynamic as
> Python. Yet they have quite efficient native compilers. Ex: Bigloo
> Scheme.
If you provide the necessary annotations for optimization. Not sure about
ru
>
> If you build it, they will come.
>
http://pydotorg.dyndns.org:8000
--
http://mail.python.org/mailman/listinfo/python-list
Hi
Fredrik Lundh schrieb:
> >
> > If you build it, they will come.
> >
>
> http://pydotorg.dyndns.org:8000
Have access-problem.
It's dnynds.org.
Perhabs not everytime Online?
bye
Chris Ditze-Stephan
>
>
___
Chris Ditze-Stephan
Zentric
--
http://mail.python.org/mailman/listinfo/python
Chris Ditze-Stephan wrote:
> > http://pydotorg.dyndns.org:8000
> Have access-problem.
> It's dnynds.org.
no, it's dyndns.org. did you make that typo in the browser too ?
--
http://mail.python.org/mailman/listinfo/python-list
Peter Hansen wrote:
> Ivan, what makes you say that Python is bad for threads? Did the
> qualifcation "concurrently executing/computing" have some significance
> that I missed?
Because of the GIL (Giant interpreter lock). It can be a matter of
opinion, but by "good threading implementation" I
Hi,
Newbie to Python and I have a question please. I am using Windows XP, SPE
0.8.2.a and Python24. I have done this:
import sys
print sys.path
no problem there, sys imports just fine. I have a folder that I called
c\JavaProjects\PythonTesting and it shows up in the output from sys.path
ab
"anon" <[EMAIL PROTECTED]> writes:
> to do an Import on it. This is where things fail. I cannot see the
> contents of my Jar. What am I missing here?
That JARs are for Java and yo're using Python?
--
Jorge Godoy <[EMAIL PROTECTED]>
"Quidquid latine dictum sit, altum sonatur."
- Qualq
I know this is probably a stupid question, but I'm learning Python, and
am trying to get the if function to work with letters/words. Basicly,
I'm trying to write a script that when run, says
Please enter your name:
Then, if the user types myself as the name , the output is OK. Thats
all I want it
anon wrote:
> Would somebody please drop me a hint, please?
>
Yeah, the definition of "JAR" is Java ARchive, why the hell would a
Python script be able to read a JAR in the first place (truth is it is,
a JAR file is nothing but a renamed ZIP, therefore the zipfile module
allows you to read it's
try:
x = raw_input("Please enter your name: ")
--
http://mail.python.org/mailman/listinfo/python-list
Byte wrote:
> x = input(raw_input("Please enter your name: "))
> if x==myself: print 'OK'
>
> It kinda works - I can get to the please enter your name bit but then
> it simply reprints your input as output. Someone please HELP!
>
-->
C:\>python
Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.13
Steven D'Aprano <[EMAIL PROTECTED]> wrote:
> Have you actually measured this, or are you just making a wild
> guess?
I haven't timed it until now but my guess it not so wild. I'm
pretty familiar with the generator implementation (having written
the initial version of it). In Python 2.3, resuming
Hi Byte!
Your code should look like this:
x = raw_input('Please enter your name: ')
if x == 'myself': print 'OK'
Because myself should be a string and not a variable name, you have to
put it in quotes.
Regards, Florian.
--
http://mail.python.org/mailman/listinfo/python-list
Avi Kak wrote:
> Does Python support a peek like method for its file objects?
A short answer is, "No, it does not." Peek was (I believe) put into
Pascal to simplify certain problems; language processing , for example,
is drastically simplified by 1-character look-ahead. Pascal was
designed as
Florian Nykrin, that works! Thanks!
p.s. Xavier Morel, you seem to be using Windows, not Linux, and I got
the idea of stacking input on a raw_input from the official Python
Tutorial.
--
http://mail.python.org/mailman/listinfo/python-list
On 2/5/06, Ivan Shevanski <[EMAIL PROTECTED]> wrote:
On 2/5/06, Florian Nykrin <[EMAIL PROTECTED]
> wrote:
Hi Byte!Your code should look like this:x = raw_input('Please enter your name: ')if x == 'myself': print 'OK'
Because myself should be a string and not a variable name, you have toput it
On 2/5/06, Ivan Shevanski <[EMAIL PROTECTED]> wrote:
On 2/5/06, Ivan Shevanski <[EMAIL PROTECTED]
> wrote:
On 2/5/06, Florian Nykrin <[EMAIL PROTECTED]
> wrote:
Hi Byte!Your code should look like this:x = raw_input('Please enter your name: ')if x == 'myself': print 'OK'
Because myself shou
Byte wrote:
> p.s. Xavier Morel, you seem to be using Windows, not Linux, and I got
> the idea of stacking input on a raw_input from the official Python
> Tutorial.
link, please.
--
http://mail.python.org/mailman/listinfo/python-list
Use "input" to enter numbers, and "raw_input" to enter strings.
For example:
x = input('Enter your age: ')
y = raw_input('Enter your name: ')
--
http://mail.python.org/mailman/listinfo/python-list
Byte wrote:
> p.s. Xavier Morel, you seem to be using Windows, not Linux
what makes you think that basic Python functions work in radically
different ways on different platforms ?
--
http://mail.python.org/mailman/listinfo/python-list
That document did help, thanks, although I was initially disconcerted to see
that it's written in the future tense. Anyway, it works with Python 2.4.
Keith MacDonald
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> reading PEP 263 might help:
>
>http://www.py
Thanks.
After executing the first line, I now get:
>>> from scipy.optimize import fmin
Overwriting fft= from scipy.fftpack.basic (was
from numpy.dft.fftpack)
Overwriting ifft= from scipy.fftpack.basic (was
from numpy.dft.fftpack)
And then I get the following result:
>>> xopt = fmin(rosen, x
>what makes you think that basic Python functions work in radically
different ways on different platforms ?
Assumption. Im also new to programing, so could do something stupid
like think a Windows path is a command/input/etc. (really, ive done
things like that before.)
Now, im running this on a t
http://docs.python.org/tut/node6.html#SECTION00610
--
http://mail.python.org/mailman/listinfo/python-list
Byte <[EMAIL PROTECTED]> wrote:
> http://docs.python.org/tut/node6.html#SECTION00610
I think you're confusing the tutorial's use of:
int(raw_input(...
which means "get a string from the user and turn it into an integer" (a
very common idiom), with your use of:
input(raw_inp
Hello!
This question does not concern programming in python, but how to manage
python processes. Is there a way to "name" a python process? At least
on Linux, if I have two python programs running, they both run under
the name "python"
#pidof program1.py
[empty line]
#pidof program1.py
[empty lin
Byte wrote:
> p.s. Xavier Morel, you seem to be using Windows, not Linux
>
I don't see how this may even remotely be relevant, Python is cross
platform and (mostly) works the same regardless of the OS
> I got
> the idea of stacking input on a raw_input from the official Python
> Tutorial.
>
Byte wrote:
> http://docs.python.org/tut/node6.html#SECTION00610
>
-->
>>> x = int(raw_input("Please enter an integer: "))
<--
Unless my eyes fail me, it's written "int", not "input", the goal of
this line is to convert the return value of raw_input (a string) into an
integer.
Thanks, never knew that, but they are using raw_input as a stack,
aren't they?
--
http://mail.python.org/mailman/listinfo/python-list
Byte wrote:
> Assumption. Im also new to programing, so could do something stupid
> like think a Windows path is a command/input/etc. (really, ive done
> things like that before.)
>
Don't assume anything when you have no reason to, and especially don't
assume that a cross-platform programming lan
Yes, sorry, didnt realise diffrence between int and input. Since i'm
such an idiot at this, any links to sites for people who need an
unessicerily gentle learning curve?
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
> Ravi Teja wrote:
>
> > This is a standard response to a rather frequent question here. But I
> > am not sure I ever understood. Scheme / Lisp are about as dynamic as
> > Python.
>
> if that were fully true, it would be fairly trivial to translate Python to
> scheme or lisp a
from scipy.optimize import fmin
> Overwriting fft= from scipy.fftpack.basic (was
> from numpy.dft.fftpack)
> Overwriting ifft= from scipy.fftpack.basic (was
> from numpy.dft.fftpack)
>
> And then I get the following result:
>
xopt = fmin(rosen, x0)
> Optimization terminated successf
MackS schrieb:
> Hello!
>
> This question does not concern programming in python, but how to manage
> python processes. Is there a way to "name" a python process? At least
> on Linux, if I have two python programs running, they both run under
> the name "python"
>
> #pidof program1.py
> [empty li
Fredrik Lundh wrote:
>>
>> If you build it, they will come.
>>
>
> http://pydotorg.dyndns.org:8000
Very cool. I'd love to see something like this on the actual website...
Is the hope that in the real python.org version edits will show up
immediately, as they do in your version? Or that the
jason wrote:
> Thanks.
>
> After executing the first line, I now get:
>
from scipy.optimize import fmin
>
> Overwriting fft= from scipy.fftpack.basic (was
> from numpy.dft.fftpack)
> Overwriting ifft= from scipy.fftpack.basic (was
> from numpy.dft.fftpack)
>
> And then I get the followi
Ivan Voras wrote:
> Peter Hansen wrote:
>>Ivan, what makes you say that Python is bad for threads? Did the
>>qualifcation "concurrently executing/computing" have some significance
>>that I missed?
>
> Because of the GIL (Giant interpreter lock).
> ...
> Much can be said about "at the same time"
Hi!
I couldn't find anything on creating a new linux user account in
Python documentation.
Anyone has any experience with this? You just run useradd command in
shell or is there a more pythonic way?
Thanks, Sebastjan
--
http://mail.python.org/mailman/listinfo/python-list
>parse the expression, extract the operands and the operation, apply the
operation to the operands
How? Give me some example code, but please keep it simple.
>are you trying to code a calculator?
Not intending to, just trying to learn Python. Suppose what i'm trying
to code is a but like a CLI c
On Sun, 05 Feb 2006 17:16:38 +0100, Xavier Morel <[EMAIL PROTECTED]> wrote:
> anon wrote:
>> Would somebody please drop me a hint, please?
>>
> Yeah, the definition of "JAR" is Java ARchive, why the hell would a
> Python script be able to read a JAR in the first place
You are rude to an obvious
Simon Faulkner wrote:
> Pardon me if this has been done to death but I can't find a simple
> explanation.
>
> I love Python for it's ease and speed of development especially for the
> "Programming Challenged" like me but why hasn't someone written a
> compiler for Python?
>
> I guess it's not that
On 5 Feb 2006 09:10:04 -0800, MackS <[EMAIL PROTECTED]> wrote:
> Hello!
>
> This question does not concern programming in python, but how to manage
> python processes. Is there a way to "name" a python process? At least
> on Linux, if I have two python programs running, they both run under
> the na
Is it possible to get the system date on a Windows XP machine? Most
Convenient would to retrieve , MM, and DD as seperate variables.
When I say system date, I'm thinking of the small clock in the
lower-right hand corner, which has date as well as time, but if there's
another clock that Python
Actually optimizations are not what concern me. I am pretty happy with
Pyrex/Swig etc for that. What I want is the ability to make a native
DLL/SO. A whole lot easier to integrate/embed to other languages.
--
http://mail.python.org/mailman/listinfo/python-list
Dustan:
>Is it possible to get the system date on a Windows XP machine?
Most certainly:
http://www.python.org/doc/lib/module-time.html
--
René Pijlman
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 05 Feb 2006 16:14:54 +, Neil Schemenauer wrote:
> Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>> Have you actually measured this, or are you just making a wild
>> guess?
>
> I haven't timed it until now but my guess it not so wild. I'm
> pretty familiar with the generator implementati
On Wed, 01 Feb 2006 13:41:33 GMT, Roel Schroeven <[EMAIL PROTECTED]> wrote:
> Roy Smith schreef:
...
>> /* */ also allows for some truly spectacularly bad coding practices. Not
>> long ago, I ran into some real-life code where a previous developer had
>> commented out about 50 lines of C++ code
Dustan,
Python has a module called, appropriately, "time". Like most things in
Python, it's fairly simple and straightforward to use.
The module is documented here:
http://docs.python.org/lib/module-time.html
Breifly, though, the format you want is built right into time:
>>> import time
>>> now
Anyone familiar with PHP? I'm trying to make a translation. In PHP you
can get the current object's name by going like this:
get_class(item) == 'ClassName'
I've tried type(item), but since I can't be sure if I'll be in __main__
or as a child object, I can't guarantee what that value will return,
Byte wrote:
>> parse the expression, extract the operands and the operation, apply the
> operation to the operands
>
> How? Give me some example code, but please keep it simple.
>
>> are you trying to code a calculator?
>
> Not intending to, just trying to learn Python. Suppose what i'm trying
>
Hi all,
I am very new to Python programming. I am writing a program to manage
wireless connections, this is for GNOME on Linux. I present the user with
a "connect" button. I want to handle the connection for them slightly
different depending on whether or not the wireless access point they are
try
> Is there a simple way to get the current object's name? You would think
> __name__ would work, right? It doesn't.
className = item.__class__.__name__
> I'd like to avoid passing a reference to an object's parent in
> __init__, but is there a built in way in Python to say "You, Parent
> Object,
Ravi Teja wrote:
> This is a standard response to a rather frequent question here. But I
> am not sure I ever understood. Scheme / Lisp are about as dynamic as
> Python. Yet they have quite efficient native compilers. Ex: Bigloo
> Scheme.
You might be missing two details here:
1. those compilers a
I'm looking for examples of "best practices" in Tkinter/Python
programming. What are the most prominent Python applications out there
that use Tkinter as the GUI toolkit? These can be commercial or
open-source, but are preferably multi-platform.
I know IDLE is written in Tkinter, so that's one exa
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
I asked to keep it simple! Anyway, ill try Dive into Python, thanks
--
http://mail.python.org/mailman/listinfo/python-list
Farshid,
This is a great help, thanks.
The second point won't work, though, because by parent class I mean,
simply, the object that created the current object, *not* the class the
current class is based on.
So, for example:
class A(object):
def __init__(self):
self.thing = Thing()
Thanks for all the replies. I'm admittedly new to GUI programming, so
I'm making sure to read up on the MVC pattern and related things like
the observer pattern. I appreciate the help.
Jared
--
http://mail.python.org/mailman/listinfo/python-list
> Which details? We'd be happy to explain the code. Not that
> you need to understand the details to use the code.
OK, why '1234' in here, and what's termios.TIOCGWINSZ, and how should I
have known this was the way too do it?
fcntl.ioctl(fd, termios.TIOCGWINSZ, '1234')
Am I interpreting C str
Byte <[EMAIL PROTECTED]> wrote:
> Thanks, never knew that, but they are using raw_input as a stack,
> aren't they?
No. raw_input is a function object, "using it as a stack" is a rather
meaningless phrase. You can use a list as a stack, but that's totally
and absolutely unrelated to that spot in
Dustan <[EMAIL PROTECTED]> wrote:
> Is it possible to get the system date on a Windows XP machine? Most
> Convenient would to retrieve , MM, and DD as seperate variables.
>
> When I say system date, I'm thinking of the small clock in the
> lower-right hand corner, which has date as well as ti
Sebastjan Trepca wrote:
> I couldn't find anything on creating a new linux user account in
> Python documentation.
> Anyone has any experience with this? You just run useradd command in
> shell or is there a more pythonic way?
Just run useradd.
--
http://mail.python.org/mailman/listinfo/python-l
Dave wrote:
> The second point won't work, though, because by parent class I mean,
> simply, the object that created the current object, *not* the class the
> current class is based on.
Good you clarified that, because "parent" definitely isn't used that way
by most other people here. And, in fa
Duncan Booth wrote:
> Steven D'Aprano wrote:
>>So on the basis of my tests, there is a small, but significant speed
>>advantage to _calling_ a function versus _resuming_ a generator.
>
> I get the same, but the difference is much less on my system:
With Python 2.4? Doesn't surprise me a bit.
I t
Xavier Morel wrote:
> Where the hell did you get the idea of stacking input on a raw_input in
> the first place?
I'm guessing it goes something like: "input is a verb, but raw_input
is a noun, so raw_input looks like a cast or conversion or stream
constructor, and input looks like an action..."
1 - 100 of 162 matches
Mail list logo