Re: Multiple turtles

2020-03-02 Thread Giuseppe
Thank you. Giuseppe -- https://mail.python.org/mailman/listinfo/python-list

Multiple turtles

2020-03-01 Thread Giuseppe
them work simultaneously ? 3/ Should I use multiple turtles instead ? 4/ Are there special things I should read first ? Thank you. Giuseppe -- https://mail.python.org/mailman/listinfo/python-list

python gdal error

2017-09-08 Thread falcone . giuseppe
s is moved to read_data_from_shape function, everything works perfectly ... Thanks a lot. Giuseppe import os from osgeo import ogr def read_data_from_shape(): "This function load data from a shapefile" shp_driver = ogr.GetDriverByName("ESRI Shapefile")

Re: String Template

2013-12-28 Thread Giuseppe Tripoli
The problem is that I have a huge amount of log apache, log Akami, log cotendo, log iis ... messily all together. And the program does is that, according to the file name, use the configuration file to read. Certainly the quickest and easiest method is to use the regex, but I did not really int

String Template

2013-12-27 Thread t . giuseppe
Hello I'm rewriting a program previously written in C #, and trying to keep the same configuration file, I have a problem with untapped strings. The previous configuration files provide an input template string of this type: This string is parsed and the values are replaced with the actual

write to a file two dict()

2012-09-23 Thread giuseppe . amatulli
t;%i %i %i %i\n" % (a,b,c,d)) output.close() but i get the error ValueError: need more than 3 values to unpack. do you have some suggestions?. Thanks Giuseppe -- http://mail.python.org/mailman/listinfo/python-list

Re: looping in array vs looping in a dic

2012-09-20 Thread giuseppe . amatulli
create a new dic() or is possible to do in the same dic(). Here in the final code. Thanks Giuseppe rows = dsCategory.RasterYSize cols = dsCategory.RasterXSize print("Generating output file %s" %(dst_file)) start = time() unique=dict() for irows in xrange(rows): va

looping in array vs looping in a dic

2012-09-20 Thread giuseppe . amatulli
better to use dic() instead of np.ndarray for saving the results? and if yes how i can make the sum in dic()(like in the correspondent matrix[row_c,1] = matrix[row_c,1] + valuesRaster[row,col] )? If the dic() is the solution way is faster? Thanks Giuseppe import numpy as np import sys from time

Re: save dictionary to a file without brackets.

2012-08-09 Thread Giuseppe Amatulli
ot;) for (a), b in unique_k2.items(): print(a, b, file=output) output.close() What do you think? is there a way to speed up the process? Thanks Giuseppe On 9 August 2012 16:34, Roman Vashkevich wrote: > Actually, they are different. > Put a dict.{iter}items() in an O(k^N) algorithm a

Re: save dictionary to a file without brackets.

2012-08-09 Thread Giuseppe Amatulli
deas? >> Thanks in advance > > How's this? > > from __future__ import print_function > > output = open("out.txt", "w") > > for (a, b), c in d.items(): > print(a, b, c, file=output) > > output.close() > > Oscar. >> -- >> http://mail.python.org/mailman/listinfo/python-list -- Giuseppe Amatulli Web: www.spatial-ecology.net -- http://mail.python.org/mailman/listinfo/python-list

Re: save dictionary to a file without brackets.

2012-08-09 Thread Giuseppe Amatulli
; > from __future__ import print_function > > output = open("out.txt", "w") > > for (a, b), c in d.items(): > print(a, b, c, file=output) > > output.close() > > Oscar. >> -- >> http://mail.python.org/mailman/listinfo/python-list -- Giuseppe Amatulli Web: www.spatial-ecology.net -- http://mail.python.org/mailman/listinfo/python-list

save dictionary to a file without brackets.

2012-08-09 Thread giuseppe . amatulli
Hi, I have a dict() unique like this {(4, 5): 1, (5, 4): 1, (4, 4): 2, (2, 3): 1, (4, 3): 2} and i want to print to a file without the brackets comas and semicolon in order to obtain something like this? 4 5 1 5 4 1 4 4 2 2 3 1 4 3 2 Any ideas? Thanks in advance Giuseppe -- http

Re: no data exclution and unique combination.

2012-08-09 Thread giuseppe . amatulli
his? 4 5 1 5 4 1 4 4 2 2 3 1 4 3 2 Thanks in advance Best regards. Giuseppe On Tuesday, 24 July 2012 13:27:05 UTC-5, giuseppe...@gmail.com wrote: > Hi, > > would like to take eliminate a specific number in an array and its > correspondent in an other array, and vic

no data exclution and unique combination.

2012-07-24 Thread giuseppe . amatulli
!= no_data_b] but the results are not really stable. For the second task The np.unique would solve the problem if it can be apply to a two arrays. Any idea? thanks in advance Giuseppe -- http://mail.python.org/mailman/listinfo/python-list

[ANN] BPT (Boxed Package Tool) 0.4a -- now with PIP support

2009-05-15 Thread Giuseppe Ottaviano
format is inspired by `Gentoo <http://www.gentoo.org/>`_'s ebuilds. A fork of PIP_ is included to make installation of python packages easier, and as an example of use of the BPT API. Enjoy, Giuseppe Ottaviano -- http://mail.python.org/mailman/listinfo/python-list

Re: [Python-Dev] how GNU stow is complementary rather than alternative to distutils

2009-05-11 Thread Giuseppe Ottaviano
needs different versions of the dependencies. I am planning to write an integration layer with buildout and easy_install. It should be very easy, since BPT can handle directly tarballs (and directories, in trunk) which contain a setup.py. HTH, Giuseppe [1] http://pypi.python.org/pypi/bpt

[ANN] BPT (Boxed Package Tool) 0.3

2009-05-06 Thread Giuseppe Ottaviano
ld>`_, but without the dependency resolution and automatic downloading machinery, and the ``bpt-rules`` format is inspired by `Gentoo <http://www.gentoo.org/>`_'s ebuilds. Enjoy, Giuseppe Ottaviano -- http://mail.python.org/mailman/listinfo/python-list

[ANN] BPT (Boxed Package Tool)

2009-04-29 Thread Giuseppe Ottaviano
Gentoo <http://www.gentoo.org/>`_'s ebuilds. -- Giuseppe Ottaviano -- http://mail.python.org/mailman/listinfo/python-list

Re: Problems running on HP Intel duo core machine

2008-12-11 Thread Giuseppe Di Martino
#x27;win32api.pyd' and win32ui.pyd are in the same directory. Have you checked if there is a file named "win32api.pyd" somewhere in the system path (c:\windows\, c:\windows\system32, etc. ) ? Try to add the path to the folder containing your win32api.pyd and win32ui.pyd to the PAT

Re: Boost Python - C++ class' private static data blown away before accessing in Python?

2008-07-05 Thread Giuseppe Ottaviano
r own reference count (different from the one in CPython lib), but Boost.Python does the magic to make them work together. HTH, Giuseppe -- http://mail.python.org/mailman/listinfo/python-list

Re: Bind compiled code to name?

2008-06-22 Thread Giuseppe Ottaviano
class D:pass d = D() exec source_code in d.__dict__ print d.some_name Notice that this will also give you d.__builtins__, which you might want to del afterwards. If you want to mimic an import you can also do this: import types D = types.ModuleType('D') exec source_code in D.__dict__ print D.

Re: Named tuples and projection

2008-06-20 Thread Giuseppe Ottaviano
[snip] Provided you don't change the order of the items in the tuple, you can just use slicing: a, b = f()[ : 2] Yes, this is what you would normally do with tuples. But i find this syntax very implicit and awkward. Also, you cannot skip elements, so you often end up with things like a,

Named tuples and projection

2008-06-20 Thread Giuseppe Ottaviano
quot; (for SQL addicts) would be more appropriate. Other possible solutions? Thanks, Giuseppe -- http://mail.python.org/mailman/listinfo/python-list

Re: Why does python not have a mechanism for data hiding?

2008-06-03 Thread Giuseppe Ottaviano
Hmm, difficult to react to this. On the one hand I have had people argue that block delimiting in python is explicit too. So in that case python doesn't differ from those other languages. On the other hand if we accept that blocks are delimited implicitely in python then it seems python doesn't

Re: ANN: equivalence 0.1

2008-06-02 Thread Giuseppe Ottaviano
x27;for i in xrange(1): eq.merge(i+1, i)' 10 loops, best of 3: 2.59 sec per loop Have you considered using the Union-Find algorithm, which would be (almost) linear in all cases? -- Giuseppe -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: equivalence 0.1

2008-06-02 Thread Giuseppe Ottaviano
Interesting.. it took me a while to figure out why the second case is so much slower and you're right, it is indeed quadratic. I don't know how likely would such pathological cases be in practice, given that the preferred way to merge a batch of objects is eq.merge(*xrange(10001)), which is more

Re: Best way to delimit a list?

2008-05-13 Thread Giuseppe Ottaviano
tools) you can iterate lazily on the file: hosts = ichain(s.split() for s in f) for host in hosts: # ... HTH, Giuseppe -- http://mail.python.org/mailman/listinfo/python-list

Re: for web application development

2007-06-14 Thread Giuseppe Di Martino
tp://pylonshq.com) and until now i'm happy ! Giuseppe -- http://mail.python.org/mailman/listinfo/python-list

Re: PATH or PYTHONPATH under Windows ???

2007-06-06 Thread Giuseppe Di Martino
; In the original post you don't mention "embedded in Delphi" ! This is a different thing, the problem is that your Delphi's app relies on a Python installation in the system and, insteed, it shoud have on its own copy of Python, avoiding any problems. Giuseppe -- http://mail.python.org/mailman/listinfo/python-list

Re: PATH or PYTHONPATH under Windows ???

2007-06-05 Thread Giuseppe Di Martino
entki Download pyrun.exe (http://developer.berlios.de/projects/pyrun) and copy it in your Python's folder; to exec python.exe use pyrun python or to exec script.py use pyrun python script.py Giuseppe -- http://mail.python.org/mailman/listinfo/python-list

Re: python + database book

2006-12-04 Thread Giuseppe Di Martino
Il Sat, 02 Dec 2006 21:00:05 -0800, progman ha scritto: > new to python. > i work with db heavily. > > any good book for python + database? Evaluate http://www.sqlalchemy.org/ and his documentation Giuseppe -- http://mail.python.org/mailman/listinfo/python-list

Re: IDE

2006-10-13 Thread giuseppe
for example I ask wingware python IDE is good? other program similar is better? joe "Theerasak Photha" <[EMAIL PROTECTED]> ha scritto nel messaggio news:[EMAIL PROTECTED] > On 10/13/06, giuseppe <[EMAIL PROTECTED]> wrote: >> What is the better IDE software f

IDE

2006-10-13 Thread giuseppe
What is the better IDE software for python programming? many thanks joe -- http://mail.python.org/mailman/listinfo/python-list

Re: Code for generating validation codes (in images)

2005-09-04 Thread Giuseppe di Sabato (aka deelan)
morphex wrote: > Hi, > > does anyone of you know of some code I can use to generate validation > code images? > > Those images you can see on various login forms used to prevent bots > for performing a brute-force attack.. take a look at the "pycaptcha" package: