Re: plagiarism, no follow-ups please

2010-04-02 Thread Steve Holden
)poster. You report, we decide? Fox News has come to usenet? As always, please do not feed the trolls. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com

Re: (a==b) ? 'Yes' : 'No'

2010-04-02 Thread Steve Holden
kj wrote: In mailman.1326.1269971785.23598.python-l...@python.org Steve Holden st...@holdenweb.com writes: John Nagle wrote: Chris Rebert wrote: On Tue, Mar 30, 2010 at 8:40 AM, gentlestone tibor.b...@hotmail.com wrote: Hi, how can I write the popular C/JAVA syntax in Python? Java

Re: Getting Local MAC Address

2010-04-02 Thread Steve Holden
. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http://holdenweb.eventbrite.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: psycopg2 / psycopg2.ProgrammingError: syntax error at or near E'mytable'

2010-04-02 Thread Steve Holden
drivers won't allow substitution of table names. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http://holdenweb.eventbrite.com

Re: sorting ascending/descending with operator.attrgetter

2010-04-01 Thread Steve Holden
Steven D'Aprano wrote: On Wed, 31 Mar 2010 22:19:27 -0400, Steve Holden wrote: I'm the same myself, and I know from personal experience that while I am (simply?) seeking accuracy and truth it sometimes bugs the hell out of people ... By the way, why are we acting as if seeking accuracy

Re: decorators only when __debug__ == True

2010-04-01 Thread Steve Holden
the function passed as an argument to the decorator. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http://holdenweb.eventbrite.com/ -- http

Re: Python 3.1, object, and setattr()

