Re: Calculator

2020-02-01 Thread Marek Mosiewicz
Considering just basic calculator with eval it could be possible search eval string if it only contains digits, parenthensis and operators. Assuring no letter (maybe except e for expotential) and special characters this calculator should be quite safe. But I give no any warranty for such security.

Re: Calculator

2020-01-16 Thread Chris Angelico
On Fri, Jan 17, 2020 at 9:17 AM Python wrote: > > Le 16/01/2020 à 11:56, samna...@gmail.com a écrit : > > On Wednesday, 15 January 2020 17:09:56 UTC, Python wrote: > >> Le 15/01/2020 à 16:34, andersh...@gmail.com a écrit : > >>> Thanks! > >> > >> Do not try it, though, with a expression such as >

Re: Calculator

2020-01-16 Thread Python
Le 16/01/2020 à 11:56, samna...@gmail.com a écrit : On Wednesday, 15 January 2020 17:09:56 UTC, Python wrote: Le 15/01/2020 à 16:34, andersh...@gmail.com a écrit : Thanks! Do not try it, though, with a expression such as import os; os.system('rm -rf ~/*'). If you want something safer, http

Re: Calculator

2020-01-16 Thread samnalty
On Wednesday, 15 January 2020 17:09:56 UTC, Python wrote: > Le 15/01/2020 à 16:34, andersh...@gmail.com a écrit : > > Thanks! > > Do not try it, though, with a expression such as > import os; os.system('rm -rf ~/*'). If you want something safer, https://github.com/pydata/numexpr has an expressi

Re: Calculator

2020-01-15 Thread Python
Le 15/01/2020 à 16:34, andersh...@gmail.com a écrit : Thanks! Do not try it, though, with a expression such as import os; os.system('rm -rf ~/*'). -- https://mail.python.org/mailman/listinfo/python-list

Re: Calculator

2020-01-15 Thread andershe02
Thanks! -- https://mail.python.org/mailman/listinfo/python-list

Re: Calculator

2020-01-15 Thread samnalty
On Wednesday, 15 January 2020 15:16:45 UTC, ander...@gmail.com wrote: > Hey! > I’m trying to implement a calculator that converts a string; for excample > «3+98*4», to a number. Is there a module or command that I can use to > automate this? It’s literal hell making it from scratch. > > -Anders

Re: calculator between raster

2016-10-09 Thread chrischris201444
Τη Κυριακή, 9 Οκτωβρίου 2016 - 11:55:54 μ.μ. UTC+3, ο χρήστης chrischr...@gmail.com έγραψε: > any idea how to calculator rasters images ?like > ((raster1+raster2)*(raster4*9)} > for example. > maybe is easy that question but i dont work again with raster and python > i have gdal,numpy,scipy,pygeo

Re: calculator between raster

2016-10-09 Thread Christian Gollwitzer
Am 09.10.16 um 22:55 schrieb chrischris201...@gmail.com: any idea how to calculator rasters images ?like ((raster1+raster2)*(raster4*9)} for example. maybe is easy that question but i dont work again with raster and python i have gdal,numpy,scipy,pygeoprocesing and more With PIL you can read an i

Re: Calculator Problem

2014-02-05 Thread 88888 Dihedral
On Monday, February 3, 2014 5:16:44 AM UTC+8, Charlie Winn wrote: > Hey Guys i Need Help , When i run this program i get the 'None' Under the > program, see what i mean by just running it , can someone help me fix this > > > > def Addition(): > > print('Addition: What are two your numbers?

Re: Calculator Problem

2014-02-05 Thread Peter Otten
Joshua Landau wrote: > On 5 February 2014 02:22, Dan Sommers wrote: > >> On Tue, 04 Feb 2014 19:53:52 -0500, Roy Smith wrote: >> >> > In article , >> > David Hutto wrote: >> > >> >> Can anyone point out how using an int as a var is possible >> > >> > one = 42 >> > >> > (ducking and running) >>

Re: Calculator Problem

2014-02-05 Thread Joshua Landau
On 5 February 2014 02:22, Dan Sommers wrote: > On Tue, 04 Feb 2014 19:53:52 -0500, Roy Smith wrote: > > > In article , > > David Hutto wrote: > > > >> Can anyone point out how using an int as a var is possible > > > > one = 42 > > > > (ducking and running) > > int = 42 > > (ducking lower and ru

Re: Calculator Problem

2014-02-04 Thread Dan Sommers
On Tue, 04 Feb 2014 19:53:52 -0500, Roy Smith wrote: > In article , > David Hutto wrote: > >> Can anyone point out how using an int as a var is possible > > one = 42 > > (ducking and running) int = 42 (ducking lower and running faster) -- https://mail.python.org/mailman/listinfo/python-lis

Re: Calculator Problem

2014-02-04 Thread Chris Angelico
On Wed, Feb 5, 2014 at 11:53 AM, Roy Smith wrote: > In article , > David Hutto wrote: > >> Can anyone point out how using an int as a var is possible > > one = 42 > > (ducking and running) In theory, there might be a Unicode character that's valid as an identifier, but gets converted into U+003

Re: Calculator Problem

2014-02-04 Thread Roy Smith
In article , David Hutto wrote: > Can anyone point out how using an int as a var is possible one = 42 (ducking and running) -- https://mail.python.org/mailman/listinfo/python-list

Re: Calculator Problem

2014-02-04 Thread Mario R. Osorio
On Sunday, February 2, 2014 4:16:44 PM UTC-5, Charlie Winn wrote: > Hey Guys i Need Help , When i run this program i get the 'None' Under the > program, see what i mean by just running it , can someone help me fix this > > > > def Addition(): > > print('Addition: What are two your numbers?

Re: Calculator Problem

2014-02-04 Thread David Hutto
Missed that it's already pointed out, was looking at the google groups combined email. On Tue, Feb 4, 2014 at 10:43 AM, David Hutto wrote: > On Sunday, February 2, 2014 4:16:44 PM UTC-5, Charlie Winn wrote: > > Hey Guys i Need Help , When i run this program i get the 'None' Under > the program

Re: Calculator Problem

2014-02-04 Thread David Hutto
On Sunday, February 2, 2014 4:16:44 PM UTC-5, Charlie Winn wrote: > Hey Guys i Need Help , When i run this program i get the 'None' Under the > program, see what i mean by just running it , can someone help me fix this > > > > def Addition(): > > print('Addition: What are two your numbers?

Re: Calculator Problem

2014-02-03 Thread Denis McMahon
On Mon, 03 Feb 2014 10:25:37 -0800, Charlie Winn wrote: > Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 18 2013, 21:19:30) [MSC v.1600 64 > bit (AMD64)] on win32 Type "copyright", "credits" or "license()" for > more information. RESTART =

Re: Calculator Problem

2014-02-03 Thread Ian Kelly
On Feb 3, 2014 3:26 PM, "Steven D'Aprano" < steve+comp.lang.pyt...@pearwood.info> wrote: > > On Mon, 03 Feb 2014 10:04:35 -0800, Charlie Winn wrote: > > > excuse me but don't be so *** rude , i did run this program and it > > did run correctly > > Charlie, you may have run *some* program, but i

Re: Calculator Problem

2014-02-03 Thread Gary Herron
On 02/03/2014 10:04 AM, Charlie Winn wrote: On Sunday, February 2, 2014 9:46:24 PM UTC, Gary Herron wrote: ... Sorry, but in fact you did *not* run this program as you claim. It's full of syntax errors. Any attempt to run it will display syntax errors immediately, and never actually run.

Re: Calculator Problem

2014-02-03 Thread Steven D'Aprano
On Mon, 03 Feb 2014 10:04:35 -0800, Charlie Winn wrote: > excuse me but don't be so *** rude , i did run this program and it > did run correctly Charlie, you may have run *some* program, but it wasn't the program you posted here. And if it ran correctly, why are you asking for help? The co

Re: Calculator Problem

2014-02-03 Thread Charlie Winn
On Monday, February 3, 2014 6:17:44 PM UTC, Joel Goldstick wrote: > On Feb 3, 2014 1:05 PM, "Charlie Winn" wrote: > > > > > > On Sunday, February 2, 2014 9:46:24 PM UTC, Gary Herron wrote: > > > > On 02/02/2014 01:16 PM, Charlie Winn wrote: > > > > > > > > > Hey Guys i Need Help , When i run

Re: Calculator Problem

2014-02-03 Thread Roy Smith
Charlie Winn wrote: > excuse me but don't be so *** rude , i did run this program and it did > run correctly and if you want me to prove it with screenshots so be it , so > don't make accusations ** Gary ** i only came here for some help not to be > accused of not even running my program H

Re: Calculator Problem

2014-02-03 Thread Joel Goldstick
On Feb 3, 2014 1:05 PM, "Charlie Winn" wrote: > > On Sunday, February 2, 2014 9:46:24 PM UTC, Gary Herron wrote: > > On 02/02/2014 01:16 PM, Charlie Winn wrote: > > > > > Hey Guys i Need Help , When i run this program i get the 'None' Under the program, see what i mean by just running it , can som

Re: Calculator Problem

2014-02-03 Thread Charlie Winn
On Sunday, February 2, 2014 9:46:24 PM UTC, Gary Herron wrote: > On 02/02/2014 01:16 PM, Charlie Winn wrote: > > > Hey Guys i Need Help , When i run this program i get the 'None' Under the > > program, see what i mean by just running it , can someone help me fix this > > > > > > def Addition():

Re: Calculator Problem

2014-02-02 Thread Denis McMahon
On Sun, 02 Feb 2014 13:46:24 -0800, Gary Herron wrote: > Sorry, but in fact you did *not* run this program as you claim. +1 I can also see a call to a function named Question, but I can't see where that function is defined. That might not be a major issue, because I don't think the while con

Re: Calculator Problem

2014-02-02 Thread Gary Herron
On 02/02/2014 01:16 PM, Charlie Winn wrote: Hey Guys i Need Help , When i run this program i get the 'None' Under the program, see what i mean by just running it , can someone help me fix this def Addition(): print('Addition: What are two your numbers?') 1 = float(input('First Number:

Re: Calculator Problem

2014-02-02 Thread Alister
On Sun, 02 Feb 2014 13:16:44 -0800, Charlie Winn wrote: > Hey Guys i Need Help , When i run this program i get the 'None' Under > the program, see what i mean by just running it , can someone help me > fix this > > def Addition(): > print('Addition: What are two your numbers?') > 1 = floa