Re: Interpreter Python 3.8 not there to select from PyCharm

2020-02-18 Thread onlinejudge95
On Tue, Feb 18, 2020 at 1:40 AM Maxime Albi  wrote:

> I'm very new to Python and wanting to learn the basics.
> I downloaded and installed Python 3.8 and PyCharm for my Windows 10
> machine.  All good.
>
> Launched PyCharm and I started a new Project and tried to select an
> 'interpreter' such as Python 3.8 but no interpreter was available for me to
> select from the down arrow menu ..!?!?
>
> Any settings I need to do ??
>
PyCharm community would be a better source for asking this question

>
> Thanks,
> Maxime
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: insert data in python script

2020-02-18 Thread DL Neil via Python-list

...


import preos
# pass name, Tc, Pc, omega
methane = preos.Molecule("methane", -82.59 + 273.15, 45.99, 0.011)
methane.print_params()


...


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", "credits" or "license" for more information.

import preos
methane = Molecule("methane", -82.59 + 273.15, 45.99, 0.011)

Traceback (most recent call last):
   File "", line 1, in 
NameError: name 'Molecule' is not defined



The first instruction (immediately above) imports the module preos.py. 
That works (no error message!).


The second instruction refers to a Python class called Molecule. That 
fails. The error message says that 'Molecule' is not defined.


Yet we can 'see' it. It *has* been defined! What is going on???

In this case, we need to tell Python that Molecule is part of the preos 
module. So back to your original code (top):


methane = preos.Molecule("methane", -82.59 + 273.15, 45.99, 0.011)


Please refer to earlier message. If Module were called from code in the 
preos.py file, then the "preos." prefix would not be necessary.


The formal term for this situation is "namespaces". Because Molecule is 
defined within the preos.py module's namespace we need to tell Python 
exactly where Molecule can be found. In the same way that we might say: 
if someone in Antarctica wants to see Alberto, (s)he will have to go to 
Italy to find him...



Don't hesitate to say if you think my reply is too complicated/advanced. 
People here are happy to help...

--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list


Re: insert data in python script

2020-02-18 Thread alberto
Il giorno martedì 18 febbraio 2020 09:34:51 UTC+1, DL Neil ha scritto:
> ...
> 
> >> import preos
> >> # pass name, Tc, Pc, omega
> >> methane = preos.Molecule("methane", -82.59 + 273.15, 45.99, 0.011)
> >> methane.print_params()
> 
> ...
> 
> > 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", "credits" or "license" for more information.
>  import preos
>  methane = Molecule("methane", -82.59 + 273.15, 45.99, 0.011)
> > Traceback (most recent call last):
> >File "", line 1, in 
> > NameError: name 'Molecule' is not defined
> 
> 
> The first instruction (immediately above) imports the module preos.py. 
> That works (no error message!).
> 
> The second instruction refers to a Python class called Molecule. That 
> fails. The error message says that 'Molecule' is not defined.
> 
> Yet we can 'see' it. It *has* been defined! What is going on???
> 
> In this case, we need to tell Python that Molecule is part of the preos 
> module. So back to your original code (top):
> 
> methane = preos.Molecule("methane", -82.59 + 273.15, 45.99, 0.011)
> 
> 
> Please refer to earlier message. If Module were called from code in the 
> preos.py file, then the "preos." prefix would not be necessary.
> 
> The formal term for this situation is "namespaces". Because Molecule is 
> defined within the preos.py module's namespace we need to tell Python 
> exactly where Molecule can be found. In the same way that we might say: 
> if someone in Antarctica wants to see Alberto, (s)he will have to go to 
> Italy to find him...
> 
> 
> Don't hesitate to say if you think my reply is too complicated/advanced. 
> People here are happy to help...
> -- 
> Regards =dn

hi
honestly i don't understand what i have to do.
I have been using python for too little time.
could you help me understand

regards 

Alberto

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: insert data in python script

2020-02-18 Thread David
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 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", "credits" or "license" for more information.
> >  import preos
> >  methane = Molecule("methane", -82.59 + 273.15, 45.99, 0.011)
> > > Traceback (most recent call last):
> > >File "", line 1, in 
> > > NameError: name 'Molecule' is not defined

> honestly i don't understand what i have to do.

$ python3
Python 3.5.3 (default, Sep 27 2018, 17:25:39)
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> print(digits)
Traceback (most recent call last):
  File "", line 1, in 
NameError: name 'digits' is not defined
>>> print(string.digits)
Traceback (most recent call last):
  File "", line 1, in 
NameError: name 'string' is not defined
>>> import string
>>> print(digits)
Traceback (most recent call last):
  File "", line 1, in 
NameError: name 'digits' is not defined
>>> print(string.digits)
0123456789
>>>
-- 
https://mail.python.org/mailman/listinfo/python-list


[RELEASE] Python 3.8.2rc2 is now available for testing

2020-02-18 Thread Łukasz Langa
Python 3.8.2rc2 is the second release candidate of the second maintenance 
release of Python 3.8. Go get it here:

https://www.python.org/downloads/release/python-382rc2/ 


Why a second release candidate?

The major reason for RC2 is that GH-16839 
 has been reverted.

The original change was supposed to fix for some edge cases in urlparse 
(numeric paths, recognizing netlocs without //; details in BPO-27657 
). Unfortunately it broke third parties 
relying on the pre-existing undefined behavior.

Sadly, the reverted fix has already been released as part of 3.8.1 (and 3.7.6 
where it’s also reverted now). As such, even though the revert is itself a bug 
fix, it is incompatible with the behavior of 3.8.1.

Please test.


Timeline

Assuming no critical problems are found prior to 2020-02-24, the currently 
scheduled release date for 3.8.2 (as well as 3.9.0 alpha 4!), no code changes 
are planned between this release candidate and the final release.

That being said, please keep in mind that this is a pre-release of 3.8.2 and as 
such its main purpose is testing.

Maintenance releases for the 3.8 series will continue at regular bi-monthly 
intervals, with 3.8.3 planned for April 2020 (during sprints at PyCon US).


What’s new?

The Python 3.8 series is the newest feature release of the Python language, and 
it contains many new features and optimizations. See the “What’s New in Python 
3.8 ” document for more 
information about features included in the 3.8 series.

Detailed information about all changes made in version 3.8.2 specifically can 
be found in its change log 
.


We hope you enjoy Python 3.8!

Thanks to all of the many volunteers who help make Python Development and these 
releases possible! Please consider supporting our efforts by volunteering 
yourself or through organization contributions to the Python Software 
Foundation.

https://www.python.org/psf/ 


- Ł
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: insert data in python script

2020-02-18 Thread Michael Torrie
On 2/18/20 2:41 AM, alberto wrote:
> Il giorno martedì 18 febbraio 2020 09:34:51 UTC+1, DL Neil ha scritto:
>> The first instruction (immediately above) imports the module preos.py. 
>> That works (no error message!).
>>
>> The second instruction refers to a Python class called Molecule. That 
>> fails. The error message says that 'Molecule' is not defined.
>>
>> Yet we can 'see' it. It *has* been defined! What is going on???
>>
>> In this case, we need to tell Python that Molecule is part of the preos 
>> module. So back to your original code (top):
>>
>> methane = preos.Molecule("methane", -82.59 + 273.15, 45.99, 0.011)
^^
He explicitly told you what to do.

The problem was "Molecule" is part of the "preos" module, so you have to
refer to it by the module name first.

>> Please refer to earlier message. If Module were called from code in the 
>> preos.py file, then the "preos." prefix would not be necessary.
>>
>> The formal term for this situation is "namespaces". Because Molecule is 
>> defined within the preos.py module's namespace we need to tell Python 
>> exactly where Molecule can be found. In the same way that we might say: 
>> if someone in Antarctica wants to see Alberto, (s)he will have to go to 
>> Italy to find him...
>>
>>
>> Don't hesitate to say if you think my reply is too complicated/advanced. 
>> People here are happy to help...
>> -- 
>> Regards =dn
> 
> hi
> honestly i don't understand what i have to do.
> I have been using python for too little time.
> could you help me understand

