Phyton

2016-03-06 Thread Diego ...
Hello! I have a question in an exercise that says : Write an expression to determine whether a person should or should not pay tax . Consider paying tax people whose salary is greater than R $ 1,200.00 I do not know how to mount the logical expression !!! It's like: salary = 1250 tax = Not Tru

suppress pop up windwo

2007-08-03 Thread diego
t the name of the pdf I want to generate. Is there way to pass this filename to this window? (I'm using 'Jaws PDF Creator" as printer.) Thanks in advance for your help! Diego -- http://mail.python.org/mailman/listinfo/python-list

Problem with win32pipe.popen2

2007-01-15 Thread diego
I'm trying to understand how popen2 works. Found in this group, that popen2.popen2 can cause trouble so i chose win32pipe.popen2. have a look a the listing of 2 files: ekmain.py: ** import win32pipe (stdin1, stdout1) = win32pipe.popen2("test1.py") stdin1.write("1\n") print stdout1.rea

Connecting to Python COM server from Excel VBA does not work

2009-12-10 Thread diego
e error: Run-time error '-2137024770 (8007007e)': Automation error The specified module could not be found Any ideas what the problem could be? Already searched a long time for solutions but did not find any thanks, diego -- http://mail.python.org/mailman/listinfo/python-list

Re: Connecting to Python COM server from Excel VBA does not work

2009-12-10 Thread diego
On 10 Dez., 11:52, "Michel Claveau - MVP" wrote: > Hi ! > > Warning with lower/uppercases! > Try to make two versions of your methods (ex.: "add" & "ADD"), for study. > > @+ > -- > MCI The error comes already at the first line of Excel/VBA code: Set ex = CreateObject("MyPython.Example") rgds,e

Re: Connecting to Python COM server from Excel VBA does not work

2009-12-10 Thread diego
On 10 Dez., 11:52, "Michel Claveau - MVP" wrote: > Hi ! > > Warning with lower/uppercases! > Try to make two versions of your methods (ex.: "add" & "ADD"), for study. > > @+ > -- > MCI The error comes already at the first line of Excel/VBA code: Set ex = CreateObject("MyPython.Example") rgds,e

Re: Connecting to Python COM server from Excel VBA does not work

2009-12-10 Thread diego
the problem was that i had never installed python on my workstation. just had a Python25 folder with a batch-file that was adjustin the PATH and executing %PYTHONHOME%python.exe installed Python properly and now everything works fine -- http://mail.python.org/mailman/listinfo/python-list

Re: learnpython.org - an online interactive Python tutorial

2011-04-21 Thread Diego Arias
On Thu, Apr 21, 2011 at 8:20 PM, Dan Stromberg wrote: > > On Thu, Apr 21, 2011 at 9:13 AM, MRAB wrote: > >> On 21/04/2011 15:14, Westley Martínez wrote: >> >>> On Thu, Apr 21, 2011 at 05:19:29PM +1000, Chris Angelico wrote: >>> On Thu, Apr 21, 2011 at 5:10 PM, Algis Kabaila wrote: >>>

Re: How to replace an instance method?

2022-09-21 Thread Diego Souza
which this would be acceptable is when you or your boss have an important presentation in the next hour, and you need a quick fix to make it work in order to demonstrate it. After the presentation is over and people have validated the functionality you should properly implement it. Keep It Si

RE: Asynchronous execution of synchronous functions

2022-09-26 Thread Diego Souza
https://docs.python.org/3/library/concurrent.futures.html#processpoolexecutor Keep in mind that Python's threads have a global interpreter lock (GIL) that prevents full parallelism. Processes work as expected, but require IPC and pickable objects in and out. -- Diego Souza Wespa Intelligent Systems Rio

Re: Multithreading? How?

2023-05-12 Thread Diego Souza
n the gateway memory. Then, I would send it back through MQTT immediately. The second approach is to forward the request to the device. The device will later respond to your query with the original question and response. You likely need the question as you need to remember what you need to do with it

Mock object bug with assert_not_called

2016-12-27 Thread Diego Vela
eps Create a mock object using the @patch decorator for a function. call a function that that calls the mocked function. check assert_not_called and assert_called with. Thank you for your time. -- Diego Vela -- https://mail.python.org/mailman/listinfo/python-list

Re: Re: Mock object bug with assert_not_called (Steve D'Aprano)

2016-12-28 Thread Diego Vela
sufficient? I'm not so sure, this is my first time. Thanks for the help. -- Diego Vela -- https://mail.python.org/mailman/listinfo/python-list

Change OnScreen Keyboard StringVar (Show linked to one Entry)

2016-04-10 Thread Diego Lelis
Hi guys, im having a little problem to make the StringVar Linked to my OnScreen Keyboard Change when the user click in one Entry. Here's my code: from tkinter import * Begin Code___ def frame(root, side): w = Frame(root) w.

Change Windows Tkinter after some time

2016-04-10 Thread Diego Lelis
I need to make a change between windows, after some time. But i am have a little bit of trouble making my code work: My windows change only when i click on button, i tried to put lambda in my command and also don't work. import tkinter as tk # python3 #import Tkinter as tk # python import da

mask and proper index

2019-02-03 Thread diego . avesani
Dear all, I am trying to apply a mask to my dataframe: mask = (df['datatime'] > start_date) & (df['datatime'] <= end_date) df = df.loc[mask] It seems to work pretty well. After that I crate the cumulative of its element as: PP_cumPP = np.cumsum(df[PP_station]) However, I am not able to co

Re: mask and proper index

2019-02-04 Thread Diego Avesani
of forum. In this moment, I have another problem related to the data I am working on. Should I write another post? Should I do something else related to this post? Thanks a lot again, you are my lifesaver On Sunday, 3 February 2019 16:56:44 UTC+1, Diego Avesani wrote: > Dear all, >

format number is not recognized in a cycle

2019-02-04 Thread Diego Avesani
File "/usr/lib/python2.7/dist-packages/numpy/core/_internal.py", line 173, in _commastring (len(result)+1, astr)) ValueError: format number 1 of "2012-01-01 06:00" is not recognized On the contrary, if I use the simple variables: start_date = 2012-01-01 06:00 end_date

pandas read dataframe and sum all value same month and year

2019-02-04 Thread Diego Avesani
alue in the same month. I have tried with: df.groupby(pd.TimeGrouper('M')).sum() But as always, it seems that I have same problems with the indexes. Indeed, I get: 'an instance of %r' % type(ax).__name__) TypeError: axis must be a DatetimeIndex, but got an instance o

