Pyton install Landmine

2016-01-16 Thread JeffP
Hi I installed pyth3.5 on my Windows machine and had some complications trying to connect other components. I installed to the default directory chosen by the installer but that included a folder with an embedded space in the name. BIG NO NO Thanks for a great tool! Jeff -- Jeff Petersen

Using 'Or'

2016-01-16 Thread Kitten Corner
Hi, I have python version 3.5.1 and I am working on a project, I'm trying to make it by using the 'or' sequence, I'm trying to make it do 1 thing or the other, here's an example: print('i like pie' or 'i like donuts'), it only does the thing that's before the 'or', please help! From, Kitten Corner

Re: Post processing contour plot, how?

2016-01-16 Thread Martin Schöön
Den 2016-01-14 skrev Cody Piersall : > Sorry for the short response, but check out this Stack Overflow > question/answer > > http://stackoverflow.com/q/5666056/1612701 > Thanks, this is a way forward -- not as straight forward as in Scilab but better than writing my own find-contour algorithm. (I t

Re: Using 'Or'

2016-01-16 Thread Chris Angelico
On Sat, Jan 16, 2016 at 7:24 AM, Kitten Corner wrote: > Hi, I have python version 3.5.1 and I am working on a project, I'm trying > to make it by using the 'or' sequence, I'm trying to make it do 1 thing or > the other, here's an example: print('i like pie' or 'i like donuts'), it > only does the

Re: Using 'Or'

2016-01-16 Thread Christian Gollwitzer
Am 15.01.16 um 21:24 schrieb Kitten Corner: Hi, I have python version 3.5.1 and I am working on a project, I'm trying to make it by using the 'or' sequence, I'm trying to make it do 1 thing or the other, here's an example: print('i like pie' or 'i like donuts') it only does the thing that's

Re: Using 'Or'

2016-01-16 Thread Steven D'Aprano
On Sat, Jan 16, 2016 at 7:24 AM, Kitten Corner wrote: > Hi, I have python version 3.5.1 and I am working on a project, I'm trying > to make it by using the 'or' sequence, I'm trying to make it do 1 thing > or the other, here's an example: print('i like pie' or 'i like donuts'), > it only does the

getkey