Did you read everything DL Neil said?  He told you what to do, including
giving you the line of code you need to replace, but also explained why.
 I don't know how one could make it more clear than what he said.

Spend some time to really try to understand what DL Neil is saying.
this is essential Python knowledge he's trying to impart.  Learning to
work with modules and namespaces in Python is pretty much required when
learning and using Python.
-- 
https://mail.python.org/mailman/listinfo/python-list


EuroPython 2020: Presenting our conference logo for Dublin

2020-02-18 Thread M.-A. Lemburg
We’re pleased to announce our official conference logo for EuroPython
2020, July 20-26, in Dublin, Ireland:


  * https://ep2020.europython.eu/ *


The logo is inspired by the colors and symbols often associated with
Ireland: the shamrock and the Celtic harp. It was again created by our
designer Jessica Peña Moro from Simétriko, who had already helped us
in previous years with the conference design.


Some additional updates:


- We’re working on launching the mein website, the CFP and ticket sales
  in March.

- We are also preparing the sponsorship packages and should have them
  ready early in March as well. Early bird sponsors will again receive
  a 10% discount on the package price. If you’re interested in
  becoming a launch sponsor, please contact our sponsor team at
  sponsor...@europython.eu.


Help spread the word


Please help us spread this message by sharing it on your social
networks as widely as possible. Thank you !

Link to the blog post:

https://blog.europython.eu/post/190894113857/europython-2020-presenting-our-conference-logo

Tweet:

https://twitter.com/europython/status/1229770448516395008


Enjoy,
--
EuroPython 2020 Team
https://ep2020.europython.eu/
https://www.europython-society.org/

-- 
https://mail.python.org/mailman/listinfo/python-list


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 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", "credits" or "license" for more information.
> > >  import preos
> > >  methane = Molecule("methane", -82.59 + 273.15, 45.99, 0.011)
> > > > Traceback (most recent call last):
> > > >File "", line 1, in 
> > > > NameError: name 'Molecule' is not defined
> 
> > honestly i don't understand what i have to do.
> 
> $ python3
> Python 3.5.3 (default, Sep 27 2018, 17:25:39)
> [GCC 6.3.0 20170516] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> print(digits)
> Traceback (most recent call last):
>   File "", line 1, in 
> NameError: name 'digits' is not defined
> >>> print(string.digits)
> Traceback (most recent call last):
>   File "", line 1, in 
> NameError: name 'string' is not defined
> >>> import string
> >>> print(digits)
> Traceback (most recent call last):
>   File "", line 1, in 
> NameError: name 'digits' is not defined
> >>> print(string.digits)
> 0123456789
> >>>

Hi, 
I solve it with external file as follows

import preos
# pass name, Tc, Pc, omega
methane = preos.Molecule("methane", -82.59 + 273.15, 45.99, 0.011)
methane.print_params()

thanks to everyone

regards

Alberto
-- 
https://mail.python.org/mailman/listinfo/python-list


Python 101 2nd Edition book

2020-02-18 Thread Mike Driscoll
Hi,

Years ago I posted about my first book, Python 101 on here and people really 
enjoyed it. I am working on a complete rewrite of the book and thought there 
might be people here who would enjoy knowing about it.

You can read more here: 
https://www.blog.pythonlibrary.org/2020/02/17/python-101-2nd-edition-kickstarter-is-live/

Feel free to ask any questions that you might have as well.

Thanks,
Mike
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: insert data in python script

2020-02-18 Thread DL Neil via Python-list

On 19/02/20 4:52 AM, alberto wrote:


Hi,
I solve it with external file as follows

import preos
# pass name, Tc, Pc, omega
methane = preos.Molecule("methane", -82.59 + 273.15, 45.99, 0.011)
methane.print_params()

thanks to everyone



It is difficult to learn a new programming language, even for 
professional programmers - and more-so if English is not one's 
native-language. Well done!


Now, if you could tell us how to capture and control methane, perhaps 
the world would become a better place...



Ciao!
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list