Re: format number is not recognized in a cycle

2019-02-04 Thread Diego Avesani
0, 0,0 2012-01-01 21:00, -7.7,100, 818,118, 0.7, 0.0, 0, 0,0 2012-01-01 22:00, -7.8,100, 817,130, 0.5, 0.0, 0, 0,0 2012-01-01 23:00, -7.9,100, 816,160, 0.6, 0.0, 0, 0,0 2012-01-02 00:00, -8.3,100, 816,123, 0.6, 0.0, 0, 0,0 2012-01-02 01:00, -8.6,100, 815,119, 0.8, 0.0,

Re: format number is not recognized in a cycle

2019-02-04 Thread Diego Avesani
ks On Monday, 4 February 2019 20:00:32 UTC+1, Peter Otten wrote: > Diego Avesani wrote: > > > this is the code: > > While the example is fine now it runs without error over here, on rather old > versions of pandas (0.13.1) and numpy (1.8.2). > > The

Re: pandas read dataframe and sum all value same month and year

2019-02-04 Thread Diego Avesani
12-01-01 09:00, 3.1, 76, 912, 22, 0.8, 0.0, 134, 44,0 2012-01-01 10:00, 3.4, 77, 912, 37, 0.5, 0.0, 191, 67,0 2012-01-01 11:00, 3.5,100, 912,349, 0.4, 0.0, 277, 44,0 2012-01-01 12:00, 3.6,100, 912, 17, 0.9, 0.0, 292, 22,0 2012-01-01 13:00, 3.5,100, 912, 28, 0.3, 0.0, 219, 44,0 20