2016-01-16 Thread Ulli Horlacher
I have an application which runs on Windows and UNIX where I need to get one keypress from the user (without ENTER). Keys which sends escape sequences (e.g. cursor or function keys) should be ignored. I have a solution for Windows, but not for UNIX: The first byte of an escape sequence (example:

Re: Using 'Or'

2016-01-16 Thread Marko Rauhamaa
Christian Gollwitzer : > Am 15.01.16 um 21:24 schrieb Kitten Corner: >> print('i like pie' or 'i like donuts') > >> it only does the thing that's before the 'or', please help! > > I think you misunderstand what "or" does. It evaluates the first > expression, and if this is false, it evaluates the

print size limit

2016-01-16 Thread gliesian66
I'm doing a format conversion and all works fine until I add another 100 characters... haven't determined exactly where the breaking point is... but the initial conversion gets truncated and then fixes itself a little while in. Is there a limit on the print statement or the print statement nest

Is there a limit to the characters used in a print statement?

2016-01-16 Thread Robert James Liguori
I'm doing a data conversion and all is garbled when I add an extra hundred lines to the print in my for loop. Is there a limit? -- https://mail.python.org/mailman/listinfo/python-list

Re: print size limit

2016-01-16 Thread Chris Angelico
On Sun, Jan 17, 2016 at 12:48 AM, wrote: > I'm doing a format conversion and all works fine until I add another 100 > characters... haven't determined exactly where the breaking point is... but > the initial conversion gets truncated and then fixes itself a little while > in. Is there a limit

Re: Is there a limit to the characters used in a print statement?

2016-01-16 Thread Mark Lawrence
On 16/01/2016 13:49, Robert James Liguori wrote: I'm doing a data conversion and all is garbled when I add an extra hundred lines to the print in my for loop. Is there a limit? This will probably get answered under the thread with subject "print size limit" that arrived one minute before th

Re: Using 'Or'

2016-01-16 Thread Alister
On 15/01/16 20:24, Kitten Corner wrote: Hi, I have python version 3.5.1 and I am working on a project, I'm trying to make it by using the 'or' sequence, I'm trying to make it do 1 thing or the other, here's an example: print('i like pie' or 'i like donuts'), it only does the thing that's before t

Re: Stop writing Python 4 incompatible code

2016-01-16 Thread Alister
On 15/01/16 18:55, Bernardo Sulzbach wrote: On Fri, Jan 15, 2016 at 4:46 PM, Alister wrote: Doublespace disk compression springs to mind Does not ring a bell, I was not even born for MS-DOS 6.0. it was exactly the scenario described A company had developed a means of impo=roving the Fat

Re: Stop writing Python 4 incompatible code

2016-01-16 Thread Bernardo Sulzbach
On Sat, Jan 16, 2016 at 12:41 PM, Alister wrote: > it was exactly the scenario described > > A company had developed a means of impo=roving the Fat file system (IIRC by > using a pseudo file system on top to eliminate the wasted space caused by > incomplete blocks & the end of files) > > Microsoft

Re: Deploy Python script on Apache using mod_wsgi

2016-01-16 Thread Alister
On 15/01/16 22:33, gupta.ashish65...@gmail.com wrote: I am trying to deploy a python script on Apache using mod_wsgi. How to write the wsgi file for mod_wsgi ? I have asked my question here on http://stackoverflow.com/q/33314787/2350219 a Google search for python wsgi brings up many tutorials

Re: getkey

2016-01-16 Thread Ulli Horlacher
Ulli Horlacher wrote: > The first byte of an escape sequence (example: ^[[21~ for F10) is > recognized, but the trailing bytes then are not discarded by > clear_keyboard_buffer() and get_key() returns the second byte of the > escape sequence. I have found a solution: def clear_keyboard_buffer()

Re: Stop writing Python 4 incompatible code

2016-01-16 Thread paul . hermeneutic
On Sat, Jan 16, 2016 at 7:48 AM, Bernardo Sulzbach wrote: > Did people know this back then or it just surfaced years later? I > suppose that at the beginning MS was more "vulnerable" than it is > today. This was either pre- or early days of the Web which provided to some degree a shroud of secrec

Re: Pyton install Landmine

2016-01-16 Thread paul . hermeneutic
On Fri, Jan 15, 2016 at 2:49 PM, JeffP wrote: > Hi > I installed pyth3.5 on my Windows machine and had some complications trying > to connect other components. > I installed to the default directory chosen by the installer but that > included a folder with an embedded space in the name. BIG NO NO!

Re: Stop writing Python 4 incompatible code

2016-01-16 Thread William Ray Wing
> On Jan 16, 2016, at 9:48 AM, Bernardo Sulzbach > wrote: > > On Sat, Jan 16, 2016 at 12:41 PM, Alister wrote: >> it was exactly the scenario described >> >> A company had developed a means of impo=roving the Fat file system (IIRC by >> using a pseudo file system on top to eliminate the waste

Re: Python best practices

2016-01-16 Thread Bob Gailer
On Jan 15, 2016 8:20 PM, wrote: > > Are there any good resources on python best practices? e.g., articles What programming experience do you have? I'm thinking of languages. Here are a few of my guidelines - most not Python specific: Keep logic and data separate. Comment early and often - but

Re: Python best practices

2016-01-16 Thread Felix Almeida
Pylint is your friend: http://www.pylint.org/ If you already know a bit about the language then a good place to start is the Google Python Style Guide: https://google.github.io/styleguide/pyguide.html On 15/01/16 08:19 PM, gliesia...@gmail.com wrote: Are there any good resources on python

Re: Using 'Or'

2016-01-16 Thread Steven D'Aprano
On Sun, 17 Jan 2016 01:06 am, Alister wrote: > Conditional operators (or and not == etc.) need to be used in a test Technically, that is incorrect. > how else would you expect you print statement to be able to decided > which to print? default = "I like Brussels sprouts." message = random.cho

Re: print size limit

2016-01-16 Thread Steven D'Aprano
On Sun, 17 Jan 2016 12:48 am, gliesia...@gmail.com wrote: > I'm doing a format conversion and all works fine until I add another 100 > characters... And then what happens? How many characters do you convert before that point? What does this "format conversion" do? > haven't determined exactl

Keen eyes

2016-01-16 Thread jonas . thornvall
This is not python just a short snippet of javascript that refuse tracing, i've staired blind upon it but since it does something weird with allocating memory i have no idea what is going on and the parrots and monkeys at comp.lang.javascript refuse to give a hint. Something in those loops real

Re: Keen eyes

2016-01-16 Thread Chris Angelico
On Sun, Jan 17, 2016 at 9:23 AM, wrote: > function factor_it(i){ > prime=true; > sqroot=Math.floor(Math.sqrt(i)); > for (j=2;j prime}} > return prime; > } A couple of potential problems here. The first thing that comes to mind is that floating point inaccuracy is going to bite you long before th

Re: Using 'Or'

2016-01-16 Thread Alister
On 16/01/16 21:53, Steven D'Aprano wrote: On Sun, 17 Jan 2016 01:06 am, Alister wrote: Conditional operators (or and not == etc.) need to be used in a test Technically, that is incorrect. yes but the op is confused in his usage enough at present how else would you expect you print stateme

Re: Keen eyes

2016-01-16 Thread jonas . thornvall
Den lördag 16 januari 2016 kl. 23:30:48 UTC+1 skrev Chris Angelico: > On Sun, Jan 17, 2016 at 9:23 AM, wrote: > > function factor_it(i){ > > prime=true; > > sqroot=Math.floor(Math.sqrt(i)); > > for (j=2;j > {return prime}} > > return prime; > > } > > A couple of potential problems here. The firs

Re: Using 'Or'

2016-01-16 Thread Bernardo Sulzbach
On Sat, Jan 16, 2016 at 8:47 PM, Alister wrote: >> >> default = "I like Brussels sprouts." >> message = random.choice(["", "I like boiled cabbage."]) >> print( message or default ) >> >> >> > I hope I never see production code like that > I agree. If you are going to use spaces after '(' and befo

Re: Using 'Or'

2016-01-16 Thread Chris Angelico
On Sun, Jan 17, 2016 at 9:47 AM, Alister wrote: > On 16/01/16 21:53, Steven D'Aprano wrote: >> >> On Sun, 17 Jan 2016 01:06 am, Alister wrote: >> >>> Conditional operators (or and not == etc.) need to be used in a test >> >> >> Technically, that is incorrect. > > yes but the op is confused in his

Re: Keen eyes

2016-01-16 Thread jonas . thornvall
Den lördag 16 januari 2016 kl. 23:30:48 UTC+1 skrev Chris Angelico: > On Sun, Jan 17, 2016 at 9:23 AM, wrote: > > function factor_it(i){ > > prime=true; > > sqroot=Math.floor(Math.sqrt(i)); > > for (j=2;j > {return prime}} > > return prime; > > } > > A couple of potential problems here. The firs

Re: Is there a limit to the characters used in a print statement?

2016-01-16 Thread Steven D'Aprano
On Sun, 17 Jan 2016 12:49 am, Robert James Liguori wrote: > I'm doing a data conversion and all is garbled when I add an extra hundred > lines to the print in my for loop. Is there a limit? Is this the same problem as the "print size limit" thread you started one minute earlier, or a different

Re: Stop writing Python 4 incompatible code

2016-01-16 Thread Michael Torrie
On 01/16/2016 11:00 AM, William Ray Wing wrote: > It was known at the time. It was certainly known by the companies > that were ripped off, but they were typically small to really small > and couldn’t get traction for their stories in a press that was in > thrall to Microsoft. It was pretty much o

Re: Stop writing Python 4 incompatible code

2016-01-16 Thread Chris Angelico
On Sun, Jan 17, 2016 at 6:26 AM, Michael Torrie wrote: > On 01/16/2016 11:00 AM, William Ray Wing wrote: >> It was known at the time. It was certainly known by the companies >> that were ripped off, but they were typically small to really small >> and couldn’t get traction for their stories in a p

Re: wxpython strange behaviour

2016-01-16 Thread Michael Torrie
On 01/15/2016 05:58 PM, Shiva Upreti wrote: > > What kind of further details do you want? Please tell me and i will try my > best to provide them. As always, post a small but complete example test program (no more than 20 lines of code) that has the problem. Paste it in such a way that one can

Re: Pyton install Landmine

2016-01-16 Thread Ian Kelly
On Jan 16, 2016 3:02 AM, "JeffP" wrote: > > Hi > I installed pyth3.5 on my Windows machine and had some complications trying to connect other components. > I installed to the default directory chosen by the installer but that included a folder with an embedded space in the name. BIG NO NO Pr

Re: Stop writing Python 4 incompatible code

2016-01-16 Thread Christopher Reimer
On 1/15/2016 10:09 AM, Bernardo Sulzbach wrote: On Fri, Jan 15, 2016 at 3:02 PM, William Ray Wing wrote: What Micro$oft was actually sued for was worse. They would approach a small company: “We like your product/technology, we think we are interested in buying you out, but we want to see you

Re: Keen eyes

2016-01-16 Thread Steven D'Aprano
On Sun, 17 Jan 2016 10:25 am, jonas.thornv...@gmail.com wrote: > double use of j in two different functions Are you using a global variable called "j" as a loop variable? That sounds like a terrible idea. You should use local variables. Then a function with a local variable j cannot possibly eff

Re: Keen eyes

2016-01-16 Thread Ian Kelly
On Jan 17, 2016 12:16 AM, "Steven D'Aprano" wrote: > > On Sun, 17 Jan 2016 10:25 am, jonas.thornv...@gmail.com wrote: > > > double use of j in two different functions > > Are you using a global variable called "j" as a loop variable? That sounds > like a terrible idea. > > You should use local var

Re: Keen eyes

2016-01-16 Thread Paul Rubin
Steven D'Aprano writes: > And this is the language that 95% of the Internet uses... my brain hurts. WAT. https://www.youtube.com/watch?v=20BySC_6HyY -- https://mail.python.org/mailman/listinfo/python-list