2010-04-01 Thread Steve Holden
the types you create yourself. For efficiency reasons the attributes of the built-ins are stored in a different way (that's more accessible to the C implementation) than those of the declared types. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from

Re: Python 3.1, object, and setattr()

2010-04-01 Thread Steve Holden
of object (which in Python 3 simply requires you to declare a class! In Python 2 you'd have to explicitly subclass object, or (equivalently) set your class's metaclass to type with __metaclass__ = type regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks

Re: (a==b) ? 'Yes' : 'No'

2010-04-01 Thread Steve Holden
exemplifies that people will find something else to waste their time on if you don't encourage them to abuse the ternary operator. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http

Re: subprocess only good for win32?

2010-04-01 Thread Steve Holden
like, popen does? thanks wk Subprocess runs another program. It's the program you are running that's giving the error, Python is merely reporting it. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web

Re: C-style static variables in Python?

2010-04-01 Thread Steve Holden
place to store the required data. regards Steve regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http://holdenweb.eventbrite.com

Re: C-style static variables in Python?

2010-04-01 Thread Steve Holden
technique in a program. You might want to consider using functools.wraps to make sure that the foo function looks right. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http

Re: wrapping data from groups

2010-03-31 Thread Steve Holden
reasonably well. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http://holdenweb.eventbrite.com/ -- http://mail.python.org/mailman/listinfo

Re: sort array, apply rearrangement to second

2010-03-31 Thread Steve Holden
, but it turns out that for most Python users (estimate PFTA: 97%) numpy/scipt is esoteric knowledge. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com/ UPCOMING

Re: Question about list comprehension/standard for disparities

2010-03-31 Thread Steve Holden
really bothered me when I started playing with python, and it seems kind of at-odds with the one right way to do things mentality. That's the Platonic ideal, but the real world is a dirty place and Python lives firmly in the real world! regards Steve -- Steve Holden +1 571 484 6266

Re: sorting ascending/descending with operator.attrgetter

2010-03-31 Thread Steve Holden
accuracy and truth it sometimes bugs the hell out of people ... It's a geek thing. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http

Re: sorting ascending/descending with operator.attrgetter

2010-03-31 Thread Steve Holden
soap' I am not talking about the Simple Object Access Protocol and Being wrong is usually survivable; offending a homicidal maniac often isn't. Perhaps I should just add it to the Holden Web course schedule? regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks

Re: sum for sequences?

2010-03-30 Thread Steve Holden
, surely now it's time to *show us the squirrels* regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http://holdenweb.eventbrite.com/ -- http

Re: StringChain -- a data structure for managing large sequences ofchunks of bytes

2010-03-30 Thread Steve Holden
a well-known nit-picker (and we are *sometimes* grateful for it). regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http

Re: (a==b) ? 'Yes' : 'No'

2010-03-30 Thread Steve Holden
to ensure that people didn't aver-use it, thereby reducing the readability of Python applications. Speaking purely personally I hardly ever use it, but don't dislike it. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv

Re: (a==b) ? 'Yes' : 'No'

2010-03-30 Thread Steve Holden
judgment, he capitulated. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http://holdenweb.eventbrite.com/ -- http://mail.python.org

Re: (a==b) ? 'Yes' : 'No'

2010-03-30 Thread Steve Holden
know* you don't need the parentheses then the parentheses are a very good idea, so I applaud the example as Pythonic while agreeing that it's ugly. A conditional expression seems more natural. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta

Re: psycopg2 / psycopg2.DataError: invalid input syntax for type timestamp with time zone:

2010-03-30 Thread Steve Holden
creation_date = %s where id_order = %s''', (new_start_date, 123)) Put single quotes around the first %s in the query. And in future please tell us exactly what error you are trying to explain by quoting the traceback exactly. regards Steve -- Steve Holden +1 571 484 6266 +1

Re: Sometimes the python shell cannot recognize the presence of an attribute.

2010-03-30 Thread Steve Holden
to be efficient. What can I do in order to resolve this issue? You might try Googling for expandtabs. This isn't a new problem, though I agree it can be very vexing when it's new to you ;-) regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010

Re: sort array, apply rearrangement to second

2010-03-30 Thread Steve Holden
this is not a premature optimization (a question about which I am currently skeptical) I'd suggest conversion to a list of pairs rather than a dict. Can you use zip() on numpy arrays? That would be the easiest way to create the list of pairs. regards Steve -- Steve Holden +1 571 484 6266 +1 800

Re: Usability, the Soul of Python

2010-03-30 Thread Steve Holden
. It's meant to help. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http://holdenweb.eventbrite.com/ -- http://mail.python.org/mailman

Re: Jython as an alternative to Python

2010-03-29 Thread Steve Holden
as a starting point, and publish the data you discover. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http://holdenweb.eventbrite.com

Re: Encryption source code with md5

2010-03-28 Thread Steve Holden
at present. There's nothing wrong with ignorance (I have a more than adequate supply of my own), but in encryption it's *very* easy to make mistakes that render whole systems vulnerable to trivial attack. So you do really need to know what you are doing. regards Steve -- Steve Holden +1

Re: Classes as namespaces?

2010-03-27 Thread Steve Holden
rather than testing for equality, though this is only a readability issue, I suspect. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http

Re: Revisiting Generators and Subgenerators

2010-03-26 Thread Steve Holden
of Py3k, we are moving towards the third release, and there is already a substantial body of code and literature embodying the current syntax. So you would need to reformulate your proposals to incorporate backward compatibility. regards Steve -- Steve Holden +1 571 484 6266 +1 800

Re: Create a class at run-time

2010-03-26 Thread Steve Holden
as though you had written class MyClass: ... class MyDynClass(object): ... regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http

Re: from import and __init__.py

2010-03-25 Thread Steve Holden
, and its namespace is bound to the name of the package within the importing program. So if you have code you want to run when the package is imported, put it there. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv

Re: Repetition of work in Jython

2010-03-25 Thread Steve Holden
. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http://holdenweb.eventbrite.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: sum for sequences?

2010-03-24 Thread Steve Holden
to flatten a list structure? There have been several discussions about this, which Google will find for you quite easily. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http

Re: What's the matter with docs.python.org?

2010-03-24 Thread Steve Holden
kj wrote: In the last couple of weeks, docs.python.org has been down repeatedly (like right now). Has anyone else noticed this? http://downforeveryoneorjustme.com/docs.python.org regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010

Re: the Python Foundation

2010-03-24 Thread Steve Holden, Chairman, PSF
trademarks, which you can read at http://www.python.org/psf/trademarks/ regards Steve -- Steve HoldenChairman, Python Software Foundation See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http

Re: timers not canceling!

2010-03-24 Thread Steve Holden
is running, but you actually get the same message if you try to start any terminated thread (including a canceled one), so threads cannot be restarted might be a better message. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http

Re: timers not canceling!

2010-03-24 Thread Steve Holden
Steve Holden wrote: Alex Hall wrote: [...] thread already started implies that the thread is running, but you actually get the same message if you try to start any terminated thread (including a canceled one), so threads cannot be restarted might be a better message. Or, better still

Re: DreamPie - The Python shell you've always dreamed about!

2010-03-22 Thread Steve Holden
seconds while checking it out? And if it's open source there's always the possibility of doing a Mac port and contributing the code back. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC

Re: EURO GIRLS MISS EUROPE MISS FRENCH FRENCH PRETTY GIRLS SEXY FRENCH GIRLS on www.sexyandpretty-girls.blogspot.com SEXY RUSSIAN GIRLS SEXY GREEK GIRLS SEXY DUTCH GIRLS SEXY UK GIR

2010-03-21 Thread Steve Holden
to the Python community. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http://holdenweb.eventbrite.com/ -- http://mail.python.org/mailman

Re: Clearing memory (namespace) before running code

2010-03-21 Thread Steve Holden
to the specific module whose namespace you want to clear. I presume this is related to earlier questions about reloading modules? This is yet another reason why you might want to consider running each module in its own process each time the user submits it. regards Steve -- Steve Holden +1 571 484

Re: How to automate accessor definition?

2010-03-21 Thread Steve Holden
to learn about it; there are many places where I can put them to good use. You may well find that namedtuple is faster than what you put together yourself, as the collections module is implemented in C. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from

Re: How to automate accessor definition?

2010-03-21 Thread Steve Holden
Christian Heimes wrote: Steve Holden wrote: You may well find that namedtuple is faster than what you put together yourself, as the collections module is implemented in C. But namedtuple isn't, Steve. Namedtuple is a class generator that creates fast and efficient classes. Ah, right

Re: Method / Functions - What are the differences?

2010-03-21 Thread Steve Holden
-- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http://holdenweb.eventbrite.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: [python3]

2010-03-19 Thread Steve Holden
expect sys.stdout.flush() time.sleep(int(2)) It may just be that the output is being held in buffers until the program terminates. the fluch() methof pushes it straight out. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta

Re: Python Documentation website layout changed?

2010-03-19 Thread Steve Holden
Steve Holden wrote: Andrej Mitrovic wrote: On Mar 17, 6:41 pm, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: Hi, What happened to the sidebar on the left of the documentation website? It seems to be gone: http://docs.python.org/py3k/index.html I found it quite useful since I can

Re: import antigravity

2010-03-18 Thread Steve Holden
it pass. Lawrence, if you are so worried perhaps you should consider not using e-mail any more. It's clearly too dangerous to suit you. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC

Re: Truoble With A Search Script for ImageBin.org

2010-03-18 Thread Steve Holden
script. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http://holdenweb.eventbrite.com/ -- http://mail.python.org/mailman/listinfo

Re: Python Documentation website layout changed?

2010-03-17 Thread Steve Holden
problem? regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http://holdenweb.eventbrite.com/ -- http://mail.python.org/mailman/listinfo

Re: Possible to open a file for shared write mode under Windows?

2010-03-17 Thread Steve Holden
. Or is this trivially easy, and I just don't know enough about pipes? regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http://holdenweb.eventbrite.com

Re: C-API PyObject_Call

2010-03-16 Thread Steve Holden
the return value of PyObject_Call is? Thanks!! moerchendiser2k3 You'll need to use a debugger like gdb that gives you access to the C stack, I believe. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden

Re: How to add a library path to pythonpath ?

2010-03-16 Thread Steve Holden
\\site-packages\\wx-2.8-msw-unicode'] $ What am I doing wrong ? Thanks, Ron. -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http

Re: How to add a library path to pythonpath ?

2010-03-16 Thread Steve Holden
it magically capable of understanding a Cygwin path specification. We have yet to hear why the Cygwin Python isn't acceptable (though one reason might be the unavailability of 2.6). regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http

Re: equivalent of Ruby's Pathname?

2010-03-16 Thread Steve Holden
(assuming os.path.chdir is ultimately used to change directories) because it effects the process's (globaL current directory. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http

Re: C-API PyObject_Call

2010-03-16 Thread Steve Holden
: in line 3, file test.py: expected an instance of XYZ, no int... Could we perhaps see a little bit more of the code? Are you throwing the exception from within your C code or from the Python calling environment with a raise statement? regards Steve -- Steve Holden +1 571 484 6266 +1 800

Re: Python for newbies (Pythno users group in Macedonia)

2010-03-15 Thread Steve Holden
long! Thanks :) I guess we'd have to wait a decade or so for a PyCon here You might be surprised. Python is really taking off right now. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC

Re: Fwd: Some PyCon videos won't play

2010-03-15 Thread Steve Holden
, but that is rarely needed for the talks. tjr -- http://mail.python.org/mailman/listinfo/python-list -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com

Re: extract occurrence of regular expression from elements of XML documents

2010-03-15 Thread Steve Holden
want to do in a little more detail, I suspect. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http://holdenweb.eventbrite.com

Re: building a dict

2010-03-14 Thread Steve Holden
: http://www.urbandictionary.com/define.php?term=op Possibly so, and that's a useful site, but I hope you aren't suggesting that Vicente shouldn't have asked. It seemed like a perfectly acceptable question to me. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon

Re: Feeding differeent data types to a class instance?

2010-03-14 Thread Steve Holden
. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http://holdenweb.eventbrite.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Breaking the __main__ script

2010-03-14 Thread Steve Holden
library. The documentation is good enough to get you started. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http

Re: NoSQL Movement?

2010-03-14 Thread Steve Holden
, but it's often better than its less-informed critics realize. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http

Re: iterator/generator

2010-03-14 Thread Steve Holden
not require Excel to be loaded on the machine running the programs. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http

Re: Breaking the __main__ script

2010-03-14 Thread Steve Holden
pyt...@bdurham.com wrote: Any reason you prefer PDB over WinPDB? http://winpdb.org/ Yes. I don't have Windows except one one PC :P WinPDB runs on non-Windows platforms :) One might reasonably argue that it has a pretty couter-intuitive name, then. regards Steve -- Steve Holden

Re: execute bash builtins in python

2010-03-13 Thread Steve Holden
= Popen(bash -i -c alias, stdout=PIPE, shell=True) p1.stdout.read() alias ls='ls --color=auto'\n regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com/ UPCOMING

Re: python to exe

2010-03-13 Thread Steve Holden
for the rest of his life. ;-) I like Give a man a fish, and he eats for a day. Teach a man to fish and he will bore you with stories of the one that got away for the rest of his life. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http

Re: python to exe

2010-03-13 Thread Steve Holden
a second chance at indexing the URL, but we all make mistakes. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http

Re: Python for newbies (Pythno users group in Macedonia)

2010-03-13 Thread Steve Holden
? thanks If you are all English-speakers then perhaps you could consider showing a PyCon video - see http://pycon.blip.tv Good luck with the group. I hope to see PyCon Macedonia emerging before too long! regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks

Re: print formatting

2010-03-13 Thread Steve Holden
locale import * setlocale(LC_ALL, '') # locale is otherwise 'C' 'en_US.UTF-8' locale.format(%12.3f, 123456.789, grouping=False) ' 123456.789' locale.format(%12.3f, 123456.789, grouping=True) ' 123,456.789' regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon

Re: building a dict

2010-03-13 Thread Steve Holden
defaultdict(function dflt at 0x7f0bcb1b0ed8, {'as': [2, 9], 'ab': [1, 5]}) regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http

Re: Need advice on starting a Python group

2010-03-12 Thread Steve Holden
, and providing that. Good luck! regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http://holdenweb.eventbrite.com/ -- http://mail.python.org

Re: Anything like Effective Java for Python?

2010-03-12 Thread Steve Holden
for Python. I.e. a book that assumes that readers are experienced programmers that already know the basics of the language, and want to focus on more advanced programming issues? ~K -- http://mail.python.org/mailman/listinfo/python-list -- Steve Holden +1

Re: execute bash builtins in python

2010-03-12 Thread Steve Holden
object at 0xb7589a4c p1.stdout.read() '' thank you, -Alex Goretoy For shell=True I believe you should provide the command as a single string, not a list of arguments. p1 = Popen(alias, stdout=PIPE, shell=True) regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119

Re: Python Script to get Info from Site not working

2010-03-11 Thread Steve Holden
of the cgitb module. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http://holdenweb.eventbrite.com/ -- http://mail.python.org/mailman

Re: Get a method instance through 'getattr' but not superclass's method

2010-03-11 Thread Steve Holden
why this is so important. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http://holdenweb.eventbrite.com/ -- http://mail.python.org

Re: Can't define __call__ within __init__?

2010-03-11 Thread Steve Holden
I showed was just a toy problem. The real problem is I expect to call a function many times, and I want to avoid the overhead of the 'if blah' everytime. This is a premature optimization. First, make it work. Then (if it doesn't work fast enough) make it work faster. regards Steve -- Steve

Re: importing modules from subdirs

2010-03-11 Thread Steve Holden
, how can weather import something from config? Thanks! I haven't checked this, but I believe .pyw names are only for main programs. Try renaming weather.pyw as weather.py and see if it makes any difference. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon

Re: file seek is slow

2010-03-11 Thread Steve Holden
? regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http://holdenweb.eventbrite.com/ -- http://mail.python.org/mailman/listinfo/python

Re: Down casting Python objects

2010-03-10 Thread Steve Holden
are delegating the handling to a subsidiary object which implements the correct behavior for the request type. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/ Holden Web LLC http

Re: What to do if anything bites.

2010-03-09 Thread Steve Holden
realise you are posting from an address that has been suspended due to inactivity? Otherwise you would have received this message privately. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon is coming! Atlanta, Feb 2010 http://us.pycon.org/ Holden Web LLC

Re: A scopeguard for Python

2010-03-08 Thread Steve Holden
response, both the out of context quoting and your comment, seems solely designed to convey a negative impression instead of addressing any technical issue. This isn't an isolated case, Alf. Physician, heal thyself. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon

Re: libc Sleep api performs a busy waiting

2010-03-08 Thread Steve Holden
Start in thread 2 Start in main in thread 2 End in thread 1 End Why not just use the time module's sleep function? Unlike the libc code it releases Python's GIL (global interpreter lock), thus allowing other threads to run. regards Steve -- Steve Holden +1 571 484 6266 +1 800

Re: Conditional based on whether or not a module is being used

2010-03-07 Thread Steve Holden
. Thanks for your long-term maintenance of this package. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon is coming! Atlanta, Feb 2010 http://us.pycon.org/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http

Re: Problem with regular expression

2010-03-07 Thread Steve Holden
, and the example there should show you how. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon is coming! Atlanta, Feb 2010 http://us.pycon.org/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http://holdenweb.eventbrite.com/ -- http

Re: isinstance(False, int)

2010-03-05 Thread Steve Holden
-- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon is coming! Atlanta, Feb 2010 http://us.pycon.org/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http://holdenweb.eventbrite.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Conditional based on whether or not a module is being used

2010-03-05 Thread Steve Holden
that won't get you all the way, since sys.modules[foo] will be set even if the importing statement was from foo import this, that, the_other So you might want to add foo = sys.modules[foo] inside the function. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon

Re: Conditional based on whether or not a module is being used

2010-03-05 Thread Steve Holden
, because modules aren't callable. Maybe you want print foo.foo() print foobar.foobar() regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon is coming! Atlanta, Feb 2010 http://us.pycon.org/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS

Re: How to login https sever with inputing account name and password?

2010-03-04 Thread Steve Holden
. The authentication data has to be send as HTTP headers, not as the data to a POST request. The dialog box you see is the browser attempting to collect the data it needs to put in the header. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon is coming! Atlanta, Feb

Re: memory usage, temporary and otherwise

2010-03-04 Thread Steve Holden
): ... a[i]=intern('spam'*10) should reduce your memory use somewhat. Better still, hoist the constant value out of the loop: a={} const = 'spam'*10 for i in range(1000): ... a[i] = const regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon is coming

Re: WANTED: A good name for the pair (args, kwargs)

2010-03-04 Thread Steve Holden
-parameter. For your use, though, you might choose something like the generic parameter pair). regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon is coming! Atlanta, Feb 2010 http://us.pycon.org/ Holden Web LLC http://www.holdenweb.com/ UPCOMING

Re: A scopeguard for Python

2010-03-04 Thread Steve Holden
logic is denied. Why not just stick to the facts and forget about the earlier discussions? regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon is coming! Atlanta, Feb 2010 http://us.pycon.org/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS

Re: Queue peek?

2010-03-03 Thread Steve Holden
to find out if it has work (if it does its queue is non-empty), Is this helpful, or a red herring? regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon is coming! Atlanta, Feb 2010 http://us.pycon.org/ Holden Web LLC http://www.holdenweb.com/ UPCOMING

Re: taking python enterprise level?...

2010-03-03 Thread Steve Holden
taking a hit on the coding side, especially if updates are involved). regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon is coming! Atlanta, Feb 2010 http://us.pycon.org/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http

Re: Docstrings considered too complicated

2010-03-03 Thread Steve Holden
you! regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon is coming! Atlanta, Feb 2010 http://us.pycon.org/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http://holdenweb.eventbrite.com/ -- http://mail.python.org/mailman/listinfo

Re: Adding to a module's __dict__?

2010-03-02 Thread Steve Holden
for the programming. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon is coming! Atlanta, Feb 2010 http://us.pycon.org/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http://holdenweb.eventbrite.com/ -- http://mail.python.org/mailman/listinfo

Re: Adding to a module's __dict__?

2010-03-02 Thread Steve Holden
Roy Smith wrote: On Mar 2, 8:33 am, Steve Holden st...@holdenweb.com wrote: And how important is it to make sure that whatever data your program processes doesn't overwrite the actual variable names you want to use to program the processing? Oh, I see what you're saying. You're thinking

Re: Email Script

2010-03-02 Thread Steve Holden
://en.wikipedia.org/wiki/Cargo_cult_programming regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon is coming! Atlanta, Feb 2010 http://us.pycon.org/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http://holdenweb.eventbrite.com/ -- http

Re: help with Python installation

2010-02-27 Thread Steve Holden
that old. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon is coming! Atlanta, Feb 2010 http://us.pycon.org/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http://holdenweb.eventbrite.com/ -- http://mail.python.org/mailman/listinfo

Re: Possible to import from a cStringIO file object vs. file on disk?

2010-02-26 Thread Steve Holden
You'll need to write a custom importer. PEP 302 contains the necessary details. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon is coming! Atlanta, Feb 2010 http://us.pycon.org/ Holden Web LLC http://www.holdenweb.com/ UPCOMING EVENTS:http

Re: taking python enterprise level?...

2010-02-25 Thread Steve Holden
an operation that gets 100,000 hits a day then your problems won't be with Python but with organizational aspects of your operation. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon is coming! Atlanta, Feb 2010 http://us.pycon.org/ Holden Web LLC http

<    1   2   3   4   5   6   7   8   9   10   >