Re: format number is not recognized in a cycle

2019-02-04 Thread Diego Avesani
Dear all, Dear Peter, could you suggest me one? Thanks a lot, Diego On Monday, 4 February 2019 13:58:17 UTC+1, Diego Avesani wrote: > Dear all, > > I have this dataframe: > > datatime,T,RH,PSFC,DIR,VEL10,PREC,RAD,CC,FOG > 2012-01-01 06:00, 0.4,100, 911,321, 2.5, 0.0,

Different results for different versions of urllib2

2012-04-20 Thread Diego Manenti Martins
llib2.urlopen(url, data) It works the same way for python2.5 and python2.6 but not for python2.7 I checked the sent data with WireShark and it sends the data in a different way. I'm not an expert I just see it's different :) It might be a server problem although I think the lib should b

Re: Different results for different versions of urllib2

2012-04-20 Thread Diego Manenti Martins
On Fri, Apr 20, 2012 at 10:08 PM, Dave Angel wrote: > On 04/20/2012 06:47 PM, Diego Manenti Martins wrote: >> Hi. >> Anybody knows the data is sent in a different way for Python 2.5, 2.6 >> and 2.7 using this code: >> >>>>> import urllib2 >>&g

Re: Re: Different results for different versions of urllib2

2012-04-20 Thread Diego Manenti Martins
On Fri, Apr 20, 2012 at 11:09 PM, Dave Angel wrote: > You forgot to include the list in your response.  I don't normally > respond to private messages, but I'll make an exception. Sorry about that and thanks. >> On 04/20/2012 06:47 PM, Diego Manenti Martins wrote: >>

Documentación desde la terminal de comandos.

2012-06-07 Thread Diego Uribe Gamez
Una pregunta, como puedo listar todas las librerías que puedo importar a un .py? y de sus clases? en la terminal de Linux Debian, algo así como cuando listo todos los programas usando "# aptitude search nombre" Se que entro a otra terminal usando "# Python" Gracias --

Autoglade

2007-10-10 Thread Diego Torres Milano
omments, suggestions, critics, bugs, fixes, etc are gladly welcome. -- Diego Torres Milano -- http://mail.python.org/mailman/listinfo/python-list

Error when executing the library reference echo server example

2007-12-10 Thread diego . martin . a
Hi. Python newbie speaking, I've copy/pasted the example of the echo server that comes in the IDLE documentation ("Python Library Reference" section 17.2.3) to see how the sockets work. The only change I've made is in the host address which I've set to 'localhost' in the client. You can see the co

Re: Error when executing the library reference echo server example

2007-12-10 Thread diego . martin . a
On Dec 10, 1:48 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On Mon, 10 Dec 2007 04:16:03 -0800 (PST), [EMAIL PROTECTED] wrote: > >Hi. Python newbie speaking, > > >I've copy/pasted the example of the echo server that comes in the IDLE > >documentation ("Python Library Reference" section 17.

Python and Test Driven Development

2006-05-19 Thread Diego Torres Milano
First part of a series of articles about Python and Test Driven Development can be found at http://dtmilano.blogspot.com/2006/05/python-and-test-driven-development.html. These articles include some scripts to ease automatic test suite creation in Python. Comments are gladly welcome. -- htt

Binary Trees in Python

2005-08-20 Thread [diegueus9] Diego Andrés Sanabria
Hello!!! I want know if python have binary trees and more? -- http://mail.python.org/mailman/listinfo/python-list

Re: TKinter in Python - advanced notions

2023-06-22 Thread Diego Souza via Python-list
json > formatted widget specific information, lol.) > > I have felt that sense of lack with most of the UI modules I have tried > though. > > I don't know of a clear better python-only solution though that fits my > personal needs. > > So I have to lean toward impr