save data from multiple txt files

2022-03-26 Thread alberto
Hi to everyone, I would save data from multiple files in one using pandas. below my script # Read results GCMG LAMMPS import pandas as pd import os import glob path = r"C:\Users\Documenti\Pyton\plot\results_CH4_180K\METHANE_180K_LJ_2.5-35.0_bar" os.chdir(path) results = pd.DataFrame() for

convert script awk in python

2021-03-23 Thread alberto
Hi to everyone I have an awk script that calculate minimum distances between points ## atom type frag - atom type surface #!/bin/bash FILE1=$1.lammpstrj if [ -f $FILE1 ]; then awk 'function sq(x) { return x * x; } function dist(x1, y1, z1, x2, y2, z2) { return sqrt(sq(x1 - x2) + sq(y1

Re: program python

2021-03-05 Thread alberto
Il giorno giovedì 4 marzo 2021 alle 23:51:39 UTC+1 Igor Korot ha scritto: > Hi, > On Thu, Mar 4, 2021 at 4:42 PM alberto wrote: > > > > Il giorno giovedì 4 marzo 2021 alle 22:04:57 UTC+1 Paul Bryan ha scritto: > > > I don't see a Python program in that link. &g

Re: program python

2021-03-04 Thread alberto
ul > On Thu, 2021-03-04 at 12:36 -0800, alberto wrote: > > Hi I'm tring to write a program with python to evaluate data of csv > > data > > In particular I would extract this information > > > > View data on the presence of men and women in Affori over time.

program python

2021-03-04 Thread alberto
Hi I'm tring to write a program with python to evaluate data of csv data In particular I would extract this information View data on the presence of men and women in Affori over time. * Carry out an analysis relating to the last available year. Of the 10 most populous neighborhoods show: * the

Asyncio Queue implementation suggestion

2020-09-16 Thread Alberto Sentieri
I have a suggestion about the implementation of asyncio queues that could improve performance. I might be missing something, however. I am sort of new to Python. Below a short description of the problem I am facing. I wrote a daemon in Python 3 (running in Linux) which test many devices at the

HYDRASPA error

2020-03-03 Thread alberto
hi, my name is Alberto Now I'm trying to install and use the code hydraspa (https://pypi.org/project/hydraspa/) I'm installing from source with command python 3.5 setup.py install but when I run hydraspa create -s IRMOF-1 -g CO2 -f UFF -o myCO2sim as reported in documentatio

Re: insert data in python script

2020-02-18 Thread alberto
Il giorno martedì 18 febbraio 2020 11:01:11 UTC+1, David ha scritto: > On Tue, 18 Feb 2020 at 20:45, alberto wrote: > > Il giorno martedì 18 febbraio 2020 09:34:51 UTC+1, DL Neil ha scritto: > > > > > my code preos in one file preos.py > > > > my commands

Re: insert data in python script

2020-02-18 Thread alberto
> > > my code preos in one file preos.py > > my commands are > > > > alberto@HENDRIX ~/PREOS $ python3.5 > > Python 3.5.2 (default, Oct 8 2019, 13:06:37) > > [GCC 5.4.0 20160609] on linux > > Type "help", "copyright", "cr

Re: insert data in python script

2020-02-17 Thread alberto
Il giorno lunedì 17 febbraio 2020 17:48:07 UTC+1, alberto ha scritto: > Hi, > I would use this script to evaluate fugacity coefficient with PENG-ROBINSON > equation, but I don't understand the correct mode to insert data > > import numpy as np > import matplotl

fugacity cofficient

2020-02-17 Thread alberto
Alberto -- https://mail.python.org/mailman/listinfo/python-list

insert data in python script

2020-02-17 Thread alberto
if plotcubic: # Plot the cubic equation to visualize the roots zz = np.linspace(0, 1.5) # array for plotting plt.figure() plt.plot(zz, g(zz), color='k') plt.xlabel('Compressibility, $z$') plt.ylabel('Cubic $g(z)$')

install software

2019-11-28 Thread alberto
Hi, I'm trying to install a python source https://github.com/peteboyd/lammps_interface when I run the example test I receive this error AttributeError: 'NoneType' object has no attribute 'copy' How could I fix it? regards lammps-interface /home/alberto/Scaricat

TypeError: loadtxt() got an unexpected keyword argument 'max_rows'

2019-09-03 Thread alberto
O3wFHUFK10QweRpclu29/view?usp=sharing regard Alberto -- https://mail.python.org/mailman/listinfo/python-list

