Re: PyCharm

2018-07-20 Thread Michael Vilain
I'm running PyCharm Edu (to go through their great tutorial). It's version is 2018.1.3, which I got from the web site. Unless you mistyped the version, this is the current release and yours is very old. -- Michael Vilain 650-322-6755 > On 20-Jul-2018, at 8:11 PM 🌙, no@none.invalid wrote: > > W

PyCharm

2018-07-20 Thread no
Win7 I was watching some tutorial videos on Python that recommended I use PyCharm and it worked pretty well until I tried to use input. I found this: https://youtrack.jetbrains.com/issue/PY-27891 It says.. Pavel Karateev commented 10 Jan 2018 11:57 Hi Calvin Broadus! I am sorry for the

Re: Edit with IDLE pull down menu

2018-07-20 Thread no
On Fri, 20 Jul 2018 03:19:16 -0400, Terry Reedy wrote: >On 7/19/2018 5:40 PM, no@none.invalid wrote: > >> The option for Edit with IDLE has an expanding menu. The only item in >> the pull down menu is..Edit with IDLE. > >What I see is Edit with IDLE 3.7. There should be an entry for eac

Re: try except inside a with open

2018-07-20 Thread Steven D'Aprano
On Fri, 20 Jul 2018 23:29:21 +0530, Ganesh Pal wrote: > Dear python Friends, > > > I need a quick suggestion on the below code. > > def modify_various_line(f): > """ Try modifiying various line """ > try: > f.write('0123456789abcdef') > f.seek(5) # Go to the 6th byte

Re: Cookies not showing up in environ

2018-07-20 Thread abc abc
Well, I'm so messed up between so many sources and tutorials I don't know which way is up. References to environ variable: https://www.python.org/dev/peps/pep-0333/ https://stackoverflow.com/questions/16774952/wsgi-whats-the-purpose-of-start-response-function I read that I have to have a file p

Re: Cookies not showing up in environ

2018-07-20 Thread Peter J. Holzer
On 2018-07-20 12:39:38 -0700, abc abc wrote: > I am trying the simplest of examples below to set and read a cookie. I > am using the Django framework, but I have also tried with vanilla > python cookies and os.environ. I have posted elsewhere, but this > hasn't gotten much attention, so I'd really

Re: try except inside a with open

2018-07-20 Thread MRAB
On 2018-07-20 18:59, Ganesh Pal wrote: Dear python Friends, I need a quick suggestion on the below code. def modify_various_line(f): """ Try modifiying various line """ try: f.write('0123456789abcdef') f.seek(5) # Go to the 6th byte in the file print f.

Re: Cookies not showing up in environ

2018-07-20 Thread Calvin Spealman
You can read cookies from the request via the request.COOKIES dictionary. See the documentation here: https://docs.djangoproject.com/en/2.0/ref/request-response/#django.http.HttpRequest.COOKIES You won't find them in an environment variable, which is shared process-wide and across all requests, be

Cookies not showing up in environ

2018-07-20 Thread abc abc
I am trying the simplest of examples below to set and read a cookie. I am using the Django framework, but I have also tried with vanilla python cookies and os.environ. I have posted elsewhere, but this hasn't gotten much attention, so I'd really appreciate any help. Thinking at this point it ma

Re: Unable to install latest version of a package via pip from PyPI

2018-07-20 Thread Iwo Herka
Oh. It took a while for the message to go through. In the meantime I've discovered that the source-code archive was badly formatted. Probably something with venv. I've bumped the patch version and re-uploaded. Sorry and thank you. Iwo Herka Original Message On 20 Jul 2018, 7:0

Unable to install latest version of a package via pip from PyPI

2018-07-20 Thread Iwo Herka
Hello, I do not wish to bother you with boring installation problems; however, I would be obliged if someone could spare a minute or two to take a look at my problem. I've recently uploaded a package on PyPI: pypi.org/project/sexpr/. Latest version is 0.1.6 (for Python 3+). Unfortunately, I canno

Re: [OT] Bit twiddling homework

2018-07-20 Thread jladasky
On Friday, July 20, 2018 at 2:00:26 AM UTC-7, Brian Oney wrote: > Are 16|1 and 16+1 internally the same operation (for integers)? For 16 and 1, the output of the two operations happen to be the same, but generally a bitwise OR is not the same are addition. There are no carry bits in the bitwis

try except inside a with open

2018-07-20 Thread Ganesh Pal
Dear python Friends, I need a quick suggestion on the below code. def modify_various_line(f): """ Try modifiying various line """ try: f.write('0123456789abcdef') f.seek(5) # Go to the 6th byte in the file print f.read(1) f.seek(-3, 2) # Go to the 3rd

Re: [OT] Bit twiddling homework

2018-07-20 Thread Grant Edwards
On 2018-07-20, Chris Angelico wrote: > On Sat, Jul 21, 2018 at 1:14 AM, Grant Edwards > wrote: >> On 2018-07-20, Dennis Lee Bieber wrote: >> >>> While I suspect Python isn't micro-optimizing, take into account >>> that most processors do have an "increment"/"decrement" operation -- >>> since th

Re: [OT] Bit twiddling homework

2018-07-20 Thread Chris Angelico
On Sat, Jul 21, 2018 at 2:39 AM, Marko Rauhamaa wrote: > Chris Angelico : > >> On Sat, Jul 21, 2018 at 1:14 AM, Grant Edwards >> wrote: >>> I refuse to believe there's an extant processor in common use where >>> an ADD is faster than an OR unless somebody shows me the processor >>> spec sheet. >>

Re: [OT] Bit twiddling homework

2018-07-20 Thread Marko Rauhamaa
Chris Angelico : > On Sat, Jul 21, 2018 at 1:14 AM, Grant Edwards > wrote: >> I refuse to believe there's an extant processor in common use where >> an ADD is faster than an OR unless somebody shows me the processor >> spec sheet. > > "Faster than"? I'd agree with you. But "as fast as"? I believe

Re: [OT] Bit twiddling homework

2018-07-20 Thread Brian Oney via Python-list
On Fri, 2018-07-20 at 10:38 -0400, Dennis Lee Bieber wrote: > On Fri, 20 Jul 2018 11:00:09 +0200, Brian Oney via Python-list > declaimed the following: > > > Are 16|1 and 16+1 internally the same operation (for integers)? > > For those integers the EFFECT/RESULT will be the same. But... >

Re: [OT] Bit twiddling homework

2018-07-20 Thread Chris Angelico
On Sat, Jul 21, 2018 at 1:14 AM, Grant Edwards wrote: > On 2018-07-20, Dennis Lee Bieber wrote: > >> While I suspect Python isn't micro-optimizing, take into account >> that most processors do have an "increment"/"decrement" operation -- >> since that is done so much at the low-level. Also, just

Re: [OT] Bit twiddling homework

2018-07-20 Thread Grant Edwards
On 2018-07-20, Dennis Lee Bieber wrote: > While I suspect Python isn't micro-optimizing, take into account > that most processors do have an "increment"/"decrement" operation -- > since that is done so much at the low-level. Also, just general > integer addition is common, so the hardware may be

Re: [OT] Bit twiddling homework

2018-07-20 Thread Brian Oney via Python-list
On Fri, 2018-07-20 at 18:07 +0900, xffox wrote: > On Fri, Jul 20, 2018 at 08:25:04AM +0200, Brian Oney via Python-list wrote: > > Therefore, what book or learning course do you recommend? I imagine > > something that tours or skims > > the fundamentals of Boolean algebra and digital logic, and the

Re: [OT] Bit twiddling homework

2018-07-20 Thread Ben Bacarisse
Brian Oney writes: > On Fri, 2018-07-20 at 06:37 +, Steven D'Aprano wrote: >> On Fri, 20 Jul 2018 08:25:04 +0200, Brian Oney via Python-list wrote: >> >> > PS: Can I twiddle bits in Python? >> >> Yes. >> >> These operators work on ints: >> >> bitwise AND: & >> bitwise OR: | >> bi

Re: [OT] Bit twiddling homework

2018-07-20 Thread Chris Angelico
On Fri, Jul 20, 2018 at 7:00 PM, Brian Oney via Python-list wrote: > On Fri, 2018-07-20 at 06:37 +, Steven D'Aprano wrote: >> On Fri, 20 Jul 2018 08:25:04 +0200, Brian Oney via Python-list wrote: >> >> > PS: Can I twiddle bits in Python? >> >> Yes. >> >> These operators work on ints: >> >> b

Re: [OT] Bit twiddling homework

2018-07-20 Thread xffox
On Fri, Jul 20, 2018 at 08:25:04AM +0200, Brian Oney via Python-list wrote: > Therefore, what book or learning course do you recommend? I imagine something > that tours or skims > the fundamentals of Boolean algebra and digital logic, and then goes to C and > some fun homework > problems. It may

Re: [OT] Bit twiddling homework

2018-07-20 Thread Brian Oney via Python-list
On Fri, 2018-07-20 at 06:37 +, Steven D'Aprano wrote: > On Fri, 20 Jul 2018 08:25:04 +0200, Brian Oney via Python-list wrote: > > > PS: Can I twiddle bits in Python? > > Yes. > > These operators work on ints: > > bitwise AND: & > bitwise OR: | > bitwise XOR: ^ > That's right I ha

Re: Edit with IDLE pull down menu

2018-07-20 Thread Terry Reedy
On 7/19/2018 5:40 PM, no@none.invalid wrote: The option for Edit with IDLE has an expanding menu. The only item in the pull down menu is..Edit with IDLE. What I see is Edit with IDLE 3.7. There should be an entry for each Python installed. Since that is the reason for the 2nd menu,

Re: copy and paste with a program called clipboard

2018-07-20 Thread Terry Reedy
On 7/19/2018 9:29 PM, eryk sun wrote: On Thu, Jul 19, 2018 at 5:42 PM, Terry Reedy wrote: What happens when you right click depends on the program you are interacting with. When you select and right-click in the current Windows 10 console, used for Command Prompt, PowerShell, Python, and othe