First  |  Prev |  Next  |  Last
Pages: 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224
how to generate random numbers that satisfy certain distribution
such as uniform distribution, Normal distribution or poisson distribution. is there any package that can be used to generate such random numbers. -- View this message in context: Sent from the Python... 24 Jan 2010 21:27
how can i know if a python object have a attribute such as 'attr1'?
for example, i may define a python class: class A: def sayHello(): print 'hello' a = A() a.attr1 = 'hello' a.attr2 = 'bb' b = A() a.attr2 = 'aa' how can i know whether an object have an attribute named attr1? -- View this message in context: 23 Jan 2010 12:03
iterating lists
As you were talking about list.pop()... Is anyone able to reproduce the following and explain why this happens by chance? (Using 3.1.1) l1 = ["ready", "steady", "go"] l2 = ["one", "two", "tree"] l3 = ["lift off"] for w in l1: print(l1.pop()) #prints only "go steady" - why not "ready"?? for w in ra... 24 Jan 2010 07:52
list.pop(0) vs. collections.dequeue
The v2.6.4 version of the tutorial says this: ''' It is also possible to use a list as a queue, where the first element added is the first element retrieved (“first-in, first-out”); however, lists are not efficient for this purpose. While appends and pops from the end of list are fast, doing inserts or pops from... 27 Jan 2010 10:20
distutils not finding all of my pure python modules
I have a small set of Python packages/modules that I am putting together. I'm having trouble in that when I run python sdist I don't get all of my pure python modules. The script I use is: # ===================================== from distutils.core import setup purePythonModules = ['r... 24 Jan 2010 05:42
counting lines of code
I need a small utility to count the lines of Python code in a directory, traversing subdirectories and ignoring comments and docstrings. I am sure there is already something doing that, what do you suggest? TIA, Michele Simionato ... 23 Jan 2010 06:34
installing psycopg2-2.0.13 with python3.1
Hi, Would anyone know if it's possible to install psycopg2-2.0.13 with python3.1.1 (or similar)? When I try I get the following $ sudo python install Password: File "", line 233 except Warning, w: ... 23 Jan 2010 15:25
[ANN] Python-es mailing list changes home
=== Python-es mailing list changes home === Due to technical problems with the site that usually ran the Python-es mailing list (Python list for the Spanish speaking community), we are setting up a new one under the umbrella. Hence, the new list will become <python-es(a)> (the old one was <py... 19 Jan 2010 13:30
Py 3: How to switch application to Unicode strings?
I am using Python 3, getting an error from SQLite: sqlite3.ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings. So... how do I... 20 Jan 2010 21:55
Py 3: Terminal script can't find relative path
I am running a script in a browser that finds the file in subfolder Data: Content=Plist('Data/Content.plist') However, running the same script in Terminal errors: IOError: [Errno 2] No such file or directory: 'Data/Content.plist' Is Py 3 unable to find relative paths? I tried all kinds of tricks to no ava... 26 Jan 2010 15:29
First  |  Prev |  Next  |  Last
Pages: 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224