loial wrote:
Can anyone be a little more helpful than Tino?
I'll do some freebie hints :-)
What I would do is try first whether key authentication works at all,
for example following a tutorial like
http://the.earth.li/~sgtatham/putty/0.53b/htmldoc/Chapter8.html
And if that works translate
MRAB wrote:
Dennis Lee Bieber wrote:
On Wed, 18 Feb 2009 21:22:45 +0100, Peter Otten <__pete...@web.de>
declaimed the following in comp.lang.python:
Steve Holden wrote:
Jervis Whitley wrote:
What happens when you have hundreds of megabytes, I don't know.
I hope I never have to test a wor
sible, but
let me know if you want to do something that isn't currently possible!
I find it useful myself, so I hope someone else will. Please give me any
feedback you might have about the program itself or the webpage!
The project is available at http://pymei.org/ and
http://code.goog
Aaron Watters wrote:
On Nov 30, 11:55 am, "Filip Gruszczyński" <[EMAIL PROTECTED]> wrote:
http://jcalderone.livejournal.com/39794.html
That's exactly what I have read before posting here ;-)
--
Filip Gruszczyński
I too would like to see a meatier discussion of best practices
for python packa
Warren DeLano wrote:
A bottom line / pragmatic question... hopefully not a FAQ.
Why was it necessary to make "as" a reserved keyword?
Because it can be used at the import statement to let the imported thing
be known under another name?
Something like:
>>> import xml.etree.ElementTree as E
Martin P. Hellwig wrote:
Warren DeLano wrote:
A bottom line / pragmatic question... hopefully not a FAQ.
Why was it necessary to make "as" a reserved keyword?
Because it can be used at the import statement to let the imported thing
be known under another name?
Some
Steven D'Aprano wrote:
On Wed, 03 Dec 2008 22:02:24 +, Martin P. Hellwig wrote:
Warren DeLano wrote:
A bottom line / pragmatic question... hopefully not a FAQ.
Why was it necessary to make "as" a reserved keyword?
Because it can be used at the import statement to let the
Steven D'Aprano wrote:
import os, fcntl
oldname = "ham.txt"
newname = "spam.txt"
def lock_destination(name):
fileno = os.open(name, os.O_CREAT | os.O_EXCL)
fcntl.flock(fileno, fcntl.LOCK_EX) # POSIX systems only
return fileno
# Create a test file to be renamed.
f = open(oldname, '
News123 wrote:
What's more painful is to learn which functianilty is in which library
and which library exists.
Yes and one mistake I still often find myself doing is, when confronted
with a particular problem, that I write some helper code to deal with
it. Of course later on I discover tha
Kevin Walzer wrote:
Hello,
I'm trying to move from os.popen to using subprocess, and I'm having
trouble with the pipe suddenly closing.
My old code looked something like this:
Hi Kevin,
You could try something more like:
>>> import subprocess
>>> cmd = subprocess.Popen([executable_path,
On behalf of the EuroPython 2009 organisation it is my privilege and
honour to announce the 'Call for Participation' for EuroPython 2009!
EuroPython is the conference for the communities around Python,
including the Django, Zope and Plone communities.
This year's conference will be held in Birmin
On behalf of the EuroPython 2009 organisation it is my privilege and
honour to announce the 'Call for Participation' for EuroPython 2009!
EuroPython is the conference for the communities around Python,
including the Django, Zope and Plone communities.
This years conference will be held in Birming
s...@pobox.com wrote:
Is there some online troll game
running where the players earn points for generating responses to their
posts?
You just got 10 points ;-)
--
mph
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 11, 9:19 pm, Jillian Calderon <[EMAIL PROTECTED]>
wrote:
> How do I define a 2d list?
>
> For instance, to define a 4 by 5 list, I wanted to do this:
> n=4
> m=5
> world = [n][m]
> However, it gives me an invalid syntax error saying the index is out
> of range.
Here are some examples of how
On behalf of the EuroPython 2009 organisation it is my privilege and
honour to announce that EuroPython 2009 is open for registration!
EuroPython is the conference for the communities around Python,
including the Django, Zope and Plone communities.
This year's conference will be held in Birming
bearophileh...@lycos.com wrote:
Living on a small fitness plateau isn't good, even if it's very high,
because it's evolutionary unstable :-(
Actually I think, in biological sense speaking [citation needed], if one
path has an advantage over the other path, even if the other path is in
majori
odeits wrote:
I am looking to clean up this code... any help is much appreciated.
Note: It works just fine, I just think it could be done cleaner.
The result is a stack of dictionaries. the query returns up to
STACK_SIZE ads for a user. The check which i think is very ugly is
putting another con
Martin P. Hellwig wrote:
def query_parser(QUERY, USER, STACK_SIZE):
indexes = ['ni','adid','rundateid','rundate','city','state','status']
empty = 'None'
stack = []
query_result = self.con
Martin P. Hellwig wrote:
while I am at it :-)
if ignore == False:
is probably cleaner when written
if not ignore:
--
mph
--
http://mail.python.org/mailman/listinfo/python-list
Wensui Liu wrote:
i started learning python with earlier version and am happy with it
and all related packages, such as scipy, pywin, and so on.
right now, i am wondering if i should move to python3. if i do, will
all packages working on earlier version still work in python3? this is
my major con
R. David Murray wrote:
Comparing Python releases to Windows releases is...disturbing :)
That was why I was very carefully in this example for choosing 2000 :-)
--
mph
--
http://mail.python.org/mailman/listinfo/python-list
RT wrote:
Can you recommend any books or articles that you have found offer
useful advice on program structure, design and use of classes or any
other features or best practices that you feel are important for
professional Python development.
In my opinion, 'professional development' has sur
Philip Semanchuk wrote:
On Mar 12, 2009, at 4:20 PM, Daniel Fetchinson wrote:
Even more amazingly, it takes approximately 30% less time to say
'ruby' than to say 'python'!!!
But "python" scores 55% more points than "ruby" in Scrabble, so that's
understandable. It also explains why both la
Lie Ryan wrote:
But ruby don't bite...
Neither does a python, it is a constrictor, meaning it has a firm grip
on the modules imported :-)
--
mph
--
http://mail.python.org/mailman/listinfo/python-list
Ekkard Gerlach wrote:
Hi,
is tkinter able to start a windows without the frame of the according
window manager? (only needed for Linux, KDE desktop)
The window should only be closed by click on a button within the window!
I should not be moved, it should not be close, ... and so on. The
soluti
Raymond Hettinger wrote:
On Mar 25, 7:38 am, srinivasan srinivas
wrote:
For ex: to check list 'A' is empty or not..
if A == []:
if A.count == 0:
if len(A) == 0:
if not A:
PEP 8 recommends the latter.
Raymond
I can't seem to find where this recommendation is mentioned or implied.
Personall
Albert Hopkins wrote:
On Wed, 2009-03-25 at 21:26 +, Martin P. Hellwig wrote:
PEP 8 recommends the latter.
Raymond
I can't seem to find where this recommendation is mentioned or implied.
Wow, you must not have looked very hard:
1. Point your browser to http://www.python.or
Tim Chase wrote:
Is it an upgrade from
from urllib import urlopen
bs = urlopen("http://xahlee.org";).read()
Yes it is. Although both produce random quantities of text, only the
name can be interpreted offensive, not the content.
--
mph
--
http://mail.python.org/mailman/listinfo/python-l
Rustom Mody wrote:
I don't think this is necessary a python problem but a generic, SUID
scripts considered dangerous, problem.
The essence of your program is that you only want information, that is
great! Since that makes it all a bit simpler.
How about writing a cronjob that outputs the re
一首诗 wrote:
But I think the first step to resolve a problem is to describe it. In
that way, I might find the answer myself
That is an excellent approach, knowing you have a problem and describing
it is actually the hardest part of a design, the rest is more like a puzzle.
What I guess so fa
Steven D'Aprano wrote:
If you have too much code in one file, it will upset the balance of the
spinning hard drive platter, and it will start to wobble and maybe even
cause a head-crash.
That is why proper designed operating systems, like windows 95,rarely
write one continuous block but spre
grkunt...@gmail.com wrote:
If I am writing in Python, since it is dynamically, but strongly
typed, I really should check that each parameter is of the expected
type, or at least can respond to the method I plan on calling ("duck"
typing). Every call should be wrapped in a try/except statement to
ouce public-money-
> funded vaporwere that has tried to do too much).
How about moving these lines to a separate message with a matching
header?
Regards, Joe. P. Cool
--
http://mail.python.org/mailman/listinfo/python-list
cwurld wrote:
Hi,
I am having some trouble getting cx_Oracle to work. When I try to
import cx_Oracle, I get the following error message:
ImportError: DLL load failed: %1 is not a valid Win32 application.
I am using Python 2.6 on WIndows. Oracle Client 10g.
Any ideas?
Thanks
Hmm some time a
Daniel Fetchinson wrote:
[off but interesting topic]
What would be the corresponding database layout that would scale and I
could get the total number of legs in the zoo or total number of
animals in the zoo without join(s)?
Cheers,
Daniel
[/off but interesting topic]
That all comes down
Daniel Fetchinson wrote:
Well, I gave the concrete example of zoo/cage/animal/leg because this
*is* the business logic. I need to know for example the total number
of animals, this is pretty understandable if you have a zoo. Or you
mean that I should give another example?
It might be the busin
Daniel Fetchinson wrote:
In an relational database setting you would have a table for artists,
a table for cd's and a table for songs and a table for comments where
people can comment on songs. All of this with obvious foreign keys.
Now you want to display on your website the total number of cd'
Michael Torrie wrote:
Aahz wrote:
Why do you want to do that? Before you answer, make sure to read this:
http://www.u.arizona.edu/~rubinson/copyright_violations/Go_To_Considered_Harmful.html
Somebody better tell the Linux kernel developers about that! They
apparently haven't read that yet.
Daniel Fetchinson wrote:
Thanks, this wikipedia entry was actually very useful as well as your
other comments.
Thanks again,
Daniel
Your welcome, I usually take quite a lot of effort into designing before
I start coding. One tool I found very helpful was DIA, especially the
UML section. Ha
zaheer.ag...@gmail.com wrote:
hi
I am from java background, I have written some code that actually
works :)
Need to some one to look at it and tell me if there are better ways of
doing same things
Will some one help?
Thanks
My crystal ball is a bit cloudy today so forgive me if my suggestion
Emmanuel Surleau wrote:
What makes you think Python is "an OO language"?
Python is a dynamic object-oriented programming language that can be used
for many kinds of software development.
First line on the Python official website. Was this a trick question?
What kind of OO
language allows y
mercur...@googlemail.com wrote:
Hi guys,
I have decided to learn Python a little more than I already do.
Very good!
But I found few problems,
I am not sure what will happen if I do the programing in python the
find the program
doesn't deliver the desired performance due to lack of a good
com
Marco Bizzarri wrote:
On Fri, Apr 24, 2009 at 7:57 AM, Good Z wrote:
Hello All,
I need to digitally sign a document in python. Is there any equivalent
directory in Python like the DigitalSigner we have in Java.
Best Regards,
Mike
Maybe you could take a look at M2Crypto?
http://chandlerp
Carbon Man wrote:
I have a program that is generated from a generic process. It's job is to
check to see whether records (replicated from another system) exist in a
local table, and if it doesn't, to add them.
To answer the topic question, it would be limited to the memory your
platform can
kc.pyt...@gmail.com wrote:
Hi All,
Is it possible to "automate" the installation of python software(2.5)
without the need of pressing "Next" so many times?
Below is the platform in which it should be installed.
OS : windows
Thanks & Regards,
Kalyan.
Distribute the msi using Active Directories
mark.sea...@gmail.com wrote:
Hi;
I am trying to retrieve financial data off website for stock market
analysis. Just hobby not for pay. I actually am impressed that
urllib2 and BeautifulSoup work pretty well to do what I want, and the
first little routine actually gets the data from the web pag
mark.sea...@gmail.com wrote:
On May 1, 5:57 pm, "Martin P. Hellwig"
wrote:
mark.sea...@gmail.com wrote:
Hi;
I am trying to retrieve financial data off website for stock market
analysis. Just hobby not for pay. I actually am impressed that
urllib2 and BeautifulSoup work pretty
grocery_stocker wrote:
Let's say there is a new zip file with updated information every 30
minutes on a remote website. Now, I wanna connect to this website
every 30 minutes, download the file, extract the information, and then
have the program search the file search for certain items.
Would it
Jelle Smet wrote:
Hi list,
My goals is to have concurrent and separated client sessions using xmlrpc.
Initially my though was that SimpleXMLRPCServer was able to create a new
object instance for each incoming request.
But this doesn't appear to be the case, unless I'm overlooking something,
if s
Piet van Oostrum wrote:
goo...@smetj.net (g) wrote:
g> Well, I think Martin's example will suit my needs.
g> Thanks for the explanation!
His client code is unnecessarily complicated with 3 session variables.
The following code does the same:
SESSION = xmlrpclib.ServerProxy(URL_PORT)
Rustom Mody wrote:
I know how to make a python script behave like a (standalone) program
in unix --
1. put a #! path/to/python as the first line
2. make the file executable
The closest I know how to do this in windows is:
r-click the file in win-explorer
goto properties
goto open with
change pyt
Carl Banks wrote:
On May 26, 7:48 am, Gary Herron wrote:
John wrote:
I'm okay with init, but it seems to me that enter is redundant since
it appears that anything you want to execute in enter can be done in
init.
The proper response to a question like this has to be
http://www.catb.org/~es
Martin P. Hellwig wrote:
I can do a quick one albeit without citation:
- Have you googled/searched?
- No really, have you?
- Are you really, really sure?
- So what did you 'search for|tried before' which didn't returned a
result you can work with?
- What does that tell you
Emin.shopper Martinian.shopper wrote:
The source for subprocess just uses CreateProcess. Which means that,
short of monkey-patching it, you're going to have to roll your own
subprocess-like code (I think). Basically, you'll need to run
CreateProcessAsUser or CreateProcessAsLogonW. They're both a
On 9 Mai, 10:14, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> If you can work with the license (GPL), I suggest Qt4
Thanks for your helpful hints, guys.
--
Joe P. Cool
--
http://mail.python.org/mailman/listinfo/python-list
Ludwig Miniatur wrote:
> For example:
> #!/usr/bin/env python
>
> from parser import suite, ast2list
> fh = file(__file__)
> s = fh.read()
> fh.close()
> ast = suite(s)
>
> while False:
> print "hello world"
> # comment
>
> Looks like a little bug in parser; but what I don't understand is that
>
On 24 Mai, 15:58, Ben Finney <[EMAIL PROTECTED]>
wrote:
> Sh4wn <[EMAIL PROTECTED]> writes:
> > first, python is one of my fav languages, and i'll definitely keep
> > developing with it. But, there's 1 one thing what I -really- miss:
> > data hiding. I know member vars are private when you prefix t
Kris Kennaway wrote:
If you can't use an indexer, and performance matters, evaluate using
grep and a shell script. Seriously.
grep is a couple of orders of magnitude faster at pattern matching
strings in files (and especially regexps) than python is. Even if you
are invoking grep multipl
If I call os.environ.clear in a python program child processes still
see the deleted entries. But when I iterate over the keys like so
names = os.environ.keys
for k in names:
del os.environ[k]
then the entries are also deleted for the child processes. Where is
the difference? Is this a bug?
On 28 Jun., 08:54, [EMAIL PROTECTED] wrote:
> For one thing, the expression 'os.environ.keys' will yield a method
> object (not a list, as you're probably expecting), but iterating over
> a method as you did should produce an exception. If you want to get
> the list of environment vars, you have to
On 28 Jun., 04:05, Benjamin <[EMAIL PROTECTED]> wrote:
> On Jun 27, 4:05 pm, "Joe P. Cool" <[EMAIL PROTECTED]> wrote:
> This is because of how os.environ is implement with a UserDict
> subclass. You should report this at bugs.python.org.
issue 3227: os.envir
On 28 Jun., 23:06, "Joe P. Cool" <[EMAIL PROTECTED]> wrote:
> On 28 Jun., 04:05, Benjamin <[EMAIL PROTECTED]> wrote:
>
> > On Jun 27, 4:05 pm, "Joe P. Cool" <[EMAIL PROTECTED]> wrote:
> > This is because of how os.environ is implement
I fiddled a little with pyGTK and was quite happy to discover
gtkMozEmbed because I want to write an application for Linux and
Windows with a powerful browser widget. Unfortunatly I couldnt find a
way to make gtkMozEmbed work on Windows. Are there alternatives? I'm
lazy so I prefer to download bina
Bruno Desthuilliers wrote:
[EMAIL PROTECTED] a écrit :
(snip clueless nonsense)
Surely a troll... No one on earth can be *that* clueless.
I disagree he has upper management written all over him.
--
mph
--
http://mail.python.org/mailman/listinfo/python-list
Hello
I found this 3 year old message asking about doing the same exact thing I am
trying to do. This is one wheel I REALLY don't want to re-invent. Can anyone
point me to code that does this?
Thanks
Ivan ( sunsp1der at yahoo dot com)
> I want to convert from pickle format to python source code
Hello all,
I had some troubles in the past how to arrange my packages and modules,
because I usually don't develop my stuff in the Lib\site-packages
directory I have some troubles when importing depending modules that are
in 'sibling' directories. Like in the following scenario:
pkg_root\
-__in
In 2005 I heard of plans to add Python as a second language to the
Gecko engine. Is this still true? Or has this plan been abandoned?
--
http://mail.python.org/mailman/listinfo/python-list
On 12 Apr., 03:34, baalbek <[EMAIL PROTECTED]> wrote:
> Delphi/Object Pascal simply sucks big time!
I disagree. Delphi/Object Pascal with the VCL (Visual Component
Library) is one
of the most sophisticated IDEs ever, even better than Qt IMO. The only
drawback
is that it is Windows only.
> No rea
sturlamolden wrote:
You killed the GIL, you bastard! :-)
> Hello Guys...
>
> I just had one moment of exceptional clarity, during which realized
> how I could get the GIL out of my way... It's so simple, I cannot help
> wondering why nobody has thought of it before. Duh! Now I am going to
> sit
[EMAIL PROTECTED] wrote:
> is there a simple way in perl, python, or awk/shell/pipe, that gets
> the user agent field in a apache log?
>
> e.g. the typical line is like this:
>
> 189.139.109.235 - - [07/Apr/2008:00:00:16 -0400] "GET /
> Periodic_dosage_dir/lacru/manara.html HTTP/1.1" 200 1933 xah
globalrev wrote:
> if i have a larger project and want to divide my program into several
> files, how do i include these files in the mainprogram?
>
> using import someprojectfile doesnt work because import is for site-
> packages right and i dont want to put all my files
> in that folder.
>
> so
John Henry wrote:
How do I determine is something a function?
For instance, I don't want to relying on exceptions below:
def f1():
print "In f1"
def f3():
print "In f3"
def others():
print "In others"
for i in xrange(1,3):
fct = "f%d()"%(i+1)
try:
exec fct
except:
v4vijayakumar wrote:
When I started coding in python, these two things surprised me.
1. my code is inconsistently indented with the combination of tabs and
spaces. Even lines looked intended, but it is not.
Even the standard editor Idle tries to guess the intendation, so this
was never a probl
So far I have a little experience with Tkinter and wxPython. I wonder
which of the numerous Python GUI kits would be the best choice for a
multi platform application that makes heavy use of custom controls, 3D
views and the like? Thanks in advance for your hints and advice.
Joe
--
http://mail.pyth
While I was reading PEP 8 I came across this part:
"""
Function and method arguments
Always use 'self' for the first argument to instance methods.
Always use 'cls' for the first argument to class methods.
"""
Now I'm rather new to programming and unfamiliar to some basic concepts
of OOP.
Steven, Bruno, Terry & Duncon, thank you for your insights, it really
helped me a great deal.
--
mph
--
http://mail.python.org/mailman/listinfo/python-list
Geoffery wrote:
> I want to add some applications to Freevo.
> Let Freevo recgonize the USB device is the one.
> Thank u for your answer.
>
Have a look at 'man 5 usbd.conf'
--
mph
--
http://mail.python.org/mailman/listinfo/python-list
Hi all,
I was doing some popen2 tests so that I'm more comfortable using it.
I wrote a little python script to help me test that (testia.py):
-
someline = raw_input("something:")
if someline == 'test':
print("yup")
else:
print("nope")
---
gry@ll.mit.edu wrote:
>
> You gave it a single string, not a list(sequence) of strings. Try
> something like:
> std_in.writelines(["notgood"])
>
I got this output then:
>>>
something:
Traceback (most recent call last):
File "F:\coding\pwSync\popen_test\popen_test.py", line 8, in ?
Donn Cave wrote:
>
> Anyway, it seems unlikely he would get that INVARG error for this
> reason. That's an error from the host operating system, not the
> interpreter, and it mostly likely refers to the file descriptor.
> Since it works for me, I guess his problem is basically this:
>
> |> (pyt
[EMAIL PROTECTED] wrote:
> Hi Everyone
>
> I want to run a python script in all the machines that are connected
> through local network and collect the information about that machine
> such as HDD size, RAM capacity(with number of slots) ,processer speed
> etc.
>
> But i want to run a script fro
Sathyaish wrote:
> And that the "extra-memory" operation I've given above is expensive, I
> believe. Is there an efficient way to do it?
>
If i recall correctly a string is an immutable list.
I would do it this way:
>>> strTXT = "foo"
>>> strREV = strTXT[::-1]
>>> strREV
'oof'
--
mph
--
http
Fuzzyman wrote:
>
From the site:
"Advanced Program for Research In Licensing, whose First Object-Oriented
License"
string = "Advanced Program for Research In Licensing, whose First
Object-Oriented License"
for letter in string:
if ord(letter) in range(65,91):
print(letter),
--
Jos Vos wrote:
> Hi,
>
> I'm trying to figure out how to implement a XML-RPC server that
> is called by xinetd i.s.o. listening on a TCP socket itself.
>
> I already have implemented a stand-alone XML-RPC server using
> SimpleXMLRPCServer, but I now want something similar, that is
> started via x
Jos Vos wrote:
>
> The problem is that the server initialization *requires* a server
> address (host, port pair), but I don't see how to tell it to use
> the stdin socket (and I'm afraid this is not possible, but I'm not
> sure).
>
If I understood it correctly you want the python server bind be
I added a section on "basic data" to ch 2 of my writings, an introduction to
programming (with Python as main language).
The intended reader is someone who is intelligent and wants to learn programming
but knows little or nothing about it.
As before it would be nice with feedback on this.
* markolopa:
On 18 Sep, 10:36, "markol...@gmail.com" wrote:
On Sep 11, 7:36 pm, Johan Grönqvist wrote:
I find several places in my code where I would like tohavea variable
scope that is smaller than the enclosing function/class/module definition.
This is one of the single major frustrations
* Esmail:
Ok, this is somewhat unexpected:
Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> -3**2
-9
>>> x = -3
>>> x**2
9
>>>
I would have expected the same result in both cases.
Init
* Jean-Michel Pichavant:
Steven D'Aprano wrote:
On Mon, 30 Nov 2009 02:11:12 +0100, Alf P. Steinbach wrote:
I think if one could somehow declare names as const (final, readonly,
whatever) then that would cover the above plus much more.
Having real constants is one feature that I
* Alf P. Steinbach:
I added a section on "basic data" to ch 2 of my writings, an
introduction to programming (with Python as main language).
The intended reader is someone who is intelligent and wants to learn
programming but knows little or nothing about it.
As before it would be
* Edward Cherlin:
On Sun, Nov 29, 2009 at 11:34, Brian Blais wrote:
After a bit of playing, I realized that I couldn't think of many exaples
which use turtle with conditional structures (if- and while- statements),
Repeat is used much more often. but of course we can provide examples
of any
Mark Summerfield wrote:
It is available as a free PDF download (no registration or anything)
from InformIT's website. Here's the direct link:
http://ptgmedia.pearsoncmg.com/imprint_downloads/informit/promotions/python/python2python3.pdf
Very handy! Am I wrong in assuming that you forgot to inc
Hi.
I discovered with tkinter the registration of widgets with layout managers
(tkinter "geometry" managers, e.g. calls to pack()) needs to be done very
hierarchically.
And this leads to hierarchical code, which would be nice to indicate by
indenting, but oops, indenting in Python is syntact
Is this guaranteed to work in Python 3.x?
>>> def foo(): pass
...
>>> foo.blah = 222
>>> foo.blah
222
>>> _
Cheers,
- Alf
--
http://mail.python.org/mailman/listinfo/python-list
* Marco Mariani:
Alf P. Steinbach wrote:
Is this guaranteed to work in Python 3.x?
>>> def foo(): pass
>>> foo.blah = 222
>>> foo.blah
222
>>> _
I don't see why it shouldn't work.
For example,
(42).blah = 666
The question is w
* Raymond Hettinger:
On Dec 4, 2:03 am, "Alf P. Steinbach" wrote:
Is this guaranteed to work in Python 3.x?
>>> def foo(): pass
...
>>> foo.blah = 222
>>> foo.blah
222
Yes, function attributes are guaranteed to be writable:
http://www.python.o
* Lie Ryan:
On 12/5/2009 2:57 PM, Gnarlodious wrote:
On Dec 1, 3:06 pm, Terry Reedy wrote:
def print(s): return sys.stdout.buffer.write(s.encode('utf-8'))
Here is a better solution that lets me send any string to the
function:
def print(html): return sys.stdout.buffer.write(("Content-type:te
* Steven D'Aprano:
On Sat, 05 Dec 2009 11:26:34 +0100, Alf P. Steinbach wrote:
Regarding my terminology, "routine" instead "function" that everybody
except you remarked on, it is of course intentional. [...]
I think you failed to realise that your use of the term
Edward A. Falk wrote:
For development purposes, you should stick with the oldest version that will
actually run your code. Every time you move to a more modern version, you're
leaving potential users/customers out in the cold.
If the fear of customers disatification prevents you from using a
* Dennis Lee Bieber:
On Sat, 05 Dec 2009 11:26:34 +0100, "Alf P. Steinbach"
declaimed the following in gmane.comp.python.general:
The devolution of terminology has been so severe that now even the Wikipedia
article on this subject confounds the general concept of "routine"
801 - 900 of 1684 matches
Mail list logo