Re: A use-case for for...else with no break

2017-11-02 Thread Alberto Berti
> "Wolfgang" == Wolfgang Maier > writes: Wolfgang> Try running it interactively and you'll see, Wolfgang> wolfgang I've tried but my muscolar memory failed me... i've issued a C-c C-c that usually would have sent the region of text to the interpreter session (when done from python

Re: A use-case for for...else with no break

2017-11-02 Thread Alberto Berti
> "Steve" == Steve D'Aprano writes: py> for x in "abcdefgh": Steve> ... print(x, end='') Steve> ... py> efghpy> Steve> "For ... else" to the rescue! py> for char in "abcdefgh": Steve> ... print(char, end='') Steve> ... else: Steve> ... print(

Re: Invoking return through a function?

2017-10-31 Thread Alberto Riva
On 10/31/2017 11:01 AM, Rhodri James wrote: On 31/10/17 02:06, Alberto Riva wrote: Steve D'Aprano gave you a pretty full answer, I just wanted to add:  The kind of statement I was trying to add would at least have made that explicit: return-if-so-and-so-happens. That's only obvi

Re: Cooperative class tree filtering

2017-10-31 Thread Alberto Berti
Thanks Ian, >>>>> "Ian" == Ian Kelly writes: Ian> On Thu, Oct 12, 2017 at 5:07 PM, Alberto Berti wrote: Ian> My initial reaction is: is this really worth it? This seems like an Ian> awful lot of code and added complexity in order to do away w

Re: Invoking return through a function?

2017-10-31 Thread Alberto Berti
ional return And finally, a ``main`` module is needed to activate macro parsing and substitution: # test_main.py import macropy.activate import test test.test() cheers, Alberto -- https://mail.python.org/mailman/listinfo/python-list

Re: Invoking return through a function?

2017-10-30 Thread Alberto Riva
On 10/30/2017 12:23 AM, Rustom Mody wrote: On Sunday, October 29, 2017 at 9:52:01 PM UTC+5:30, Rick Johnson wrote: On Sunday, October 29, 2017 at 9:19:03 AM UTC-5, Alberto Riva wrote: In a language like Lisp Python is nothing like Lisp, and for good reason! Sure, we have a few lispers and

Re: Invoking return through a function?

