Re: Extend unicodedata with a name/pattern/regex search for character entity references?

2016-09-05 Thread Veek. M
Thomas 'PointedEars' Lahn wrote:

> Gregory Ewing wrote:
> 
>> Larry Hudson wrote:
>>> If you continue to read this forum, you will quickly learn to ignore
>>> "Pointy-Ears".  He rarely has anything worth while to post, and his
>>> unique fetish about Real Names shows him to be a hypocrite as well.
>> 
>> To be fair, it's likely that Thomas Lahn is his real
>> name,
> 
> Of course it is my real name.
> 
>> and he's never claimed that one shouldn't also
>> include a nickname in one's posted identifier.
> 
> In fact, I have recommended doing that several times to people who
> only used their nickname in the “From” header field value.
> 
>> So Veek should be able to appease P.E. by calling
>> himself 'Veek "David Smith" M'.
> 
> That would not help.  “Veek” might be (the transcription of) a given
> name or
> a family name, but “Veek M” is not a real name.  [Real name filter
> rules need to be adapted, though, because “O” is the transcription of
> an East Asian family name.]
> 
>> The quotes clearly mark the middle part as an invented addition, so
>> he's not lying,
> 
> He is lying and would be.  That is the main issue.  How can I trust a
> person who does not even have the decency and the courage to stand by
> their statements with their real name?
> 
>> and it looks enough like a Western style real name to avoid
>> triggering P.E.'s "fake name" reflex. :-)
> 
> It is not a reflex, but a request for something so basic that no
> request should be necessary: showing the simple politeness of
> introducing yourself properly when meeting strangers – of not lying to
> them about one’s identity – especially if one asks them for help.
> 

Ah! Now that's the root of his troubles, right there. Just in case 
anyone else is confused, I DON'T feel helped, thankful, grateful when 
someone answers my posts/questions. I expect you to have a whale of a 
good time when you post (I've always found it to be rather pleasant and 
fun to post). However I'm shhing on the subject of Thomas more or less 
permanently. This sort of humor works only when you're in a good mood 
and feeling chirpy, but that's not always the case so.. He's more or 
less Steve's baby anyhow (sorry Steve).




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


Would like some thoughts on a grouped iterator.

2016-09-05 Thread Antoon Pardon
I need an interator that takes an already existing iterator and
divides it into subiterators of items belonging together.

For instance take the following class, wich would check whether
the argument is greater or equal to the previous argument.

class upchecker:
def __init__(self):
self.prev = None
def __call__(self, arg):
if self.last is None:
self.prev = arg
return True
elif arg >= self.last:
self.prev = arg
return True
else:
self.prev = arg
return False

So the iterator I need --- I call it grouped --- in combination with
the above class would be used someting like:

for itr in grouped([8, 10, 13, 11, 2, 17, 5, 12, 7, 14, 4, 6, 15, 16, 19, 9, 0, 
1, 3, 18], upchecker()):
print list(itr)

and the result would be:

[8, 10, 13]
[11]
[2, 17]
[5, 12]
[7, 14]
[4, 6, 15, 16, 19]
[9]
[0, 1, 3, 18]

Anyone an idea how I best tackle this?

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


testfixtures 4.10.1 Released!

2016-09-05 Thread Chris Withers

Hi All,

I'm pleased to announce the release of testfixtures 4.10.1 featuring the 
following:


- Better docs for TempDirectory.compare().

- Remove the need for expected paths supplied to
  TempDirectory.compare() to be in sorted order.

- Document a good way of restoring stdout when in a debugger.

- Fix handling of trailing slashes in TempDirectory.compare().

Thanks to Maximilian Albert for the TempDirectory.compare() docs.

The package is on PyPI and a full list of all the links to docs, issue 
trackers and the like can be found here:


https://github.com/Simplistix/testfixtures

Any questions, please do ask on the Testing in Python list or on the 
Simplistix open source mailing list...


cheers,

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


Re: Extend unicodedata with a name/pattern/regex search for character entity references?

2016-09-05 Thread alister
On Mon, 05 Sep 2016 08:15:42 +0200, Thomas 'PointedEars' Lahn wrote:

> 
>> So Veek should be able to appease P.E. by calling himself 'Veek "David
>> Smith" M'.
> 
> That would not help.  “Veek” might be (the transcription of) a given
> name or a family name, but “Veek M” is not a real name.  [Real name
> filter rules need to be adapted, though, because “O” is the
> transcription of an East Asian family name.]
> 
How can you possible know that Veek M is not a reall name?
what rules for real names have you found that is 100% reliable

I suggest you read the following.
 
https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-
names/

provided people always* refer to themselves the same way then they can be 
identified, continually changing name to hide ones identity is another 
issue & there are not many legitimate reasons to do so


*personally I don't even care about that.

-- 
Lawn mower blade in your fan need sharpening
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Would like some thoughts on a grouped iterator.

2016-09-05 Thread Peter Otten
Antoon Pardon wrote:

> I need an interator that takes an already existing iterator and
> divides it into subiterators of items belonging together.
> 
> For instance take the following class, wich would check whether
> the argument is greater or equal to the previous argument.
> 
> class upchecker:
> def __init__(self):
> self.prev = None
> def __call__(self, arg):
> if self.last is None:
> self.prev = arg
> return True
> elif arg >= self.last:
> self.prev = arg
> return True
> else:
> self.prev = arg
> return False
> 
> So the iterator I need --- I call it grouped --- in combination with
> the above class would be used someting like:
> 
> for itr in grouped([8, 10, 13, 11, 2, 17, 5, 12, 7, 14, 4, 6, 15, 16, 19,
> 9, 0, 1, 3, 18], upchecker()):
> print list(itr)
> 
> and the result would be:
> 
> [8, 10, 13]
> [11]
> [2, 17]
> [5, 12]
> [7, 14]
> [4, 6, 15, 16, 19]
> [9]
> [0, 1, 3, 18]
> 
> Anyone an idea how I best tackle this?

I always start thinking "There must be an elegant way to do this" and then 
end with a clumsy wrapper around itertools.groupby().

$ cat grouped.py
from itertools import groupby


class Check:
def __init__(self, check):
self.first = True
self.prev = None
self.toggle = False
self.check = check

def __call__(self, item):
if self.first:
self.first = False
else:
if not self.check(self.prev, item):
self.toggle = not self.toggle
self.prev = item
return self.toggle


def grouped(items, check):
return (g for k, g in groupby(items, Check(check)))


if __name__ == "__main__":
def upchecker(a, b):
return a < b

items = [
8, 10, 13, 11, 2, 17, 5, 12, 7, 14, 4, 6, 15, 16, 19, 9, 0, 1, 3, 18
]
for itr in grouped(items, upchecker):
print(list(itr))

$ python grouped.py
[8, 10, 13]
[11]
[2, 17]
[5, 12]
[7, 14]
[4, 6, 15, 16, 19]
[9]
[0, 1, 3, 18]


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


Re: Would like some thoughts on a grouped iterator.

2016-09-05 Thread breamoreboy
On Monday, September 5, 2016 at 10:42:27 AM UTC+1, Peter Otten wrote:
> Antoon Pardon wrote:
> 
> > I need an interator that takes an already existing iterator and
> > divides it into subiterators of items belonging together.
> > 
> > For instance take the following class, wich would check whether
> > the argument is greater or equal to the previous argument.
> > 
> > class upchecker:
> > def __init__(self):
> > self.prev = None
> > def __call__(self, arg):
> > if self.last is None:
> > self.prev = arg
> > return True
> > elif arg >= self.last:
> > self.prev = arg
> > return True
> > else:
> > self.prev = arg
> > return False
> > 
> > So the iterator I need --- I call it grouped --- in combination with
> > the above class would be used someting like:
> > 
> > for itr in grouped([8, 10, 13, 11, 2, 17, 5, 12, 7, 14, 4, 6, 15, 16, 19,
> > 9, 0, 1, 3, 18], upchecker()):
> > print list(itr)
> > 
> > and the result would be:
> > 
> > [8, 10, 13]
> > [11]
> > [2, 17]
> > [5, 12]
> > [7, 14]
> > [4, 6, 15, 16, 19]
> > [9]
> > [0, 1, 3, 18]
> > 
> > Anyone an idea how I best tackle this?
> 
> I always start thinking "There must be an elegant way to do this" and then 
> end with a clumsy wrapper around itertools.groupby().
> 
> $ cat grouped.py
> from itertools import groupby
> 
> 
> class Check:
> def __init__(self, check):
> self.first = True
> self.prev = None
> self.toggle = False
> self.check = check
> 
> def __call__(self, item):
> if self.first:
> self.first = False
> else:
> if not self.check(self.prev, item):
> self.toggle = not self.toggle
> self.prev = item
> return self.toggle
> 
> 
> def grouped(items, check):
> return (g for k, g in groupby(items, Check(check)))
> 
> 
> if __name__ == "__main__":
> def upchecker(a, b):
> return a < b
> 
> items = [
> 8, 10, 13, 11, 2, 17, 5, 12, 7, 14, 4, 6, 15, 16, 19, 9, 0, 1, 3, 18
> ]
> for itr in grouped(items, upchecker):
> print(list(itr))
> 
> $ python grouped.py
> [8, 10, 13]
> [11]
> [2, 17]
> [5, 12]
> [7, 14]
> [4, 6, 15, 16, 19]
> [9]
> [0, 1, 3, 18]

As usual you beat me to it, but I'd spell "upchecker" as "from operator import 
lt" :)
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Would like some thoughts on a grouped iterator.

2016-09-05 Thread Steven D'Aprano
On Monday 05 September 2016 18:46, Antoon Pardon wrote:

> I need an interator that takes an already existing iterator and
> divides it into subiterators of items belonging together.
> 
> For instance take the following class, wich would check whether
> the argument is greater or equal to the previous argument.


These sorts of filtering jobs are often so simple that its hardly worth 
generalising them unless you have a whole lot of them.


def group_increasing(seq):
it = iter(seq)
accum = []
try:
last = next(it)
except StopIterator:
return
accum.append(last)
for item in it:
if item >= last:
accum.append(item)
else:
yield tuple(accum)
accum = [item]
last = item
if accum:
yield tuple(accum)


If you do need to generalise, using itertools.groupby is probably the right way 
to do it.




-- 
Steve

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


Re: mentor training python Romania with certification

2016-09-05 Thread neha . agrawal1428
On Tuesday, August 16, 2016 at 6:45:04 PM UTC+5:30, blue wrote:
> Hi. 
> 
> I'm from Romania.
> I need to update my skils under python.
> I need to find one mentor ( class, training ) to obtain one certified under 
> python language.
> 
> Cătălin George Feștilă

Hi,

You might find Python course offered by edureka to be useful
http://www.edureka.co/python

Check it out!

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


Re: Would like some thoughts on a grouped iterator.

2016-09-05 Thread Jussi Piitulainen
Antoon Pardon writes:

> I need an interator that takes an already existing iterator and
> divides it into subiterators of items belonging together.
>
> For instance take the following class, wich would check whether
> the argument is greater or equal to the previous argument.
>
> class upchecker:
> def __init__(self):
>   self.prev = None
> def __call__(self, arg):
>   if self.last is None:
> self.prev = arg
> return True
> elif arg >= self.last:
> self.prev = arg
> return True
> else:
> self.prev = arg
>   return False
>
> So the iterator I need --- I call it grouped --- in combination with
> the above class would be used someting like:
>
> for itr in grouped([8, 10, 13, 11, 2, 17, 5, 12, 7, 14, 4, 6, 15, 16, 19, 9, 
> 0, 1, 3, 18], upchecker()):
> print list(itr)
>
> and the result would be:
>
> [8, 10, 13]
> [11]
> [2, 17]
> [5, 12]
> [7, 14]
> [4, 6, 15, 16, 19]
> [9]
> [0, 1, 3, 18]
>
> Anyone an idea how I best tackle this?

Perhaps something like this when building from scratch (not wrapping
itertools.groupby). The inner grouper needs to communicate to the outer
grouper whether it ran out of this group but it obtained a next item, or
it ran out of items altogether.

Your design allows inclusion conditions that depend on more than just
the previous item in the group. This doesn't. I think itertools.groupby
may raise an error if the caller didn't consumer a group before stepping
to a new group. This doesn't. I'm not sure that itertools.groupby does
either, and I'm too lazy to check.

def gps(source, belong):
def gp():
nonlocal prev, more
keep = True
while keep:
yield prev
try:
this = next(source)
except StopIteration:
more = False
raise
prev, keep = this, belong(prev, this)
source = iter(source)
prev = next(source)
more = True
while more:
yield gp()

from operator import eq, lt, gt
for data in ([], [3], [3,1], [3,1,4], [3,1,4,1,5,9,2,6]):
for tag, op in (('=', eq), ('<', lt), ('>', gt)):
print(tag, data, '=>', [list(g) for g in gps(data, op)])
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Would like some thoughts on a grouped iterator.

2016-09-05 Thread Peter Otten
Jussi Piitulainen wrote:

> Antoon Pardon writes:
> 
>> I need an interator that takes an already existing iterator and
>> divides it into subiterators of items belonging together.
>>
>> For instance take the following class, wich would check whether
>> the argument is greater or equal to the previous argument.
>>
>> class upchecker:
>> def __init__(self):
>> self.prev = None
>> def __call__(self, arg):
>> if self.last is None:
>> self.prev = arg
>> return True
>> elif arg >= self.last:
>> self.prev = arg
>> return True
>> else:
>> self.prev = arg
>> return False
>>
>> So the iterator I need --- I call it grouped --- in combination with
>> the above class would be used someting like:
>>
>> for itr in grouped([8, 10, 13, 11, 2, 17, 5, 12, 7, 14, 4, 6, 15, 16, 19,
>> 9, 0, 1, 3, 18], upchecker()):
>> print list(itr)
>>
>> and the result would be:
>>
>> [8, 10, 13]
>> [11]
>> [2, 17]
>> [5, 12]
>> [7, 14]
>> [4, 6, 15, 16, 19]
>> [9]
>> [0, 1, 3, 18]
>>
>> Anyone an idea how I best tackle this?
> 
> Perhaps something like this when building from scratch (not wrapping
> itertools.groupby). The inner grouper needs to communicate to the outer
> grouper whether it ran out of this group but it obtained a next item, or
> it ran out of items altogether.
> 
> Your design allows inclusion conditions that depend on more than just
> the previous item in the group. This doesn't. I think itertools.groupby
> may raise an error if the caller didn't consumer a group before stepping
> to a new group. This doesn't. I'm not sure that itertools.groupby does
> either, and I'm too lazy to check.
> 
> def gps(source, belong):
> def gp():
> nonlocal prev, more
> keep = True
> while keep:
> yield prev
> try:
> this = next(source)
> except StopIteration:
> more = False
> raise
> prev, keep = this, belong(prev, this)
> source = iter(source)
> prev = next(source)
> more = True
> while more:
> yield gp()
> 
> from operator import eq, lt, gt
> for data in ([], [3], [3,1], [3,1,4], [3,1,4,1,5,9,2,6]):
> for tag, op in (('=', eq), ('<', lt), ('>', gt)):
> print(tag, data, '=>', [list(g) for g in gps(data, op)])


As usual I couldn't stop and came up with something very similar:

def grouped(items, check):
items = iter(items)
buf = next(items)
more = True

def group():
nonlocal buf, more
for item in items:
yield buf
prev = buf
buf = item
if not check(prev, item):
break
else:
yield buf
more = False

while more:
g = group()
yield g
for _ in g: pass

if __name__ == "__main__":
def upchecker(a, b):
return a < b

items = [
8, 10, 13, 11, 2, 17, 5, 12, 7, 14, 4, 6, 15, 16, 19, 9, 0, 1, 3, 18
]
for itr in grouped(items, upchecker):
print(list(itr))

