Re: I'm looking for a part-time job in Python / Django

2016-08-15 Thread Uri Even-Chen
Thank you Chris!

Uri.


*Uri Even-Chen*
[image: photo] Phone: +972-54-3995700
Email: [email protected]
Website: http://www.speedysoftware.com/uri/en/
  
    

On Sun, Aug 14, 2016 at 4:21 PM, Chris Angelico  wrote:

> On Sun, Aug 14, 2016 at 9:00 PM, Uri Even-Chen  wrote:
> > To [email protected],
> >
> > I'm looking for a part-time job in Python / Django, do you know
> anything? I
> > live in Herzliya, Israel. I can't relocate but I can work from home. You
> > can see my CV on LinkedIn. Please let me know if you have any job for me.
> >
>
> Hi! This isn't a job posting list, but there are a few places that
> accept job ads. One good one is the Python Job Board:
>
> https://www.python.org/jobs/
>
> Browse that, and possibly subscribe to it; there are a lot of jobs
> that would demand relocation, but every now and then you'll see a
> remote opening. You could also search the web for "django jobs" and
> see what you find.
>
> Good luck! There are definitely Python jobs out there, but you may
> find that most of them require physical presence in the US or Europe.
> But don't give up!
>
> ChrisA
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


I am new to python. I have a few questions coming from an armature!

2016-08-15 Thread Sickfit92
1. How long did it take you guys to master the language or, let me put it this 
way to completely get the hang and start writing code?

2. What made you want to learn python? 

3. Was it difficult to learn the language?

4. Have you been able to get a job out of your new skill?

Thank you guys! I'm pretty much Obsessed with python!

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


Re: Finding the first index in a list greater than a particular value

2016-08-15 Thread Michael Selik
On Mon, Aug 15, 2016 at 2:01 AM Jussi Piitulainen <
[email protected]> wrote:

> There is a tradition of returning -1 when no valid index is found.
>

Sometimes it's better to break with tradition. Raise a ValueError. No
silent errors, and all that Zen.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: I am new to python. I have a few questions coming from an armature!

2016-08-15 Thread Uri Even-Chen
1. After one/two months I knew the language, but after a year really knew
it well.

2. I love Python but at first I didn't understand indentation in Python and
it was confusing.

3. No. Except indentation.

4. Yes, I got 2 jobs in Python. But I also had to know JavaScript and
jQuery.

Uri.


*Uri Even-Chen*
[image: photo] Phone: +972-54-3995700
Email: [email protected]
Website: http://www.speedysoftware.com/uri/en/
  
    

On Mon, Aug 15, 2016 at 5:00 PM, Sickfit92  wrote:

> 1. How long did it take you guys to master the language or, let me put it
> this way to completely get the hang and start writing code?
>
> 2. What made you want to learn python?
>
> 3. Was it difficult to learn the language?
>
> 4. Have you been able to get a job out of your new skill?
>
> Thank you guys! I'm pretty much Obsessed with python!
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: I am new to python. I have a few questions coming from an armature!

2016-08-15 Thread alister
On Mon, 15 Aug 2016 07:00:47 -0700, Sickfit92 wrote:

> 1. How long did it take you guys to master the language or, let me put
> it this way to completely get the hang and start writing code?
> 
> 2. What made you want to learn python?
> 
> 3. Was it difficult to learn the language?
> 
> 4. Have you been able to get a job out of your new skill?
> 
> Thank you guys! I'm pretty much Obsessed with python!

1) time taken depends on how much code writing you do.
is should not take more than a few hours to get the basics. then it boils 
down to finding  a project or to that pique your interest & trying to 
implement them. you will probably keep using design concepts from 
previous languages that are not best practice for Python (not "Pythonic")
 one working you probably want to keep looking at re-factoring them to 
become more "pythonic"

Some concepts took more time than others before I had the "Light bulb" 
moment, Comprehensions & decorators being the most notable although 
Lambda still escapes me, fortunately these can all be unrolled into 
larger functions so are not essential in the early stages

2) it was widely reported as being a suitable language for learning, I 
was previously an Assembler level language & always found c to be not 
much better. programming solely for fun I wanted something less 
restrictive

3) No, although getting out of habits formed from BASIC took some time



-- 
Mr. Jones related an incident from "some time back" when IBM 
Canada
Ltd. of Markham, Ont., ordered some parts from a new supplier in Japan.  
The
company noted in its order that acceptable quality allowed for 1.5 per 
cent
defects (a fairly high standard in North America at the time).
The Japanese sent the order, with a few parts packaged separately 
in
plastic. The accompanying letter said: "We don't know why you want 1.5 per
cent defective parts, but for your convenience, we've packed them 
separately."
-- Excerpted from an article in The (Toronto) Globe and 
Mail
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: I am new to python. I have a few questions coming from an armature!

2016-08-15 Thread Chris Angelico
On Tue, Aug 16, 2016 at 12:00 AM, Sickfit92  wrote:
> 1. How long did it take you guys to master the language or, let me put it 
> this way to completely get the hang and start writing code?

Python wasn't my first language, so it was a lot easier for me to
learn one more language than to learn programming from scratch.
Basically, I picked up some document on the syntax (don't remember
what - probably the official tutorial) and then started messing around
with it, doing what I needed to do (which in this case was embedding
it in a C++ program, which brought its own set of problems due to our
non-standard toolchain).

Now, how long did it take me to learn how to write Pythonic code?
Don't know, and I'm still learning :)

> 2. What made you want to learn python?

I needed a language to embed in a program I was building. As it turned
out, Python couldn't be made secure, so we ended up not going there,
but it was still worth learning.

Alternatively: The first time I met Python was in the late 1990s, on
OS/2, and nothing beyond curiosity made me want to learn it. So I
didn't. I toyed with it briefly, then went back to working in REXX.

> 3. Was it difficult to learn the language?

There is a strong family resemblance about [programming languages],
and if you have all the details of a thousand at your finger ends, it
is odd if you can't unravel the thousand and first.
-- Sherlock Holmes, explaining what it means to be a "consulting detective"

Languages come in strong families, and even across families,
resemblances can be seen. When you are already familiar with several
dozen, you can learn one more language fairly easily. Python has
familial similarities with quite a few languages I know, so it wasn't
hard.

> 4. Have you been able to get a job out of your new skill?

Yes, I have, and not counting the fact that I learned it at a previous
job. There are plenty of Python jobs around; if you live in a
good-sized US city, chances are pretty good that you can find work
building web sites in Django, or messing around with big data in
Pandas, or something. And even if your job isn't specifically Python,
knowing a "glue language" makes you more useful.

> Thank you guys! I'm pretty much Obsessed with python!

So are most of us, I think, although I'm more "obsessed with
computers, using Python". :)

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


Re: I am new to python. I have a few questions coming from an armature!

2016-08-15 Thread Jan Erik Moström

On 15 Aug 2016, at 16:00, Sickfit92 wrote:

1. How long did it take you guys to master the language or, let me put 
it this way to completely get the hang and start writing code?


I'm probably not representative since I had used about 10-15 different 
language before looking at Python. To learn the basics: one flight from 
Europe to the US :D. The really understand the libraries, the language 
and write pythonic code ... still learning (some 10 years later).



2. What made you want to learn python?


Always want to try new language (and I didn't want to write any more 
Perl code ;) )



3. Was it difficult to learn the language?


No, one of the easier.


4. Have you been able to get a job out of your new skill?


No, but I changed some of the work I was doing so I get to teach Python 
once in a while.


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


Re: I am new to python. I have a few questions coming from an armature!

2016-08-15 Thread Grant Edwards
On 2016-08-15, Sickfit92  wrote:

> 1. How long did it take you guys to master the language or, let me
>put it this way to completely get the hang and start writing code?

A few hours.  The core language is pretty simple.  [I was already
fluent in a number of other programming languages -- if you haven't
programmed before, it will take longer.]  After 17 years working with
Python, there are still some esoteric features (e.g. decorators) that
I'm not very familiar with, and there will always be libraries to
learn...

> 2. What made you want to learn python? 

I needed an Windows app that could suck email messages from MS-Outlook
via the COM interface and send them to an SMTP server.  I found some
example code showing how to do both transactions using Python (and
Python was free).  Though I had never used Python, I had heard of
Python because it's what RedHat used to write their Linux installer (a
program called Anaconda).

> 3. Was it difficult to learn the language?

Nope, very easy.

> 4. Have you been able to get a job out of your new skill?

Sort of.  Over the past 17 years we've used Python for a number of
projects where I work, and have since then hired somebody specifically
because they had developed Python applications using particulary
libraries.

-- 
Grant Edwards   grant.b.edwardsYow! Okay ... I'm going
  at   home to write the "I HATE
  gmail.comRUBIK's CUBE HANDBOOK FOR
   DEAD CAT LOVERS" ...

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


Re: I am new to python. I have a few questions coming from an armature!

2016-08-15 Thread Paul Rubin
Sickfit92  writes:
> 1. How long did it take you guys to master the language or, let me put
> it this way to completely get the hang and start writing code?

Just a day or two, but I was already experienced with several similar
languages.  It would take longer for a beginning programmer.

> 2. What made you want to learn python? 

Don't exactly remember, but at one point there had been an existing
Pyton program that I had wanted to modify.

> 3. Was it difficult to learn the language?

No, not at all, I was pleasantly surprised at how easy it was.  

> 4. Have you been able to get a job out of your new skill?

I've had some Python jobs, but I'd say I got them through being a widely
experienced programmer in general, rather than just from knowing Python.

Being a good programmer isn't just about knowing languages--it's mostly
about being able to turn a higher-level problem it into a programming
problem, then solve the programming problem.  That's not the most
difficult thing in the world, but you should take a wider approach than
just learning languages.

This book is very good (full text online too), though it doesn't use
Python:

  https://mitpress.mit.edu/sicp/
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: I am new to python. I have a few questions coming from an armature!

2016-08-15 Thread sohcahtoa82
On Monday, August 15, 2016 at 8:07:32 AM UTC-7, alister wrote:
> On Mon, 15 Aug 2016 07:00:47 -0700, Sickfit92 wrote:
> 
> > 1. How long did it take you guys to master the language or, let me put
> > it this way to completely get the hang and start writing code?
> > 

> Some concepts took more time than others before I had the "Light bulb" 
> moment, Comprehensions & decorators being the most notable although 
> Lambda still escapes me, fortunately these can all be unrolled into 
> larger functions so are not essential in the early stages
> 


What helped me understand Lambdas is figuring out that they're really just a 
$1,000 term for a $5 concept.

A lambda is just a single-line function without a name (Unless you assign it to 
one).  A syntactic shortcut.

def square_plus_one(x):
return x ** 2 + 1

squared_plus_one_list = map(square_plus_one, some_list)

is equivalent to:

squared_plus_one_list = map(lambda x: x**2 + 1, some_list)
-- 
https://mail.python.org/mailman/listinfo/python-list


What is the trick between these?

2016-08-15 Thread huey . y . jiang
Hi All,


I am trapped by these two funny things:

class MyClass(upClass):

   def start(self):
   ***do_menu_here

   self.load_label_image()  # ---> this works
   self.load_canvas_image()  # ---> this does not work

   def load_label_image(self):
   img = PhotoImage(file="xx.gif")
   Label(self, image=img).pack(side=BOTTOM, expand=YES, fill=BOTH)
   return img

   def load_canvas_image(self):
   img = PhotoImage(file="xx.gif")   
   self.canvas = Canvas(self, width=500, height=300, bg='white')
   self.canvas.pack(expand=YES, fill=BOTH)
   self.canvas.create_image(50, 0, image=img, anchor=NW) 

if __name__ == '__main__':  
root = Tk()
root.mainloop()

load_label_image() works. However, I cannot do BIND with it, because img has no 
method to do binding. So, I am trying load_canvas_image. Surprise, it does not 
work. These two defs are so similar, but Python complained that no attribute of 
load_canvas_image(). It is there, coexisting with load_label_image(). 

I cannot figure out what is wrong with it, can somebody tell me why? Thanks!
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: What is the trick between these?

2016-08-15 Thread MRAB

On 2016-08-15 19:41, [email protected] wrote:

Hi All,


I am trapped by these two funny things:

class MyClass(upClass):

   def start(self):
   ***do_menu_here

   self.load_label_image()  # ---> this works
   self.load_canvas_image()  # ---> this does not work

   def load_label_image(self):
   img = PhotoImage(file="xx.gif")
   Label(self, image=img).pack(side=BOTTOM, expand=YES, fill=BOTH)
   return img

   def load_canvas_image(self):
   img = PhotoImage(file="xx.gif")
   self.canvas = Canvas(self, width=500, height=300, bg='white')
   self.canvas.pack(expand=YES, fill=BOTH)
   self.canvas.create_image(50, 0, image=img, anchor=NW)

if __name__ == '__main__':
root = Tk()
root.mainloop()

load_label_image() works. However, I cannot do BIND with it, because img has no 
method to do binding. So, I am trying load_canvas_image. Surprise, it does not 
work. These two defs are so similar, but Python complained that no attribute of 
load_canvas_image(). It is there, coexisting with load_label_image().

I cannot figure out what is wrong with it, can somebody tell me why? Thanks!

If you can't bind to the image itself, then bind to the label you put it 
in instead.


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