2017-10-30 Thread Alberto Riva
On 10/30/2017 10:27 AM, Rhodri James wrote: On 29/10/17 16:45, Alberto Riva wrote: On 10/29/2017 11:13 AM, bartc wrote: (What the OP wants was also proposed a few weeks back in comp.lang.c. But that was only within nested functions, so if H is inside G, and G is inside F, then a 'retu

Re: Invoking return through a function?

2017-10-29 Thread Alberto Riva
all vacuum cleaners. I was just asking for information. Thanks, Alberto On 10/29/2017 04:35 PM, Rick Johnson wrote: Alberto Riva wrote: Rick Johnson wrote: Alberto Riva wrote: Rick Johnson wrote: Alberto Riva wrote: [...] In a language like Lisp Python is nothing like Lisp, and for g

Re: Invoking return through a function?

2017-10-29 Thread Alberto Riva
On 10/29/2017 02:13 PM, Rick Johnson wrote: Alberto Riva wrote: Rick Johnson wrote: Alberto Riva wrote: [...] In a language like Lisp Python is nothing like Lisp, and for good reason! I would disagree with this. Actually, it's the most Lisp- like language I've encountere

Re: Invoking return through a function?

2017-10-29 Thread Alberto Riva
On 10/29/2017 12:21 PM, Rick Johnson wrote: On Sunday, October 29, 2017 at 9:19:03 AM UTC-5, Alberto Riva wrote: Hello, I'm wondering if there is a way of writing a function that causes a return from the function that called it. To explain with an example, let's say that I want

Re: Invoking return through a function?

2017-10-29 Thread Alberto Riva
*in place*, without calling a separate function, and this eliminates the problem entirely. Since Python doesn't have macros I was looking for the next-best solution, but there doesn't seem to be one. Oh, well... Thanks, Alberto -- E-mail address: ((lambda (s a b c) (m

Re: Invoking return through a function?

2017-10-29 Thread Alberto Riva
On 10/29/2017 10:35 AM, Steve D'Aprano wrote: On Mon, 30 Oct 2017 01:18 am, Alberto Riva wrote: Hello, I'm wondering if there is a way of writing a function that causes a return from the function that called it. To explain with an example, let's say that I want to exit my fun

Invoking return through a function?

2017-10-29 Thread Alberto Riva
m a function that is higher up in the call stack, rather than the currently active one, without using try/except? Thanks, Alberto -- E-mail address: ((lambda (s a b c) (map 'string #'code-char (mapcar (lambda (v) (setq s (+ a (mod (+ s v (- a)) b (map 'list (

Re: Cooperative class tree filtering

2017-10-12 Thread Alberto Berti
Sorry, i've made a mistake in the second C body, it's written like: >>>>> "me" == Alberto Berti writes: me> I've tried some variants of the 'super()' trick, that sometimes seems to me> change behavior if it's written like th

Cooperative class tree filtering

2017-10-12 Thread Alberto Berti
ts(c)) which has the same result as before: >>> {'foo', 'zoo', 'baz'} {'bar', 'foo', 'zoo', 'baz'} I would really like to find a way to do this that doesn't involve decorating the methods in A subclasses to free the final developer to remember to import the decorator and apply it, just like I don't want him (probably me six months from now) to have to remember to add an `else: super()...` to its computation... Has anyone done this before and has any suggestion about a better way to do it? Am I getting it wrong? cheers, Alberto -- https://mail.python.org/mailman/listinfo/python-list

Re: Question about asyncio and blocking operations

2016-01-26 Thread Alberto Berti
>>>>> "Alberto" == Alberto Berti writes: Alberto> async external_coro(): # this is the calling context, which is a coro Alberto> async with transction.begin(): Alberto> o = MyObject Alberto> # ma

Re: Question about asyncio and blocking operations

2016-01-26 Thread Alberto Berti
gement of the "inner" coroutine is simpler, and from your code it's clear it suspends to wait and after that all the "stashed" coroutines are guaranteed to be executed. Hope it helps, Alberto -- https://mail.python.org/mailman/listinfo/python-list

RE: licenses

2016-01-11 Thread Martinez, Jorge Alberto (GE Aviation)
Thank you very much for your reply. Best Regards From: Cody Piersall [mailto:cody.piers...@gmail.com] Sent: Sunday, January 10, 2016 1:43 PM To: python-list@python.org Cc: Martinez, Jorge Alberto (GE Aviation) Subject: Re: licenses On Fri, Jan 8, 2016 at 1:41 PM, Martinez, Jorge Alberto (GE

licenses

2016-01-09 Thread Martinez, Jorge Alberto (GE Aviation)
Hello We develop applications here with Python and I want to know if there's issues by using. We use NumPy, PyDaqMx, Py Visa How can we cover this licensing? Regards Jorge Alberto Martinez GE Aviation Systems HW Team Manager GEIQ Power Engineering T +52 442 456 6446 E jorgealberto.

python app hosting

2014-07-11 Thread Jorge Alberto Díaz Orozco
Hi, I'm looking for some server to host an xmlrpc server app I've made. Can someone help me find any? VII Escuela Internacional de Verano en la UCI del 30 de junio al 11 de julio de 2014. Ver www.uci.cu -- https://mail.python.org/mailman/listinfo/python-list

Re: authentication with python-ldap

2013-05-25 Thread Jorge Alberto Diaz Orozco
I have been doing the same thing and I tried to use java for testing the credentials and they are correct. It works perfectly with java. I really don´t know what we´re doing wrong. You are accessing a protected operation of the LDAP server and it (the server) rejects it due to invalid credential

examples of pyraknet

2013-04-24 Thread Jorge Alberto Diaz Orozco
do anyone has examples of pyraknet??? I've being seen these ones (http://nullege.com/codes/search/pyraknet) but I still don't understand lot of things about it and I can't find anything else. http://www.uci.cu -- http://mail.python.org/mailman/listinfo/python-list

Re: A newbie question

2013-02-12 Thread Alberto Salvati
Hi, Colin. Thanks for your answer. But C:\Python27\Scripts is in my path and my trouble is about INSTALL easy_isntall. Bye A. -- http://mail.python.org/mailman/listinfo/python-list

A newbie question

2013-02-12 Thread Alberto Salvati
Hi, All. I'm a (old) delphi developer. I want to learn Python. I've python 2.7 and django. For learning purpose I want to use firebird. But, package (egg) to use firebird needs easy_install for setup. When i run: python ez_setup.py install python says me error: Downloading http://pypi.python

Re: pyrudp

2013-01-30 Thread Jorge Alberto Diaz Orozco
I have restrictions in my system that does not allow me to use TCP, so I want to make a pipe over UDP imitating TCP behavior. I have control over both endpoints, and I´m writing both of them. I just don´t want to re-invent the wheel and I´m looking for a reliable UDP sockets implementation for Py

Re: pyrudp

2013-01-30 Thread Jorge Alberto Diaz Orozco
I want to use a reliable UDP connection like you say, a TCP like connection but over UDP. thaks for your recomendation, if I get good results I promise to share them. - Original Message - From: "Michael Torrie" To: python-list@python.org Sent: Wednesday, January 30, 2013 9:16:15 AM Subj

Re: pyrudp

2013-01-30 Thread Jorge Alberto Diaz Orozco
I´ve tried it but it´s not reliable. Datagrams can arive disorganised or just not arive. Some programmers said I most use TCP, but I need to use UDP. that´s why I need pyrudp, but I can not find it. On Jan 30, 2013, at 8:12 AM, Jorge Alberto Diaz Orozco What about the native socket call to

pyrudp

2013-01-30 Thread Jorge Alberto Diaz Orozco
can someone give me a link to download pyrudp. I tried here http://code.google.com/p/pyrudp/ but didn´t worked. if someone can give me another idea it will be great to. I´m traying to make a reliable udp connection help will be really appreciated -- http://mail.python.org/mailman/listinfo/py

python ldap bind error

2012-12-17 Thread Jorge Alberto Diaz Orozco
hi there. I'm working with python ldap and I need to authenticate my user. this is the code I'm using. import ldap ldap.set_option(ldap.OPT_REFERRALS,0) ldap.protocol_version = 3 conn = ldap.initialize("ldap://ldap.domain.cu";) conn.simple_bind_s("u...@domain.cu","password") every time I do this

ntlm authentication for urllib2

2012-11-29 Thread Jorge Alberto Diaz Orozco
Hi there: I'm working with urllib2 to open some urls and grab some data. The url will be inserted by the user and my script will open it and parse the page for results. the thing is I'm behind a ntlm proxy, and I've tried with a lot of things to authenticate but it still doesn't work at all. I

Re: proxy??

2012-11-20 Thread Jorge Alberto Diaz Orozco
When I try to open facebook or search something using google it is just not working. gives me forbidden or not found errors. that's why I think the problem is about the headers of the request. On 20/11/12 15:29, Joshua Landau wrote: On 20 November 2012 14:48, Jorge Alberto Diaz O

proxy??

2012-11-20 Thread Jorge Alberto Diaz Orozco
Hi there. Does anyone knows how to manage headers using a simple proxy??? I'm doing this but It gives me problems In some pages. import SocketServer import SimpleHTTPServer import urllib2 PORT = class Proxy(SimpleHTTPServer.SimpleHTTPRequestHandler): def do_GET(self): try:

Re: Python IDE/Eclipse

2011-08-26 Thread Moises Alberto Lindo Gutarra
> not found. > > > Any suggestions on getting this to work? > > Thanks, > Dave > -- > http://mail.python.org/mailman/listinfo/python-list > -- Atte. Moisés Alberto Lindo Gutarra Asesor - Desarrollador Java / Open Source Linux Registered User #431131 - htt

Re: Python 3.2 vs Java 1.6

2011-04-08 Thread Moises Alberto Lindo Gutarra
will see what i mean. 2011/4/8 km : > Hi All, > > How does python 3.2 fare compared to Java 1.6 in terms of performance ? > any pointers or observations ? > > regards, > KM > > > -- > http://mail.python.org/mailman/listinfo/python-list > > -- At

Re: Most efficient way to "pre-grow" a list?

2009-11-07 Thread Luis Alberto Zarrabeitia Gomez
Quoting Andre Engels : > On Sat, Nov 7, 2009 at 8:25 PM, Luis Alberto Zarrabeitia Gomez > wrote: > > > > Ok, he has a dict. > > > > Now what? He needs a non-sparse array. > > Let d be your dict. > > Call the zeroeth place in your array d[0], the first

Re: Most efficient way to "pre-grow" a list?

2009-11-07 Thread Luis Alberto Zarrabeitia Gomez
Quoting Bruno Desthuilliers : > > Another situation where one may want to do this is if one needs to > > initialize a non-sparse array in a non-sequential order, > > Then use a dict. Ok, he has a dict. Now what? He needs a non-sparse array. -- Luis Zarrabeitia Facultad de Matemática y Comput

Re: id( ) function question

2009-10-14 Thread Luis Alberto Zarrabeitia Gomez
> It's believable if id({}) does the following: > > 1. Construct an empty dict > 2. Take the id of the dict > 3. Reduce the reference-count on the now-unneeded dict. > > It's not too hard for the second empty dict to get allocated in the same > memory that the first one (now dereferenced and de

Re: Subclass dynamically

2009-08-08 Thread Luis Alberto Zarrabeitia Gomez
Quoting Robert Dailey : > Hey, > > I have a class that I want to have a different base class depending on > a parameter that I pass to its __init__method. For example > (pseudocode): 1- Are you sure that you want that behavior? Given that in python, a class is just a particular case of invocabl

Re: initializing with empty list as default causes freaky problems

2009-07-28 Thread Luis Alberto Zarrabeitia Gomez
Quoting Reckoner : > Hi, > > Observe the following: > > In [202]: class Foo(): >.: def __init__(self,h=[]): >.: self.h=h [...] > In [207]: f.h.append(10) > > In [208]: f.h > Out[208]: [10] > > In [209]: g.h > Out[209]: [10] > > The question is: why is g.h updated

Re: Help understanding the decisions *behind* python?

2009-07-22 Thread Luis Alberto Zarrabeitia Gomez
Quoting Inky 788 : > > The good reason is the immutability, which lets you use > > a tuple as a dict key.   > > Thanks for the reply Hendrik (and Steven (other reply)). Perhaps I'm > just not sophisticated enough, but I've never wanted to use a list/ > tuple as a dict key. This sounds like obscu

Re: missing 'xor' Boolean operator

2009-07-16 Thread Luis Alberto Zarrabeitia Gomez
Quoting Jean-Michel Pichavant : > Emile van Sebille wrote: > > On 7/16/2009 7:04 AM Unknown said... > >> On 2009-07-16, Emile van Sebille wrote: > >>> daysInAdvance = int(inputVar) or 25 > >> > >> I don't get it. That doesn't work right when inputVar == "0". > >> > > Aah, but you didn't get to

Re: Exotic Logics

2009-06-17 Thread Luis Alberto Zarrabeitia Gomez
Quoting Lie Ryan : > pdpi wrote: > > On Jun 17, 5:37 pm, Lie Ryan wrote: > >> Steven D'Aprano wrote: > >>> On Tue, 16 Jun 2009 22:46:14 -0700, William Clifford wrote: > I was staring at a logic table the other day, and I asked myself, "what > if one wanted to play with exotic logics; h

Re: Adding a Par construct to Python?

2009-05-21 Thread Luis Alberto Zarrabeitia Gomez
Quoting Carl Banks : > I don't have any reply to this post except for the following excerpts: > > On May 20, 8:10 pm, Luis Alberto Zarrabeitia Gomez > wrote: > > 2- in [almost] every other language, _you_ have to be aware of the > critical > > sections when mul

Re: Adding a Par construct to Python?

2009-05-20 Thread Luis Alberto Zarrabeitia Gomez
Quoting Carl Banks : > On May 20, 4:07 pm, Luis Zarrabeitia wrote: > > On Wednesday 20 May 2009 06:16:39 pm Aahz wrote: > > The designers of Python made a design decision(**) that extension > writers would not have to take care of locking. They could have made > a different decision, they just

Re: pushback iterator

2009-05-17 Thread Luis Alberto Zarrabeitia Gomez
Quoting Mike Kazantsev : > And if you're "pushing back" the data for later use you might just as > well push it to dict with the right indexing, so the next "pop" won't > have to roam thru all the values again but instantly get the right one > from the cache, or just get on with that iterable unt

Re: Self function

2009-05-06 Thread Luis Alberto Zarrabeitia Gomez
Quoting Steven D'Aprano : > But regardless, everyone is missing the most important point: why are you > copying and pasting code in the first place? That is surely very close to > the top of the list of Worst Ever Anti-Patterns, and it should be avoided > whenever possible. [btw, I took this

Re: Self function

2009-05-06 Thread Luis Alberto Zarrabeitia Gomez
Quoting Rhodri James : > >> I'm sorry, but while I'm mildly positive towards the proposal (and more > >> so towards Aaron's decorator), I don't buy this argument at all. What > >> is broken about your editor's global search-and-replace function that > >> makes it "usually useless" for making the

Re: Multiprocessing.Queue - I want to end.

2009-05-05 Thread Luis Alberto Zarrabeitia Gomez
Quoting Cameron Simpson : > | And as it happens I have an IterableQueue class right here which does > | _exact_ what was just described. You're welcome to it if you like. > | Added bonus is that, as the name suggests, you can use the class as > | an iterator: > | for item in iterq: > | ...

Re: Multiprocessing.Queue - I want to end.

2009-05-03 Thread Luis Alberto Zarrabeitia Gomez
Quoting Dennis Lee Bieber : > I'm not familiar with the multiprocessing module and its queues but, > presuming it behaves similar to the threading module AND that you have > design control over the consumers (as you did in the sample) make a > minor change. > > queue.put(None) ONCE i

Re: Multiprocessing.Queue - I want to end.

2009-05-03 Thread Luis Alberto Zarrabeitia Gomez
Quoting Hendrik van Rooyen : > "Luis Zarrabeitia" wrote: > > 8< ---explanation and example of one producer, > 8< ---more consumers and one queue > > >As you can see, I'm sending one 'None' per consumer, and hoping that no > >consumer will read more than

Re: sorting two corresponding lists?

2009-04-20 Thread Luis Alberto Zarrabeitia Gomez
Quoting Esmail : > items = [apple, car, town, phone] > values = [5, 2, 7, 1] > > I would like to sort the 'items' list based on the 'values' list so > that I end up with the following two list: > > items = [town, apple, car, phone] > values = [7, 5, 2, 1] I've used this sometimes: === [unte

Re: any(), all() and empty iterable

2009-04-14 Thread Luis Alberto Zarrabeitia Gomez
Quoting John O'Hagan : > An exception, or at least a specific mention of the case of empty iterables > in the docs (as Tim Chase suggested), would have baffled me less than my > program telling me that the same items were both ubiquitous and entirely > absent from a list of sets! Well, they _w

Re: Imports in python are static, any solution?

2009-04-13 Thread Luis Alberto Zarrabeitia Gomez
Quoting Ravi : > > This is problematic. Well I want i to change with foo.fi() . You can't. i and foo.i are _different_ variables that just happen to share the same value initially. What you are observing is no different than i = 10 j = i i = 99 print i # prints 99 print j # print 10 May I

Re: any(), all() and empty iterable

2009-04-11 Thread Luis Alberto Zarrabeitia Gomez
Quoting John O'Hagan : > Hi, > > I was getting some surprising false positives as a result of not expecting > this: > > all(element in item for item in iterable) > > to return True when 'iterable' is empty. > [...] > any(element in item for item in iterable) > > which returns False when 'i

Re: nested looping

2009-04-08 Thread Luis Alberto Zarrabeitia Gomez
Quoting PK : > So I'm trying to see whats the cleanest way to do this: > > I have a > > checklist = [ax, bx, by, cy ..] (a combination of a,b,c with x and y, > either both on one) > > allist = [a,b,c,] > xlist = [x, y, ..] > [...] > now the problem is I want to include alpha in missing l

Re: python needs leaning stuff from other language

2009-04-02 Thread Luis Alberto Zarrabeitia Gomez
Quoting Esmail : > Diez B. Roggisch wrote: > > > > some_list[:] = [] > > I agree that this is nice and clear, Not very intuitive, though, until you learn the syntax. (but, slice accessing and slice assignment are among the first few things one learns about python anyway, and once you learn it,

Re: python needs leaning stuff from other language

2009-04-02 Thread Luis Alberto Zarrabeitia Gomez
Quoting online.serv...@ymail.com: > python's list needs a thing list.clear() like c# arraylist It has: >>> l[:] = [] > python needs a writeline() method Now, that could be useful, a writeline method that knew the EOL convention for the OS and were not as deceiving as the current .writeline

distutils, No module named numpy.distutils.fcompiler.conv_template

2009-03-30 Thread Luis Alberto Zarrabeitia Gomez
I'm trying to compile the wrappers for ANN (Approximate Nearest Neighbor) from http://scipy.org/scipy/scikits/wiki/AnnWrapper, either the main one (scikits) or the attachment in the main page. However, the command "python setup.py build" produces the exception: "ImportError: No module named nu

Re: Emacs users: feedback on diffs between python-mode.el and python.el?

2008-10-16 Thread Alberto Griggio
rting it to python-mode.el as well. Unfortunately, I don't have a clean diff, as I did some other tweaks... Alberto -- http://mail.python.org/mailman/listinfo/python-list

Re: Running Multiple Versions

2008-01-15 Thread Moises Alberto Lindo Gutarra
nix? > > Thanks > > Noel > -- > http://mail.python.org/mailman/listinfo/python-list > -- Atentamente, Moisés Alberto Lindo Gutarra Asesor - Desarrollador Java / Open Source -- http://mail.python.org/mailman/listinfo/python-list

Re: securing a python execution environment...

2007-11-19 Thread Alberto Berti
maybe using import hooks? http://www.python.org/dev/peps/pep-0302/ -- http://mail.python.org/mailman/listinfo/python-list

Re: why there is no pythonscript insine web browsers?

2007-11-15 Thread Alberto Berti
> "Piet" == Piet van Oostrum <[EMAIL PROTECTED]> writes: Piet> CGI is server-side. The OP was asking for client-side Piet> embedding of Python. FireFox 3 aka "Gran Paradiso" can be compiled to have python scripting but for security reasons it can be used only on crome:// urls, which l

Re: Populating a dictionary, fast

2007-11-11 Thread Alberto Berti
real0m55.913s user0m35.286s sys 0m0.852s $ python Python 2.4.4 (#2, Apr 26 2007, 00:02:45) [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 $ uname -a Linux lizard 2.6.21-1-k7 #1 SMP Sat May 26 16:56:05 UTC 2007 i686 GNU/Linux cheers Alberto -- http://mail.python.org/mailman/listinfo/python-list

Re: Populating a dictionary, fast

2007-11-11 Thread Alberto Berti
ine 500 Line 600 Line 700 Line 800 Items in dict: 8191180 Completed import at Sun Nov 11 16:39:49 2007 Starting to delete dict... Completed deletion at Sun Nov 11 16:39:56 2007 Finishing at Sun Nov 11 16:39:56 2007 all with python2.4 on and i386 Linux cheers Alberto -- http://mail.python.org/mailman/listinfo/python-list

Re: Writing GTK UI for Python apps in XUL

2007-11-02 Thread Alberto Berti
> "Devraj" == Devraj <[EMAIL PROTECTED]> writes: Devraj> Hi everyone, Is it possible to write UI code in XUL for a Devraj> GTK Python application? I found NuFox, which does the Devraj> reverse (lets me write Python to generate XUL) i wrote such a system as a proof of concept, it'

Re: Text processing and file creation

2007-09-06 Thread Alberto Griggio
, group in enumerate(nlines(5, open('bigfile.txt'))): out = open('chunk_%d.txt' % i) for line in group: out.write(line) > I am still wondering how to do this in Python (being new to Python) This is just one way of doing it, but not as concise as using split... Al

Re: python debugging under emacs?

2007-08-23 Thread Alberto Griggio
do what I want, I'd happily use it - for this. :) You can try pydb (http://bashdb.sourceforge.net/pydb/), has a GUD interface that in my experience works better than pdb... HTH, Alberto -- http://mail.python.org/mailman/listinfo/python-list

Re: wxGlade: Who knows how to drive this application?

2007-07-29 Thread Alberto Griggio
ers to see if there's any volunteer...) Alberto -- http://mail.python.org/mailman/listinfo/python-list

Re: wxGlade: Who knows how to drive this application?

2007-07-26 Thread Alberto Griggio
example of what you mean? Sure, wxGlade has bugs and isn't always in sync with the latest wxPython changes (usually the CVS version is better in this respect), but suggestions on how to improve it are always welcome... Alberto -- http://mail.python.org/mailman/listinfo/python-list

f2py problem

2007-05-15 Thread Alberto Vera
Hello. After I installed f2py using Python, NumPy and Numarray software, I can't use f2py I saw this error: Traceback (most recent call last): File "", line 1, in NameError: name 'f2py' is not defined >>> Could you tell me what is the problem? Regards. -- http://mail.python.org/mailman/l

Re: file.read() returns an emtpy even if its currenet position is not at the end

2007-04-22 Thread Alberto Valverde
iately". > Using readline() or readlines() instead of read() works great though. > > I'm using Python 2.4.3 on OS X. > > Probably I'm missing something but I could't figure out. > > Thanks in advance. I've hit into the same issue recently when im

Re: Problem with sockets and python 2.5

2007-03-21 Thread Jose Alberto Reguero
El Lunes, 19 de Marzo de 2007, Jose Alberto Reguero escribió: > I had two programs, server.py and client.py(attached) > > 1: > server.py at i386 python 2.4 > client.py at x86_64 python 2.5 > Work > > 2: > server.py at x86_64 python 2.5 > client

Problem with sockets and python 2.5

2007-03-19 Thread Jose Alberto Reguero
I had two programs, server.py and client.py(attached) 1: server.py at i386 python 2.4 client.py at x86_64 python 2.5 Work 2: server.py at x86_64 python 2.5 client.py at i386 python 2.4 Don't work Any ideas? Thanks. Jose Alberto clinet.py Descri

Re: using python to visit web sites and print the web sites image to files

2007-03-12 Thread Alberto Monteiro
ked all 1500+ scraps. This is not impossible. Maybe I should save the contents to a file... Alberto Monteiro -- http://mail.python.org/mailman/listinfo/python-list

Re: New to Python

2007-03-12 Thread Alberto Monteiro
I think you just have to adjust to the much more dynamic nature of > python a bit. > I know. Maybe I am trying to adjust to too many things at the same time. Alberto Monteiro -- http://mail.python.org/mailman/listinfo/python-list

Re: New to Python

2007-03-12 Thread Alberto Monteiro
ve a useful answer...) Another example, I found in pygame functions that would return something called an "EventList". But whenever I searched for "EventList" to see what is that, I got back to the page with the functions that returned the EventList :-) Also, basic things like ho

Re: New to Python

2007-03-12 Thread Alberto Monteiro
lly little newbie question would get so many _different_ answers! What is the best way to get documentation about the functions and classes of python? I tried to google, but usually I can just find the __doc__ of the objects, without examples or anything that can help me use it. Alberto Monteiro -- ht

New to Python

2007-03-12 Thread Alberto Vieira Ferreira Monteiro
Hi, I am new to Python, how stupid can be the questions I ask? For example, how can I add (mathematically) two tuples? x = (1,2) y = (3,4) How can I get z = (1 + 3, 2 + 4) ? Alberto Monteiro -- http://mail.python.org/mailman/listinfo/python-list

Validate a xml file with DTD from python

2005-12-07 Thread Julio Alberto
Hi. I need a way to reach a goal like this in python 2.3:This is a informal way to said it:  result = validateXmlWithDTD(XmlFilePath, DTDFilePath) #where result could be True,False or some exception   I'm not interested in a one specific sintaxis or way to do this. I try to find a  simple and tran

use libs from one of two releases

2005-07-22 Thread Alberto Vera
Hello.   I have two versions of Python. They were intalled in two different folders. (python22 and python23)   I have an old py that works in an older version. How can I change my old py to use libs of python22?   Regards     -- http://mail.python.org/mailman/listinfo/python-list

smtplib

2005-07-18 Thread Alberto Vera
Hello:   Do you know If the smtplib routine have been changed in last releases?   I used this script:   http://docs.python.org/lib/SMTP-example.html   but it didn't work with the last release.   Do you know any idea about this change?   Regards   -- http://mail.python.org/mailman/listinfo/py

open a mail and...

2005-07-15 Thread Alberto Vera
Hello   Is it possible to open a mail and download its files attached in a hard-disk using a python script?   Regards -- http://mail.python.org/mailman/listinfo/python-list

pdf in full-color

2005-06-30 Thread Alberto Vera
Hello.   I got a pdf file from a microsoft word document using Linbox-converter. The problem is that I got a pdf file in white&black color.   Do you know another library to convert this to a full-color? Is it possible to do that using Linbox-converter?   Regards -- http://mail.python.org/ma

doc 2 pdf

2005-06-30 Thread Alberto Vera
Hello. I tried to use reportlab to convert a doc to pdf file, but i didn't found any script to do this using python.   Do you have any script to convert a doc file? (doc->pdf)   Regards -- http://mail.python.org/mailman/listinfo/python-list

create a pdf file

2005-06-22 Thread Alberto Vera
Hello: I found a script that convert a file to PDF format , but it was made in PHP Do you know any script using Python? Regards -- http://mail.python.org/mailman/listinfo/python-list

Support

2005-03-28 Thread Alberto Troiano
)   The first question is how I can select by default one of the radiobuttons?   And the second is how can I “enable” (after this function) the first button?   Thanks in advanced   Alberto -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >