|
First
|
Prev |
Next
|
Last
Pages: 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346
formatting list -> comma separated (slightly different) Paul & Robert wrote... d = ["soep", "reeds", "ook"] print ', '.join(d) soep, reeds, ook I occasionally have a need for printing lists of items too, but in the form: "Butter, Cheese, Nuts and Bolts". The last separator is the word 'and' instead of the comma. The clearest I could come up with in Python is... 22 Jul 2008 03:27
Impossible to change methods with special names of instancesof new-style classes? samwyse wrote: On Jul 8, 4:56 pm, Joseph Barillari <pyt...(a)barillari.org> wrote: My question is: did something about the way the special method names are implemented change for new-style classes? I believe the difference is that for new-style classes, when special methods are called 'behind the ... 9 Jul 2008 15:46
formatting list -> comma separated given d: d = ["soep", "reeds", "ook"] I want it to print like soep, reeds, ook I've come up with : print ("%s"+", %s"*(len(d)-1)) % tuple(d) but this fails for d = [] any (pythonic) options for this? Robert ... 10 Jul 2008 13:24
About Google App Engine Hello every body: Recently the Google boy's announce their last toy: Google App Engine, a really great idea. Although the GAE site have documentations and guides, i think it not covers the some of the best practices when we really build a web site. I mean layers, design patterns, etc. In the link bellow [1] we can... 9 Jul 2008 15:46
socket-module: different behaviour on windows / unix when a timeoutis set Hey, it seems that the socket-module behaves differently on unix / windows when a timeout is set. Here an example: # test.py import socket sock=socket.socket(socket.AF_INET,socket.SOCK_STREAM) print 'trying to connect...' sock.connect(('127.0.0.1',9999)) print 'connected!' # executed on windows C... 9 Jul 2008 14:44
Openine unicode files Noorhan Abbas wrote: Hello, I wonder if someone can advise me on how to open unicode utf-8 files without using the codecs library . I am trying to use the codecs.open() from within Google Appengine but it is not working. When posting about something 'not working', post at least a line of code a... 9 Jul 2008 14:44
User-defined exception: "global name 'TestRunError' is not defined" I'm using some legacy code that has a user-defined exception in it. The top level program includes this line from TestRunError import * It also imports several other modules. These other modules do not explicitly import TestRunError. TestRunError is raised in various places throughout the modules. There... 10 Jul 2008 09:16
Anyone happen to have optimization hints for this loop? I have some code that takes data from an Access database and processes it into text files for another application. At the moment, I am using a number of loops that are pretty slow. I am not a hugely experienced python user so I would like to know if I am doing anything particularly wrong or that can be hugely impro... 9 Jul 2008 12:40
trouble building Python 2.5.1 on solaris 10 When make gets to the _ctypes section, I am getting the following in my output: building '_ctypes' extension creating build/temp.solaris-2.10-i86pc-2.5/home/ecuser/Python-2.5.1/ Modules/_ctypes creating build/temp.solaris-2.10-i86pc-2.5/home/ecuser/Python-2.5.1/ Modules/_ctypes/libffi creating build/temp.solar... 9 Jul 2008 12:40
Determining when a file has finished copying Hi all, I'm writing some code that monitors a directory for the appearance of files from a workflow. When those files appear I write a command file to a device that tells the device how to process the file. The appearance of the command file triggers the device to grab the original file. My problem is I don't wa... 19 Jul 2008 17:04 |