Re: What is the trick between these?

2016-08-15 Thread Peter Otten
[email protected] wrote:

> I am trapped by these two funny things:
> 
> class MyClass(upClass):
> 
>def start(self):
>***do_menu_here
> 
>self.load_label_image()  # ---> this works
>self.load_canvas_image()  # ---> this does not work
> 
>def load_label_image(self):
>img = PhotoImage(file="xx.gif")
>Label(self, image=img).pack(side=BOTTOM, expand=YES, fill=BOTH)
>return img
> 
>def load_canvas_image(self):
>img = PhotoImage(file="xx.gif")
>self.canvas = Canvas(self, width=500, height=300, bg='white')
>self.canvas.pack(expand=YES, fill=BOTH)
>self.canvas.create_image(50, 0, image=img, anchor=NW)
> 
> if __name__ == '__main__':
> root = Tk()
> root.mainloop()
> 
> load_label_image() works. However, I cannot do BIND with it, because img
> has no method to do binding. So, I am trying load_canvas_image. Surprise,
> it does not work. These two defs are so similar, but Python complained
> that no attribute of load_canvas_image(). It is there, coexisting with
> load_label_image().
> 
> I cannot figure out what is wrong with it, can somebody tell me why?
> Thanks!

The only problem I see is that you do not keep a reference of the PhotoImage 
(as explained in MRAB's answer to your previous question).

What exception do you encounter? Do not paraphrase, copy and paste the 
actual traceback.

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


docs on pythonhosted.org not updating with new version?

2016-08-15 Thread Irmen de Jong
Hi,
as I've always done for a new release I've uploaded new versions of my package's
documentation files, but they are not showing up on Pythonhosted.org - the 
previous
version is still there.

Is there something wrong with the update mechanism?

I've been using "python3 setup.py build_sphinx upload_docs" to build and upload 
the docs
and it comes back with a 200 Ok response from the pypi server. The same 
commands used to
work fine on previous occasions...


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


Re: I am new to python. I have a few questions coming from an armature!

2016-08-15 Thread Lawrence D’Oliveiro
On Tuesday, August 16, 2016 at 6:36:41 AM UTC+12, [email protected] wrote:
> What helped me understand Lambdas is figuring out that they're really just
> a $1,000 term for a $5 concept.

The excuse for the “$1,000 term” is that it came from Alonzo Church’s 
λ-calculus, which was an alternative formulation for computability to Turing’s 
eponymous machines (and introduced around the same time, in the 1930s). In 
λ-calculus, everything is a function--even the integers are functions. In that 
situation, I think you would agree it is very much a “$1,000 concept”.

Lisp was the first programming language to include the word “lambda” in a 
syntactic construct.

Languages like Perl and JavaScript define anonymous functions in a simple way: 
just omit the name from an otherwise regular function definition.

Python, on the other hand, introduces the special word “lambda” for this 
purpose, eschewing its usual “def”.

Why? Something to do with GvR’s allergy to anonymous functions...
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: What is the trick between these?

2016-08-15 Thread Steven D'Aprano
On Tue, 16 Aug 2016 04:41 am, [email protected] wrote:

> Python complained that no attribute of load_canvas_image(). It is there,
> coexisting with load_label_image().
> 
> I cannot figure out what is wrong with it, can somebody tell me why?
> Thanks!

No, we cannot, because we are not psychic. You don't show your actual code,
and you don't show us the actual error. Do you want us to *guess* what code
you are running, and guess what error you get?

You can try it for yourself: take the code that you posted, and NOTHING
ELSE, paste it into a new file, and try to run it. Can you run that code?
No. How do you expect us to run it?

- What is `upClass`?
- There are missing imports.
- Nothing appears to create a MyClass instance().
- Or call MyClass.start.

My *guess* is that you have something like:


AttributeError: 'MyClass' object has no attribute 'load_cavas_image'

or something similar, which suggests that you have a typo in your code:


class MyClass:
def start(self):
self.load_cavas_image()  # Note spelling error.

def load_canvas_image(self):
...


Or maybe it is the other way around:

class MyClass:
def start(self):
self.load_canvas_image()

def laod_canvas_image(self):  # Note spelling error.
...


That's the best I can do. If this doesn't solve your problem, you will have
to as a better question:

http://sscce.org/



-- 
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.

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


{RELEASE] Python 3.6.0a4 is now available

2016-08-15 Thread Ned Deily
On behalf of the Python development community and the Python 3.6 release
team, I'm happy to announce the availability of Python 3.6.0a4. 3.6.0a4
is the last of four planned alpha releases of Python 3.6, the next major
release of Python. During the alpha phase, Python 3.6 remains under
heavy development: additional features will be added and existing
features may be modified or deleted. Please keep in mind that this is a
preview release and its use is not recommended for production environments.

You can find Python 3.6.0a4 here:

https://www.python.org/downloads/release/python-360a4/

The next planned release of Python 3.6 will be 3.6.0b1, currently
scheduled for 2016-09-12. 3.6.0b1 will mark the beginning of the beta
phase of Python 3.6; at that time, feature development for 3.6 will be
complete and the emphasis will change to fixing bugs and regressions.
More information about the release schedule can be found here:

https://www.python.org/dev/peps/pep-0494/

--Ned

--
  Ned Deily
  [email protected] -- []



signature.asc
Description: OpenPGP digital signature
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: I am new to python. I have a few questions coming from an armature!

2016-08-15 Thread Paul Rudin
[email protected] writes:

> On Monday, August 15, 2016 at 8:07:32 AM UTC-7, alister wrote:
>> On Mon, 15 Aug 2016 07:00:47 -0700, Sickfit92 wrote:
>> 
>> > 1. How long did it take you guys to master the language or, let me put
>> > it this way to completely get the hang and start writing code?
>> > 
> 
>> Some concepts took more time than others before I had the "Light bulb" 
>> moment, Comprehensions & decorators being the most notable although 
>> Lambda still escapes me, fortunately these can all be unrolled into 
>> larger functions so are not essential in the early stages
>> 
> 
>
> What helped me understand Lambdas is figuring out that they're really just a 
> $1,000 term for a $5 concept.
>
> A lambda is just a single-line function without a name (Unless you assign it 
> to one).  A syntactic shortcut.
>
> def square_plus_one(x):
> return x ** 2 + 1
>
> squared_plus_one_list = map(square_plus_one, some_list)
>
> is equivalent to:
>
> squared_plus_one_list = map(lambda x: x**2 + 1, some_list)

I realise that this is about understanding lambda, but it's worth noting
in passing that we tend to write this sort of thing as:

squared_plus_one_list = [x**2 + 1 for x in some_list]

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


Re: I am new to python. I have a few questions coming from an armature!

2016-08-15 Thread Lawrence D’Oliveiro
On Tuesday, August 16, 2016 at 6:26:01 PM UTC+12, Paul Rudin wrote:
> sohcahtoa82 writes:
>> squared_plus_one_list = map(lambda x: x**2 + 1, some_list)
> 
> I realise that this is about understanding lambda, but it's worth noting
> in passing that we tend to write this sort of thing as:
> 
> squared_plus_one_list = [x**2 + 1 for x in some_list]

The difference being that the “map” function takes an iterable and returns an 
iterator.

Why could this difference be important?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: I am new to python. I have a few questions coming from an armature!

2016-08-15 Thread Ian Kelly
On Aug 15, 2016 6:57 PM, "Lawrence D’Oliveiro" 
wrote:


Python, on the other hand, introduces the special word “lambda” for this
purpose, eschewing its usual “def”.

Why? Something to do with GvR’s allergy to anonymous functions...


Actually, GvR is on record stating that he's never much cared for the name
"lambda":
http://python-history.blogspot.com/2009/04/origins-of-pythons-functional-features.html?m=1

The name was picked by the contributor who wrote the implementation,
apparently with little discussion.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: I am new to python. I have a few questions coming from an armature!

2016-08-15 Thread Lawrence D’Oliveiro
On Tuesday, August 16, 2016 at 6:34:53 PM UTC+12, Ian wrote:
> On Aug 15, 2016 6:57 PM, "Lawrence D’Oliveiro" wrote:
> 
> Python, on the other hand, introduces the special word “lambda” for this
> purpose, eschewing its usual “def”.
> 
> Why? Something to do with GvR’s allergy to anonymous functions...
> 
> Actually, GvR is on record stating that he's never much cared for the name
> "lambda":
> http://python-history.blogspot.com/2009/04/origins-of-pythons-functional-features.html?m=1
> 
> The name was picked by the contributor who wrote the implementation,
> apparently with little discussion.

I see. I thought I saw a mention somewhere else that Python lambdas were 
designed to be less functional than full def-style functions.

But perhaps this limitation wasn’t intentional, just an inherent consequence of 
the fact that Python’s significant-whitespace rules only apply to statements, 
not expressions...
-- 
https://mail.python.org/mailman/listinfo/python-list