On 17Jan2022 11:36, Shaozhong SHI wrote:
>Set Operation System but not disturbing existing setting. Only to add at
>the command line.
If you mean: "set on the command line so that I run some script using
Python 3.6.1", usually you would just invoke the specific Python 3.6.1
executable.
You ca
gt; > How do I set environmental variables for Python 3.6.1 to work?
>
>
> Set from Python, or set in the OpSys?
>
> https://docs.python.org/3/library/os.html?highlight=environment%20variable
>
> MS-Win: https://docs.python.org/3/using/windows.html#setting-envvars
> --
> Regar
On 17/01/2022 22.31, Shaozhong SHI wrote:
> I got quite a few version of Python on my machine.
>
> How do I set environmental variables for Python 3.6.1 to work?
Set from Python, or set in the OpSys?
https://docs.python.org/3/library/os.html?highlight=environment%20variable
MS-W
I got quite a few version of Python on my machine.
How do I set environmental variables for Python 3.6.1 to work?
Regards,
David
--
https://mail.python.org/mailman/listinfo/python-list
On 16/06/21 10:51 pm, Elena wrote:
sorry I wrote it wrongly, my bad, I will use f just to predict yi from new
coming Xi.
Then what do you do with the new yi?
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
Il Wed, 16 Jun 2021 11:37:42 +1200, Greg Ewing ha scritto:
> On 15/06/21 10:07 pm, Elena wrote:
>> After the optimization, I will use f just to predict new Xi.
>
> So you're going to use f backwards?
>
> I don't see how that will work. Where are you going to find a new yi to
> feed into the inve
On 15/06/21 10:07 pm, Elena wrote:
After the optimization, I will use f just to predict new Xi.
So you're going to use f backwards?
I don't see how that will work. Where are you going to
find a new yi to feed into the inverse of f?
I think I don't understand what role g plays in all of
this.
Il Tue, 15 Jun 2021 01:53:09 +, Martin Di Paola ha scritto:
> From what I'm understanding it is an "optimization problem" like the
> ones that you find in "linear programming".
>
> But in your case the variables are not Real (they are Integers) and
Il Tue, 15 Jun 2021 10:40:05 +1200, Greg Ewing ha scritto:
> On 15/06/21 12:51 am, Elena wrote:
> Hmmm, so the problem breaks down into two parts:
> (1) find a vector Y that minimises g (2) find a set of rules that will
> allow you to predict each component of Y from its corresponding X values
>
From what I'm understanding it is an "optimization problem" like the
ones that you find in "linear programming".
But in your case the variables are not Real (they are Integers) and the
function to minimize g() is not linear.
You could try/explore CVXPY (https://www
On 15/06/21 12:51 am, Elena wrote:
I see what you mean, so I try to explain it better: Y is a vector say [y1,
y2, ... yn], with large (n>>10), where yi = f(Xi) with Xi = [x1i, x2i, ...
x10i] 1<=i<=n. All yi and xji assume discrete values.
I already have a dataset of X={Xi} and would like to find
On 6/13/21 12:15 PM, Elena via Python-list wrote:
> Hi, I have, say 10 variables (x1 ... x10) which can assume discrete finite
> values, for instance [0,1 or 2].
> I need to build a set of rules, such as:
>
> 1) if x1==0 and x2==1 and x10==2 then y = 1
> 2) if x2==1 and x3==1 a
Il Mon, 14 Jun 2021 19:39:17 +1200, Greg Ewing ha scritto:
> On 14/06/21 4:15 am, Elena wrote:
>> Given a dataset of X={(x1... x10)} I can calculate Y=f(X) where f is
>> this rule-based function.
>>
>> I know an operator g that can calculate a real value from Y: e = g(Y)
>> g is too complex to be
Hi, I have, say 10 variables (x1 ... x10) which can assume discrete finite
values, for instance [0,1 or 2].
I need to build a set of rules, such as:
1) if x1==0 and x2==1 and x10==2 then y = 1
2) if x2==1 and x3==1 and x4==2 and x6==0 then y = 0
3) if x2==0 and x3==1 then y = 2
4) if x6==0 and
On 14/06/21 4:15 am, Elena wrote:
Given a dataset of X={(x1... x10)} I can calculate Y=f(X) where f is this
rule-based function.
I know an operator g that can calculate a real value from Y: e = g(Y)
g is too complex to be written analytically.
I would like to find a set of rules f able to minim
r...@zedat.fu-berlin.de (Stefan Ram) writes:
> This C program use a local /static/ variable.
>
> main.c
>
> #include
>
> int f( void )
> { static int i = 0;
> return i++; }
>
> int main( void )
> { printf( "%d\n", f() );
> printf( "%d\n", f() );
> printf( "%d\n", f() ); }
>
> transcri
On 01/11/2019 17:07, MRAB wrote:
On 2019-11-01 12:36, Rhodri James wrote:
On 31/10/2019 20:14, MRAB wrote:
On 2019-10-31 18:46, ferzan saglam wrote:
The code below which I have written should print the result of 43.6
with the given values I have included at the end of this question,
but for s
On 2019-11-01 12:36, Rhodri James wrote:
On 31/10/2019 20:14, MRAB wrote:
On 2019-10-31 18:46, ferzan saglam wrote:
The code below which I have written should print the result of 43.6
with the given values I have included at the end of this question, but
for some odd reason I get the result of
On 31/10/2019 20:14, MRAB wrote:
On 2019-10-31 18:46, ferzan saglam wrote:
The code below which I have written should print the result of 43.6
with the given values I have included at the end of this question, but
for some odd reason I get the result of 44.44.
bill = (input("Enter the total
On 2019-10-31 18:46, ferzan saglam wrote:
The code below which I have written should print the result of 43.6 with the
given values I have included at the end of this question, but for some odd
reason I get the result of 44.44.
bill = (input("Enter the total cost of the meal: \n"))
On 10/31/19 11:46 AM, ferzan...@gmail.com wrote:
The code below which I have written should print the result of 43.6 with the
given values I have included at the end of this question, but for some odd
reason I get the result of 44.44.
bill = (input("Enter the total cost of the meal: \n"))
9 2:46 PM
To: python-list@python.org
Subject: Calculations and Variables
The code below which I have written should print the result of 43.6 with the
given values I have included at the end of this question, but for some odd
reason I get the result of 44.44.
bill = (input("Enter
The code below which I have written should print the result of 43.6 with the
given values I have included at the end of this question, but for some odd
reason I get the result of 44.44.
bill = (input("Enter the total cost of the meal: \n"))
09.10.19 14:02, Chris Angelico пише:
The decorator has full access to the function object, including a
reference to that function's module globals.
def trace(func):
log = func.__globals__["log"]
... proceed as before
As long as you can depend on "log" always being a module-level
(glob
On 9/10/19 13:02, Chris Angelico wrote:
> On Wed, Oct 9, 2019 at 9:53 PM Antoon Pardon wrote:
>> I have some logging utilities so that when I write library code, I just use
>> the following.
>>
>> from logutil import Logger
>>
>> log = Logger(__name__)
> Are you always absolutely consistent with
Antoon Pardon wrote:
> I have some logging utilities so that when I write library code, I just
> use the following.
>
> from logutil import Logger
>
> log = Logger(__name__)
If logutil is under your control you can make log a callable object with a
tracing method:
[logutil.py]
class Logger:
On Wed, Oct 9, 2019 at 9:53 PM Antoon Pardon wrote:
>
> I have some logging utilities so that when I write library code, I just use
> the following.
>
> from logutil import Logger
>
> log = Logger(__name__)
Are you always absolutely consistent with this? Do you always have it
as a module-level v
I have some logging utilities so that when I write library code, I just use the
following.
from logutil import Logger
log = Logger(__name__)
And from then on I just use log, to do the logging of that module.
But now I would like to write a decorator trace, so that a decorated
function would lo
On Fri, Aug 23, 2019 at 4:00 AM Windson Yang wrote:
>
> Thank you all. I agreed with Frank that
>
> > It would make sense to use the 'global' keyword if you have a module
> with various functions, several of which refer to 'foo', but only one of
> which changes the value of 'foo'.
>
> I also found
Thank you all. I agreed with Frank that
> It would make sense to use the 'global' keyword if you have a module
with various functions, several of which refer to 'foo', but only one of
which changes the value of 'foo'.
I also found an example in cpython/lib/gettext.py, only 'textdomain
function' c
On 23Aug2019 09:07, Frank Millman wrote:
On 2019-08-23 8:43 AM, Windson Yang wrote:
In class.py
class Example:
def __init__(self):
self.foo = 1
def bar()
return self.foo + 1
Expect the syntax, why using class variable self.foo would be better (or
m
On 23Aug2019 14:43, Windson Yang wrote:
I also want to know what is the difference between "using 'global
variables' in a py module" and "using a variable in class". For example:
In global.py:
foo = 1
def bar():
global foo
return foo + 1
On 2019-08-23 8:43 AM, Windson Yang wrote:
I also want to know what is the difference between "using 'global
variables' in a py module" and "using a variable in class". For example:
In global.py:
foo = 1
def bar():
global foo
return foo
I also want to know what is the difference between "using 'global
variables' in a py module" and "using a variable in class". For example:
In global.py:
foo = 1
def bar():
global foo
return foo + 1
In class.py
class Exam
On Fri, Aug 23, 2019 at 11:24 AM Windson Yang wrote:
>
> Thank you all for the great explanation, I still trying to find some good
> example to use 'global', In CPython, I found an example use 'global' in
> cpython/Lib/zipfile.py
>
> _crctable = None
> def _gen_crc(crc):
> for j in
Thank you all for the great explanation, I still trying to find some good
example to use 'global', In CPython, I found an example use 'global' in
cpython/Lib/zipfile.py
_crctable = None
def _gen_crc(crc):
for j in range(8):
if crc & 1:
crc = (crc >> 1) ^
On 8/22/19 12:00 PM, Windson Yang wrote:
> I can 'feel' that global variables are evil. I also read lots of articles
> proves that (http://wiki.c2.com/?GlobalVariablesAreBad). However, I found
> CPython Lib use quite a lot of `global` keyword. So how should we use
> `glo
On Fri, Aug 23, 2019 at 10:18 AM Cameron Simpson wrote:
> As Michael says, "you can always read from a parent scope if the name
> hasn't been used by the local scope". What this means is this:
>
> _MODULE_LEVEL_CACHE = {}
>
> def factors_of(n):
> factors = _MODULE_LEVEL_CACHE.get(n
On 22Aug2019 11:12, Michael Torrie wrote:
On 8/22/19 10:00 AM, Windson Yang wrote:
I can 'feel' that global variables are evil. I also read lots of articles
proves that (http://wiki.c2.com/?GlobalVariablesAreBad). However, I found
CPython Lib use quite a lot of `global` keyword. So
On 8/22/19 10:00 AM, Windson Yang wrote:
> I can 'feel' that global variables are evil. I also read lots of articles
> proves that (http://wiki.c2.com/?GlobalVariablesAreBad). However, I found
> CPython Lib use quite a lot of `global` keyword. So how should we use
> `glo
I can 'feel' that global variables are evil. I also read lots of articles
proves that (http://wiki.c2.com/?GlobalVariablesAreBad). However, I found
CPython Lib use quite a lot of `global` keyword. So how should we use
`global` keyword correctly? IIUC, it's fine that we use `global`
do you replace a
> > > variable with its value". For what i understood with the example values,
> > > CrazyVideoGamez wants 3 variables named like the meal-names in
> dictionary.
> > > Yes, it's not secure unless you work with your own dataset (just like
>
example values,
> > CrazyVideoGamez wants 3 variables named like the meal-names in
dictionary.
> > Yes, it's not secure unless you work with your own dataset (just like
> > sending your own created commands with set=True in subprocess). Yes
there
> > might be bet
On Fri, Jul 12, 2019 at 2:30 PM Aldwin Pollefeyt
wrote:
>
> Wow, I'm so sorry I answered on the question : "How do you replace a
> variable with its value". For what i understood with the example values,
> CrazyVideoGamez wants 3 variables named like the meal-names in
Wow, I'm so sorry I answered on the question : "How do you replace a
variable with its value". For what i understood with the example values,
CrazyVideoGamez wants 3 variables named like the meal-names in dictionary.
Yes, it's not secure unless you work with your own datase
Aldwin Pollefeyt writes:
> dinner = {'Starters':['Fried Calamari', 'Potted crab'],'Main
> Course':['Fish', 'Meat'], 'Desert':['Cake', 'Banana Split']}
>
> # Don't ask where I got the dinner from
>
> for meal in dinner.keys():
> exec(meal.replace(' ','_') + ' = list(dinner[meal])')
>
> print(S
On Fri, Jul 12, 2019 at 4:37 AM Terry Reedy wrote:
>
> On 7/11/2019 12:51 AM, Aldwin Pollefeyt wrote:
> > dinner = {'Starters':['Fried Calamari', 'Potted crab'],'Main
> > Course':['Fish', 'Meat'], 'Desert':['Cake', 'Banana Split']}
> >
> > # Don't ask where I got the dinner from
> >
> > for meal i
On 11/07/2019 05:51, Aldwin Pollefeyt wrote:
dinner = {'Starters':['Fried Calamari', 'Potted crab'],'Main
Course':['Fish', 'Meat'], 'Desert':['Cake', 'Banana Split']}
# Don't ask where I got the dinner from
for meal in dinner.keys():
exec(meal.replace(' ','_') + ' = list(dinner[meal])')
p
On 7/11/2019 12:51 AM, Aldwin Pollefeyt wrote:
dinner = {'Starters':['Fried Calamari', 'Potted crab'],'Main
Course':['Fish', 'Meat'], 'Desert':['Cake', 'Banana Split']}
# Don't ask where I got the dinner from
for meal in dinner.keys():
exec(meal.replace(' ','_') + ' = list(dinner[meal])')
dinner = {'Starters':['Fried Calamari', 'Potted crab'],'Main
Course':['Fish', 'Meat'], 'Desert':['Cake', 'Banana Split']}
# Don't ask where I got the dinner from
for meal in dinner.keys():
exec(meal.replace(' ','_') + ' = list(dinner[meal])')
print(Starters)
print(Main_Course)
print(Desert)
On 2019-07-11 12:43 AM, CrazyVideoGamez wrote:
How do you replace a variable with its value in python 3.7.2? For example, say
I have:
dinner = {'Starters':['Fried Calamari', 'Potted crab'],'Main Course':['Fish',
'Meat'], 'Desert':['Cake', 'Banana Split']}
# Don't ask where I got the dinner fr
Terry Reedy writes:
> On 7/10/2019 6:37 PM, CrazyVideoGamez wrote:
>
> > and I'm just changing it with the code above (you can find that by
> > printing it out). How can I make separate lists called 'Starters',
> > 'Main Course', and 'Desert'?
>
> starters = dinner['Starters']
> main_course = din
On 7/10/2019 6:37 PM, CrazyVideoGamez wrote:
the below twice. Please post just once and be patient for at least a
couple of hours -- or days if not subscribed.
How do you replace a variable with its value in python 3.7.2?
Use the variable (name) in an expression. But this is not what you
How do you replace a variable with its value in python 3.7.2? For example, say
I have:
dinner = {'Starters':['Fried Calamari', 'Potted crab'],'Main Course':['Fish',
'Meat'], 'Desert':['Cake', 'Banana Split']}
# Don't ask where I got the dinner from
for meal in dinner.keys():
meal = l
How do you replace a variable with its value in python 3.7.2? For example, say
I have:
dinner = {'Starters':['Fried Calamari', 'Potted crab'],'Main Course':['Fish',
'Meat'], 'Desert':['Cake', 'Banana Split']}
# Don't ask where I got the dinner from
for meal in dinner.keys():
meal = lis
Hello, iam tryting to execute mysql queries based on python variables.
name = request.args.get('name')
month = request.args.get('month')
year = request.args.get('year')
try:
if '=' not in name + month + y
On Mon, 7 Jan 2019 at 06:37, Terry Reedy wrote:
> The pydev recommended way to run pip on windows is
> > py -x.y pip
> as this installs the package requested into the x.y site-packages
> directory.
py -3.7 -m pip ...
Note the extra -m).
Paul
--
https://mail.python.org/mailman/listinfo/python
On 1/6/2019 9:56 PM, Logan Vogelsong wrote:
I planned on using python to simulate different cipher to challenge myself,
but I kinda deleted my environmental variables to python. I run Windows 10
and wanted to get NumPy and MatPlotLib modules imported to python.
Basically, I downloaded python
Hello- I think I subscribed now.
I planned on using python to simulate different cipher to challenge myself,
but I kinda deleted my environmental variables to python. I run Windows 10
and wanted to get NumPy and MatPlotLib modules imported to python.
Basically, I downloaded python 3.7.1
also include integers. Intuitively, a value is an expression
that can not be reduced/executed/simplified any further."
[...]
> The lambda calculus comment is just an aside. The main point is that you
> shouldn't lead people to believe that Python has variables that are any
>
On Mon, Jul 23, 2018 at 9:39 PM, Steven D'Aprano
wrote:
> [1] The CPython interpreter uses pointers; the Jython interpreter uses
> whatever kind of memory indirection the JVM provides; when I emulate a
> Python interpreter using pencil and paper, there's not a pointer in sight
> but a lot of copyi
ntics of the Python language, there are no pointer values,
no way to get a pointer to a memory location or a pointer to an object.
No expression in Python evaluates to a pointer, no variables hold
pointers in Python. The Python language is defined in terms of objects:
expressions evaluate to objects,
erms to mean
> something *almost identical* to what they mean in lambda calculus.
> (The only difference I can see is that lambda calculus treats
> variables as abstract mathematical entities, while Python and other
> programming languages vivify them and give them a concrete
> implem
On Mon, 23 Jul 2018 11:49:37 +0300, Marko Rauhamaa wrote:
> People new to Python are unnecessarily confused by talking about names
> and binding when it's really just ordinary variables and assignment.
It really isn't, not to those people who expect ordinary variables and
assi
Mark Lawrence writes:
> On 22/07/18 14:51, Abdur-Rahmaan Janhangeer wrote:
>> except local vars
>>
>> Abdur-Rahmaan Janhangeer
>> https://github.com/Abdur-rahmaanJ
>> Mauritius
>>
>
> Python doesn't have variables, it has names.
I think we shoul
le" vs. a "non-local
> variable".
Actually, no, they are called "bound variable" and "free variable" in
Python too.
https://docs.python.org/3/reference/executionmodel.html
See also: http://effbot.org/zone/closure.htm
Alas, I don't think Fredrik Lundh got it *quite* ri
"Marko Rauhamaa" wrote in message news:87zhyitjz2@elektro.pacujo.net...
People new to Python are unnecessarily confused by talking about names
and binding when it's really just ordinary variables and assignment. It
seems to be mostly some sort of marketing lingo that seeks t
; “variable” for what is, in Python, an un-typed reference to an object.
>
> I expect both of these requests to meet with little satisfaction.
I'm actually not asking, only wishing.
People new to Python are unnecessarily confused by talking about names
and binding when it's rea
Gregory Ewing writes:
> Marko is asking us to stop using the word "binding" to refer to
> assignment because of the potential confusion with this other meaning.
That's about as reasonable as my request that we stop using the term
“variable” for what is, in Python, an un-typed reference to an obj
Steven D'Aprano wrote:
So let me see if I understand your argument...
- we should stop using the term "binding", because it means
nothing different from assignment;
- binding (a.k.a. "assignment") comes from lambda calculus;
- which has no assignment (a.k.a. "binding").
No, that's not what
Dennis Lee Bieber :
> On Mon, 23 Jul 2018 00:08:00 +0300, Marko Rauhamaa
> declaimed the following:
>
>>I Java terms, all Python values are boxed. That's a very usual pattern
>>in virtually all programming languages (apart from FORTRAN).
>
> FORTRAN, C, COBOL, BASIC, Pascal, ALGOL, BCPL, REX
variables here refers to the user experience of a var
np, just a link to the thread/s would mark the end of it
Abdur-Rahmaan Janhangeer
https://github.com/Abdur-rahmaanJ
Mauritius
--
https://mail.python.org/mailman/listinfo/python-list
On 22/07/18 14:51, Abdur-Rahmaan Janhangeer wrote:
except local vars
Abdur-Rahmaan Janhangeer
https://github.com/Abdur-rahmaanJ
Mauritius
Python doesn't have variables, it has names. Please can we avoid a long
meaningless thread on this subject as it's been discussed a trill
and Python are the ones that are not "common".
Indeed. Its not just older languages from the 60s and 70s with value-type
variables. Newer languages intended as systems languages, like Rust and
Go, do the same.
--
Steven D'Aprano
"Ever since I learned about confirmation bias
the stack) and "reference
types" (usually objects stored in the heap). C# and other .Net languages
often make that distinction:
http://net-informations.com/faq/general/valuetype-referencetype.htm
Swift is another such language.
Other languages which use primarily or exclusively value-types (i.
cs is defined
> using "bound" and "free" variables. Lambda calculus doesn't have
> assignment.
So let me see if I understand your argument...
- we should stop using the term "binding", because it means
nothing different from assignment;
- binding (a
m lambda calculus, whose semantics is defined
>> using "bound" and "free" variables. Lambda calculus doesn't have
>> assignment.
>
> Marko, I think the term binding makes sense in python due to how names
> work. In python and the following code:
>
&
On Mon, Jul 23, 2018 at 6:14 AM, Marko Rauhamaa wrote:
> While FORTRAN or C couldn't operate on functions like this, an assembly
> language program could easily. Simply compose a CPU instruction sequence
> on the fly, mark it executable and use the "CALL" opcode to transfer
> control to your const
two to create a
third function:
def compose(f1, f2):
def composition(x):
return f1(f2(x))
return composition
Here "compose", "composition", "f1" and "f2" are variables:
* "compose" gets assigned when the first, outer "
ntics is defined
> using "bound" and "free" variables. Lambda calculus doesn't have
> assignment.
>
> More about variable binding here: https://en.wikipedia.org/wiki/Free_variables_and_bound_variables>
>
>
> Marko
Marko, I think the term binding ma
r...@zedat.fu-berlin.de (Stefan Ram):
>>Rebinding names is near-universal in programming, but usually names
>>that are intended to be rebound, such as variables.
>
> To someone like me who has grown up with a LISP 1
> this is completely natural.
>
> |>( SETQ A (
On 2018-07-22 09:36:13 -0400, Richard Damon wrote:
> > On Jul 22, 2018, at 8:48 AM, Sharan Basappa
> > wrote:
> >
> > In other programming languages (e.g. C, C++), as a good practice,
> > variables are declared right at the start of the program,
There is no &q
except local vars
Abdur-Rahmaan Janhangeer
https://github.com/Abdur-rahmaanJ
Mauritius
--
https://mail.python.org/mailman/listinfo/python-list
On Sun, Jul 22, 2018 at 10:48 PM, Sharan Basappa
wrote:
> In other programming languages (e.g. C, C++), as a good practice, variables
> are declared right at the start of the program, irrespective of where it is
> normally used. What is the practice in Python?
>
> I see that, m
> On Jul 22, 2018, at 8:48 AM, Sharan Basappa wrote:
>
> In other programming languages (e.g. C, C++), as a good practice, variables
> are declared right at the start of the program, irrespective of where it is
> normally used. What is the practice in Python?
>
> I
In other programming languages (e.g. C, C++), as a good practice, variables are
declared right at the start of the program, irrespective of where it is
normally used. What is the practice in Python?
I see that, most of the code, declare variables where it is used and not at the
start of the
On 06/28/18 16:44, Steven D'Aprano wrote:
I agree with you that it's a bad idea.
Aside from the little fact that you described concerns about using Python
code for settings as "silly".
Umm, no. I said that worrying about arbitrary code execution in an
interpreted language seemed silly.
On Thu, 28 Jun 2018 10:58:36 -0700, Jim Lee wrote:
> On 06/28/18 07:30, Grant Edwards wrote:
>> I still maintain it's a bad idea to run arbitrary code found in
>> user-edited config files.
>>
>> There may be cases where somebody has figured out how to muck with a
>> config file that's shared among
On 06/28/18 07:30, Grant Edwards wrote:
I still maintain it's a bad idea to run arbitrary code found in
user-edited config files.
There may be cases where somebody has figured out how to muck with a
config file that's shared among multiple users, or has tricked
somebody into including somethin
trust them not to, there's no point in locking the door to
the house when I go out, since they have a key."
Not exactly. The original question was about reading config variables
from a file in Python. That sort of thing didn't suggest (to me) a
world-facing web app or other s
On 2018-06-28, Steven D'Aprano wrote:
> So why give them the ability to escalate their privilege to that of
> your application (which probably can do lots of things they can't
> do) by directly executing Python code they supply?
To be fair, that situation isn't common. The vast majority of
appl
On Wed, 27 Jun 2018 16:09:09 -0700, Jim Lee wrote:
> On 06/27/18 15:19, Steven D'Aprano wrote:
>> On Wed, 27 Jun 2018 12:15:23 -0700, Jim Lee wrote:
>>
>>> It seems a bit silly to me to worry about arbitrary code
>>> execution in
>>> an interpreted language like Python whose default runtim
On 06/27/18 15:19, Steven D'Aprano wrote:
On Wed, 27 Jun 2018 12:15:23 -0700, Jim Lee wrote:
It seems a bit silly to me to worry about arbitrary code execution
in
an interpreted language like Python whose default runtime execution
method is to parse the source code directly. An attac
On Wed, 27 Jun 2018 12:15:23 -0700, Jim Lee wrote:
> It seems a bit silly to me to worry about arbitrary code execution
> in
> an interpreted language like Python whose default runtime execution
> method is to parse the source code directly. An attacker would be far
> more likely to simply
i think variables also in the case of
PORT = 12345
Abdur-Rahmaan Janhangeer
https://github.com/Abdur-rahmaanJ
And it doesn't require that the end user have any knowlege of Python
> syntax or sematics.
>
--
https://mail.python.org/mailman/listinfo/python-list
On 2018-06-27, Jim Lee wrote:
> It seems a bit silly to me to worry about arbitrary code
> execution in an interpreted language like Python whose default
> runtime execution method is to parse the source code directly.
Maybe it's not a deliberate attack. Good application design is also
about
On 06/27/2018 12:15 PM, Jim Lee wrote:
On 06/27/18 11:45, Abdur-Rahmaan Janhangeer wrote:
and that closes it,
thanks !!!
Abdur-Rahmaan Janhangeer
https://github.com/Abdur-rahmaanJ
Importing variables from a file is dangerous because it can execute
arbitrary code. It should never be done
On 06/27/18 11:45, Abdur-Rahmaan Janhangeer wrote:
and that closes it,
thanks !!!
Abdur-Rahmaan Janhangeer
https://github.com/Abdur-rahmaanJ
Importing variables from a file is dangerous because it can execute
arbitrary code. It should never be done with files provided by the
user.
Using
and that closes it,
thanks !!!
Abdur-Rahmaan Janhangeer
https://github.com/Abdur-rahmaanJ
Importing variables from a file is dangerous because it can execute
> arbitrary code. It should never be done with files provided by the
> user.
>
> Using configparser is far, far safer.
On 2018-06-27, Abdur-Rahmaan Janhangeer wrote:
> what is more recommended and why? using configparser for settings or import
> variables from file?
Importing variables from a file is dangerous because it can execute
arbitrary code. It should never be done with files provided by the
user.
1 - 100 of 3000 matches
Mail list logo