The one thing I think you should adopt from this is that the current group 
is consumed before yielding the next.


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


Re: Would like some thoughts on a grouped iterator.

2016-09-05 Thread Jussi Piitulainen
Peter Otten writes:

> Jussi Piitulainen wrote:

[- -]

>> while more:
>> yield gp()

[- -]

> As usual I couldn't stop and came up with something very similar:

[- -]

> while more:
> g = group()
> yield g
> for _ in g: pass

[- -]

> The one thing I think you should adopt from this is that the current
> group is consumed before yielding the next.

Oh yes. I see now that it's also easy to do so.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Extend unicodedata with a name/pattern/regex search for character entity references?

2016-09-05 Thread Ned Batchelder
On Monday, September 5, 2016 at 2:15:58 AM UTC-4, Thomas 'PointedEars' Lahn 
wrote:
> How can I trust a person 
> who does not even have the decency and the courage to stand by their 
> statements with their real name?

Feel free to ignore people you don't trust.  We'll help them.

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


listdir

2016-09-05 Thread Smith

Hello to all,
I wanted to know because even though the files are present on the 
directory I write input gives me "file not found".

You can help me?
Thank you

a = input("Digita la directory dove vuoi trovare i file py:  ")
for file in os.listdir(a):
if file.endswith(".py"):
print(file)
else:
break
print("File not found")
--
https://mail.python.org/mailman/listinfo/python-list


Re: listdir

2016-09-05 Thread Smith

Il 05/09/2016 17:27, Smith ha scritto:

Hello to all,
I wanted to know because even though the files are present on the
directory I write input gives me "file not found".
You can help me?
Thank you

a = input("Digita la directory dove vuoi trovare i file py:  ")
for file in os.listdir(a):
if file.endswith(".py"):
print(file)
else:
break
print("File not found")


sorry:

> a = input(search for files with the extension .py into directory:  ")
> for file in os.listdir(a):
> if file.endswith(".py"):
> print(file)
> else:
> break
> print("File not found")

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


Re: listdir

2016-09-05 Thread jmp

On 09/05/2016 05:27 PM, Smith wrote:

Hello to all,
I wanted to know because even though the files are present on the
directory I write input gives me "file not found".
You can help me?
Thank you

a = input("Digita la directory dove vuoi trovare i file py:  ")
for file in os.listdir(a):
 if file.endswith(".py"):
 print(file)
 else:
 break
print("File not found")


Hi,

try

a = input("Digita la directory dove vuoi trovare i file py:  ")
for file in os.listdir(a):
 if file.endswith(".py"):
 print(file)

you don't want to break whenever a file does not fit the requirement, 
you want to to continue the iteration.


jm


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


Re: listdir

2016-09-05 Thread Rustom Mody
So what do you get when you replace the if-else with a simple: print(file)  ?

[And BTW dont use the variable name “file” its um sacred]
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: listdir

2016-09-05 Thread Chris Angelico
On Tue, Sep 6, 2016 at 1:34 AM, Rustom Mody  wrote:
> [And BTW dont use the variable name “file” its um sacred]

Nah, that part's fine. Python isn't religious about builtins.

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


Re: listdir

2016-09-05 Thread Chris Angelico
On Tue, Sep 6, 2016 at 1:27 AM, Smith  wrote:
> Hello to all,
> I wanted to know because even though the files are present on the directory
> I write input gives me "file not found".
> You can help me?
> Thank you
>
> a = input("Digita la directory dove vuoi trovare i file py:  ")
> for file in os.listdir(a):
> if file.endswith(".py"):
> print(file)
> else:
> break
> print("File not found")

What exactly are you expecting the 'break' to do here? Can you explain
to me the intent of your code?

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


Re: listdir

2016-09-05 Thread Smith

Il 05/09/2016 17:34, Rustom Mody ha scritto:

So what do you get when you replace the if-else with a simple: print(file)


a = input("search for files with the extension .py into directory:  ")
for file in os.listdir(a):
if file.endswith(".py"):
print(file)


search for files with the extension .py into directory:  /home/
filepy.py
tempo.py
filescript.py
ticker.py
toolgen.py
words.py
m.py
scrapingweb.py
partitesnai.py
pythonprova.py
scraper.py
snmp.py
printreturn.py
multiping.py
scraping.py
funzionipython.py


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


Re: listdir

2016-09-05 Thread jmp

On 09/05/2016 05:41 PM, Smith wrote:

Il 05/09/2016 17:34, Rustom Mody ha scritto:

So what do you get when you replace the if-else with a simple:
print(file)


a = input("search for files with the extension .py into directory:  ")
 for file in os.listdir(a):
 if file.endswith(".py"):
 print(file)


search for files with the extension .py into directory:  /home/
filepy.py
tempo.py
filescript.py
ticker.py
toolgen.py
words.py
m.py
scrapingweb.py
partitesnai.py
pythonprova.py
scraper.py
snmp.py
printreturn.py
multiping.py
scraping.py
funzionipython.py


Is that what you're expecting ?
A slightly different version:

import glob, os

a = input("search for files with the extension .py into directory:  ")
print glob.glob(os.path.join(a, '*.py'))

jm

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


Re: listdir

2016-09-05 Thread Smith

On 05/09/2016 17:57, jmp wrote:


Is that what you're expecting ?
A slightly different version:

import glob, os

a = input("search for files with the extension .py into directory:  ")
print glob.glob(os.path.join(a, '*.py'))

jm


Thank you

Sorry, but i'm newbie :-(
--
https://mail.python.org/mailman/listinfo/python-list


Re: listdir

2016-09-05 Thread Smith




What exactly are you expecting the 'break' to do here? Can you explain
to me the intent of your code?

ChrisA


I'd like to create a script that searches the directory .py files.
If the script does not find the file extension .py would return the 
error message "File Not Found".

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


Re: listdir

2016-09-05 Thread Chris Angelico
On Tue, Sep 6, 2016 at 2:29 AM, Smith  wrote:
>> What exactly are you expecting the 'break' to do here? Can you explain
>> to me the intent of your code?
>>
>> ChrisA
>>
> I'd like to create a script that searches the directory .py files.
> If the script does not find the file extension .py would return the error
> message "File Not Found".

Okay. So the logic needs to be like this:

For every file in this directory:
If the file has the extension ".py":
Print out the file name
If we didn't print out any file names:
Print out "File not found"

Notice how this pseudo-code is extremely close to actual Python code.
Here's a revision of your code that does more-or-less that. (I'm
keeping your original prompt; Python 3 is quite happy to work with all
human languages equally, and not just as text strings - you can name
your variables in Italian, too.)


a = input("Digita la directory dove vuoi trovare i file py:  ")
found_any = False
for file in os.listdir(a):
if file.endswith(".py"):
print(file)
found_any = True
if not found_any:
print("File not found")

There's no "else" clause, because the algorithm doesn't care about
non-py files; it cares only whether or not any .py files were found.

Does that help you understand what's going on? I can elaborate more if you like.

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


Installing python

2016-09-05 Thread emaraiza98
I installed pycharm for a computer science class I'm taking, and also 
downloaded python 3.5.2. However, my computer for some reason won't use 3.5.2 
and my professor told me I needed to download an earlier version to change the 
project interpreter. Whenever I try to use the earlier version of python for 
pycharm it says that "the SDK" seems invalid. I don't know what I'm doing wrong 
and was hoping someone would know what to do. I need to have everything 
installed and running by Wednesday.
-- 
https://mail.python.org/mailman/listinfo/python-list


installing python

2016-09-05 Thread emaraiza98
I installed pycharm for a computer science class, and installed python 3.5.2. 
However, my computer won't accept 3.5.2 so my teacher told me to install an 
earlier version to change the project interpreter. I did but when I tried to 
open python with pycharm it said that the "SKD is invalid". I don't know what 
I'm doing wrong and I have to have everything installed and running by 
Wednesday.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Installing python

2016-09-05 Thread alister
On Mon, 05 Sep 2016 12:46:58 -0700, emaraiza98 wrote:

> I installed pycharm for a computer science class I'm taking, and also
> downloaded python 3.5.2. However, my computer for some reason won't use
> 3.5.2 and my professor told me I needed to download an earlier version
> to change the project interpreter. Whenever I try to use the earlier
> version of python for pycharm it says that "the SDK" seems invalid. I
> don't know what I'm doing wrong and was hoping someone would know what
> to do. I need to have everything installed and running by Wednesday.

Are you by any chance still on windows XP?

You will need Python V3.4 or earlier.
Alternatively upgrade your operating system.

Most if not all current Linux distributions should run without trouble on 
your hardware.

They will probably have Python V2.7 as the system python but Python V3 
should be available from the package manager & you will probably have a 
much nicer experience than your windows class mates :-)




-- 
I'm not an Iranian!!  I voted for Dianne Feinstein!!
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Installing python

2016-09-05 Thread Wildman via Python-list
On Mon, 05 Sep 2016 20:01:08 +, alister wrote:

> On Mon, 05 Sep 2016 12:46:58 -0700, emaraiza98 wrote:
> 
>> I installed pycharm for a computer science class I'm taking, and also
>> downloaded python 3.5.2. However, my computer for some reason won't use
>> 3.5.2 and my professor told me I needed to download an earlier version
>> to change the project interpreter. Whenever I try to use the earlier
>> version of python for pycharm it says that "the SDK" seems invalid. I
>> don't know what I'm doing wrong and was hoping someone would know what
>> to do. I need to have everything installed and running by Wednesday.
> 
> Are you by any chance still on windows XP?
> 
> You will need Python V3.4 or earlier.
> Alternatively upgrade your operating system.
> 
> Most if not all current Linux distributions should run without trouble on 
> your hardware.
> 
> They will probably have Python V2.7 as the system python but Python V3 
> should be available from the package manager & you will probably have a 
> much nicer experience than your windows class mates :-)

A good many Linux distros now have Python 2.7 and 3.x installed.
For Python 3.x you would use this hash-bang...

#!/usr/bin/env python3

-- 
 GNU/Linux user #557453
The cow died so I don't need your bull!
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: listdir

2016-09-05 Thread breamoreboy
On Monday, September 5, 2016 at 4:34:45 PM UTC+1, Rustom Mody wrote:
> So what do you get when you replace the if-else with a simple: print(file)  ?
> 
> [And BTW dont use the variable name “file” its um sacred]

Only in Python 2, it's gone from the built-ins in Python 3 
https://docs.python.org/3/whatsnew/3.0.html#builtins

Kindest regards.

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


Re: manually sorting images?

2016-09-05 Thread Tony van der Hoff
On 04/09/16 09:53, Ulli Horlacher wrote:
> I need to sort images (*.jpg), visually, not by file name.
> It looks, there is no standard UNIX tool for this job?
> 

There is a very good tutorial here:
http://www.pyimagesearch.com/2014/12/01/complete-guide-building-image-search-engine-python-opencv/
-- 
Tony van der Hoff| mailto:t...@vanderhoff.org
Buckinghamshire, England |
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Pythons for .Net

2016-09-05 Thread Denis Akhiyarov
On Saturday, September 3, 2016 at 8:53:18 PM UTC-5, Steve D'Aprano wrote:
> On Sat, 3 Sep 2016 12:34 pm, Denis Akhiyarov wrote:
> 
> > Finally if anyone can contact Christian Heimes (Python Core Developer),
> > then please ask him to reply on request to update the license to MIT:
> > 
> > https://github.com/pythonnet/pythonnet/issues/234
> > 
> > He is the only contributor that prevents updating to MIT license.
> 
> 
> I have emailed him off-list.
> 
> Thanks for the information on PythonNet, Denis.
> 
> 
> 
> -- 
> Steve
> “Cheer up,” they said, “things could be worse.” So I cheered up, and sure
> enough, things got worse.

Emailing and twitter did not help either.
-- 
https://mail.python.org/mailman/listinfo/python-list