Re: # type: a

2019-09-15 Thread Chris Warrick
’s no way to know what type you mean. Type comments are now best replaced by Python 3.6+ variable annotations, but the comments are still valid, and can be used in some contexts where annotations are not supported. https://www.python.org/dev/peps/pep-0484/#type-comments -- Chris Warrick <https

Re: sys.modules

2019-02-21 Thread Chris Warrick
knowledge — for example, because these modules are required by the interpreter itself, or are part of IDLE. The number you see depends on the environment (I got 530 in ipython3, 34 in python3, 45 in python2) and is not in any way important. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: preferences file

2019-01-24 Thread Chris Warrick
as foolproof as INI though). > 3. File location? I'm using Ubuntu and I believe that the correct > location would be home/.config/ . What about Mac and Windows? https://pypi.org/project/appdirs/ -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Packages Survey

2019-01-19 Thread Chris Warrick
ge list. Also, even if you promise to filter out private packages, they *do* reach your server, and many people would prefer that didn’t happen. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Wikipedia on Python

2018-10-16 Thread Chris Warrick
ikipedia. I took the liberty to remove this paragraph, because I don’t think anyone would find it useful; in fact, it would only confuse people. Here’s a diff for anyone interested in the original content: https://en.wikipedia.org/w/index.php?title=Python_(programming_language)&diff=prev&

Re: My environment doesn't load

2018-10-09 Thread Chris Warrick
some of my code that import beautyfulsoup it fails (python > mycode.py), althoug running > directly ./env-p3/python3.5 mycode.py is working... Was the virtualenv copied between machines or directories? If yes: you can’t do that, you must create a new virtualenv in the desired location and in

Re: Connection refused when tryign to run bottle/flask web framweworks

2018-08-20 Thread Chris Warrick
s used when you want your app to lsiten to all available interfaces. > Even with that still i cannot access the hello app. You should avoid exposing the built-in web server to the Internet. Either way, are you sure you don’t have any firewall set up on the server? -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Fishing from PyPI ?

2018-08-07 Thread Chris Warrick
On Tue, 7 Aug 2018 at 00:52, Gregory Ewing wrote: > > Chris Warrick wrote: > > The unusual domain is a common staple of Mailchimp, which is an e-mail > > newsletter platform (it was used to mail out the announcement), and > > they replace all links with tracking ones

Re: Fishing from PyPI ?

2018-08-06 Thread Chris Warrick
to mail out the announcement), and they replace all links with tracking ones in their list-manage.com domain. (They also implement the GDPR in an anti-user/pro-spam fashion, but I digress.) [1]: https://status.python.org/incidents/nk7cyn2vh4wr [2]: https://github.com/pypa/warehouse/issues/3632 --

Re: PyCharm

2018-07-22 Thread Chris Warrick
en. > > Is there another way to insert a pause that will work with PyCharm? > -- > https://mail.python.org/mailman/listinfo/python-list How does it fail? What PyCharm version are you on? -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: ipython does not work with latest version of prompt-toolkit

2018-06-03 Thread Chris Warrick
kit v2 has changed its API from v1, and ipython doesn’t support the new one yet. Don’t randomly upgrade pip packages without knowing what the upgrade entails, especially if the version changed from 1.x to 2.x (x.y → x+1.y) — that usually means an API change and possible incompatibilities in dep

Re: venv: make installed modules visible

2018-05-01 Thread Chris Warrick
ing the virtualenv’s pip. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: I am a student studying Python in Korea. I found strange thing while studying through idle

2018-03-09 Thread Chris Warrick
python\rhi") hithon (PS. it’s better to use a stable version, especially when you’re learning. PPS. file attachments do not work on this list.) -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16On 9 March 2018 at 01:07, 노연수 <mailto:clear0...@naver.com"; target="_

Re: read Unicode characters one by one in python2

2018-02-25 Thread Chris Warrick
ython No, it’s terrible. So is the Python 3 version. All you need for both Pythons is this: import io with io.open('input.txt', 'r', encoding='utf-8') as fh: for character in fh: print(character) (and please make sure you need to read character-

Re: Getting "ValueError: need more than 1 value to unpack" while trying to read a value from dictionary in python

2018-02-15 Thread Chris Warrick
, you need to split it into lines, first stripping whitespace (starts and ends with an empty line). s = s.strip().replace("=",":") print s d = {} for i in s.split('\n'): try: key, val = i.split(":") d[key.strip()] = val.strip() except ValueError: print "no key:value pair found in", i (PS. please switch to Python 3) -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Where has the practice of sending screen shots as source code come from?

2018-01-28 Thread Chris Warrick
om. Most standard error popups support pressing Ctrl+C to copy the text displayed in them. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Repairing Python installation?

2017-10-29 Thread Chris Warrick
me? cd into your virtualenv directory and run `source bin/activate`. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Repairing Python installation?

2017-10-29 Thread Chris Warrick
og/2017/06/18/unix-locales-vs-unicode/ (Nikola’s co-maintainer over here.) -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: choice of web-framework

2017-10-23 Thread Chris Warrick
o other PostgreSQL libraries available. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: choice of web-framework

2017-10-22 Thread Chris Warrick
On 22 October 2017 at 13:48, Chris Angelico wrote: > On Sun, Oct 22, 2017 at 10:34 PM, Chris Warrick wrote: >> On 22 October 2017 at 13:25, Lele Gaifax wrote: >>> Chris Warrick writes: >>> >>>> Zope is effectively dead these days. >>> >>&g

Re: choice of web-framework

2017-10-22 Thread Chris Warrick
On 22 October 2017 at 13:25, Lele Gaifax wrote: > Chris Warrick writes: > >> Zope is effectively dead these days. > > Except it's alive and kicking: https://blog.gocept.com/ > > :-) > > ciao, lele. A few people still care, sure. But how alive is a proj

Re: choice of web-framework

2017-10-22 Thread Chris Warrick
18n support available for when you need it * it’s a modern, friendly web framework If you went with Flask, you’d end up with a pile of plugins (for auth, for databases, for other things) and reimplement half of Django, badly. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Line terminators in Python?

2017-09-29 Thread Chris Warrick
writing. So, if you’re working in text mode (which also handles encodings and returns Unicode strings on Python 3), you can just assume '\n'. If you’re curious what the local newline is, look at os.linesep: https://docs.python.org/3/library/os.html#os.linesep -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Boolean Logic

2017-09-23 Thread Chris Warrick
s) This will print "s is False". You can also replace your earlier `if` with: >>> print((20 - 10) > 15) (False will appear upper-case, of course.) PS. don’t use semicolons with Python. Avoid eval() as well. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Stdlib, what's in, what's out

2017-09-20 Thread Chris Warrick
to Python 3 so that it could be shipped. (They’re currently at Beta 2 of the post-rewrite 4.0.0 version.) -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Python dress

2017-09-12 Thread Chris Warrick
nfo/python-list Meh. That should be a return statement, the thing is not PEP 8-compliant, and Courier is an ugly font. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: People choosing Python 3

2017-09-10 Thread Chris Warrick
On 10 September 2017 at 11:24, Leam Hall wrote: > On 09/10/2017 04:19 AM, Chris Warrick wrote: >> >> On 10 September 2017 at 09:30, Marko Rauhamaa wrote: >>> >>> INADA Naoki : >>> >>>> I can't wait Python 3 is the default Python of Red

Re: People choosing Python 3

2017-09-10 Thread Chris Warrick
Python 3.4 is available in EPEL. RHEL 8 will switch to Python 3 as the main Python interpreter (assuming dnf replaces yum, as it did in Fedora a while back). -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: OT: Rejecting whitespace-only changes at github

2017-08-10 Thread Chris Warrick
ownload diff from GitHub, find whitespace-only changes?) and use the GitHub API to close PRs/comment on them/set status checks to “failed”. (Closing those PRs might be seen as harsh and discouraging to new contributors) -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Are these tutorials the best tutorials for learning Python?

2017-08-09 Thread Chris Warrick
On 9 August 2017 at 17:14, Steve D'Aprano wrote: > On Wed, 9 Aug 2017 07:12 pm, Chris Warrick wrote: > >> So, I started by writing my opinion of those recommendations, and that >> the “community” is very small (<1k Twitter followers, 2.7k Facebook >> likes). But th

Re: Are these tutorials the best tutorials for learning Python?

2017-08-09 Thread Chris Warrick
All three are free to read online. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Connecting Google News

2017-07-16 Thread Chris Warrick
lta9D2RDZVP9t5gEcq_WJjZQjDSWklJ7LElSnAZnHsiF4CXOwvGDs2tjrXfP41LE-6LafdA86GO3sWYnfWs;Domain=.google.com;Path=/;Expires=Fri, > ' > '12-Jan-2018 16:37:48 GMT;HttpOnly'), > ('Alt-Svc', 'quic=":443"; ma=2592000; v="39,38,37,36,35"')] > --- > > `read()` is empty string ('' or b''). `status` is 302. `reason` is `Found`. https://en.wikipedia.org/wiki/HTTP_302 See that Location header? The web server wants to redirect you somewhere. Your low-level HTTP library does not handle redirects automatically, so you’d need to take care of that yourself. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Compiling Python 3.6.1 on macOS 10.12.5

2017-07-10 Thread Chris Warrick
Why are you trying to compile Python manually? You should use Homebrew to install Python in 99% of cases. (The package is python3) -- Chris Warrick <https://chriswarrick.com/> -- https://mail.python.org/mailman/listinfo/python-list

Re: Privy: An easy, fast lib to password-protect your data

2017-07-05 Thread Chris Warrick
sword-protecting” mean? Why is this not “encrypting”? How do you expect this to work with API keys? -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: how to convert json to csv with python?

2017-06-03 Thread Chris Warrick
, > "postal": "02142" > }, > { > "ip": "203.185.0.32", > "hostname": "20318532.ctinets.com", > "city": "Central District", > "region": "", > "country": "HK", > "loc": "22.2910,114.1500", > "org": "AS9269 HKBN AS10103" > }, > [snip] This is invalid JSON. You need to wrap all your dicts in a JSON array, like this: [ { "ip": "…" }, { "ip": "…" } ] (just add [ and ] to the start and end of your file) -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Python package to accept payments in Internet

2017-05-03 Thread Chris Warrick
On 3 May 2017 at 17:58, Victor Porton wrote: > Chris Warrick wrote: > >> On 3 May 2017 at 17:19, Victor Porton wrote: >>> What do you mean by "banned"? Does this mean that Google does not use >>> software of this license? >> >> https://op

Re: Python package to accept payments in Internet

2017-05-03 Thread Chris Warrick
work for the purpose it was made. This class is > not feature-rich, but other features are not needed by other parts of > my software. So it's OK. No, it’s not okay. Quick hacks are never good when dealing with money. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Python package to accept payments in Internet

2017-05-03 Thread Chris Warrick
gly, uses default browser styles, and to me it feels like you don’t pay attention to important stuff. That’s not someone who I’d trust to do payments right. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Calling dunder methods manually

2017-04-13 Thread Chris Warrick
achieve the same result. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: SimpleHTTPServer and CgiHTTPServer in practice

2017-03-18 Thread Chris Warrick
time. And then, CGI scripts take input via random environment variables (not very dependable) and output to stdout, which is a completely broken architecture. Give up and run a real web framework (Django) using uWSGI and nginx. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Odd wording it docs for shutil.move?

2017-03-03 Thread Chris Warrick
onger. From macOS/BSD manpages, mv(1): As the rename(2) call does not work across file systems, mv uses cp(1) and rm(1) to accomplish the move. See also: https://en.wikipedia.org/wiki/Mv -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Python application launcher (for Python code)

2017-02-21 Thread Chris Warrick
bought and killed by Microsoft. Git Bash, or basically msys, is pretty reasonable. But if you are on Windows 10, you might like the built-in Windows Subsystem for Linux (aka Bash on Ubuntu on Windows) more — it’s real Linux that runs alongside Windows, but less crazy than Cygwin. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Is requests[security] required for python 3.5+ ?

2017-02-02 Thread Chris Warrick
; The reason I'm asking is because I'm moving an application to python 3 and I > am testing out which requirements continue to be required in the version. No, requests[security] is only needed for old Python 2.7 versions (before 2.7.9). -- Chris Warrick <https://chriswarrick.com/&

Re: Let ipython3 use the latest python3

2017-01-21 Thread Chris Warrick
all it for that version (most likely, with pip) and make sure there is an ipython3 executable in your $PATH pointing at 3.6. You don’t need to remove IPython for 3.4 (but you can if you want to get rid of it). -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python

Re: print() with no newline

2016-12-18 Thread Chris Warrick
in Python2. Python3 is fine. > How can I make this Py2+3 compatible? With a __future__ import, the Python 3 syntax will work with both Pythons: from __future__ import print_function print(s, end="") -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: The Case Against Python 3

2016-11-25 Thread Chris Warrick
their very first steps with python... His book is slowly on the way out. #python on freenode and /r/python stopped recommending the book. Other places should follow suit, and actively discourage an outdated (easy_install, distribute, nosetests, python 2) book written by an asshole and a xenophobe.

Re: advanced SimpleHTTPServer?

2016-11-02 Thread Chris Warrick
ike Flask, or of course Django. Because, as the old saying goes, any sufficiently complicated Bottle or Flask app contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Django. (In the form of various plugins to do databases, accounts, admin panels etc.) -- Chris Warrick &

Re: advanced SimpleHTTPServer?

2016-11-02 Thread Chris Warrick
roperly, and the last one could be handled by a simple-ish PHP script. Or a full-fledged app in Django or Flask if you feel like it. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: New to python

2016-10-18 Thread Chris Warrick
ne > tutorial? I am interested in the scripting too. > > Bill Learn Python 3. Good resources (that I can actually vouch for being good…) include: https://docs.python.org/3/tutorial/index.html (if you can already program) http://greenteapress.com/wp/think-python/ https://automatetheborings

Re: TCL/TK as default UI toolkit, and wayland

2016-10-14 Thread Chris Warrick
for Python… You are free to use any of those four, though (or anything less cross-platform). You don’t have to use Tkinter if you don’t like it. And it’s not a hard requirement on many Linux distributions. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Structure of program development

2016-07-04 Thread Chris Warrick
load the Python software? Does Python products contain all parts of a > developed program or is it a series of 'call' statements? You must either install a Python interpreter on that machine, or distribute one with your program. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Creating a calculator

2016-07-01 Thread Chris Warrick
u=raw_input('Enter calculation:") > print eval(u) > -- > works and compute : > 1+2+3+4-1+4*2 > 2+3.0/2-0.5 > > Perform better and shorter, but less educationnal of course... No, this is awful. It’s a great way to compromise

Re: Creating a calculator

2016-07-01 Thread Chris Warrick
void code reuse like this: 1. Check if user said 'quit', and if yes, break from the loop. (Ignore invalid input for now) 2. Ask the user for two numbers. 3. Make an if/elif/else structure to calculate the result. 4. Print out the result outside of `if`. Example for 3. and 4.: if user_input == 'add': result = num1 + num2 # no need to call str() if you use commas in print() elif user_input == 'subtract': result = num1 - num2 # other elif clauses go here print("The result is", result) -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: not able to install mysqldb-python

2016-06-25 Thread Chris Warrick
.org/mailman/listinfo/python-list It didn’t. mysql-python is installable with Python 2 only, so you probably installed it for your system Python 2 install instead of your Python 3 django virtualenv. Either way, please use mysqlclient instead, as recommended by the Django developers. -- Chri

Re: pypi download links (e.g. for ansible)

2016-05-09 Thread Chris Warrick
s whether > it's > downloadable. It works for ansible-2.0.1.0 but not for 2.0.2.0. > > Ciao, Michael. > > -- > https://mail.python.org/mailman/listinfo/python-list PyPI URLs were changed recently. There is, however, a new supported way to get dependable URLs: https://bi

Re: Advice on Python build tools

2016-04-13 Thread Chris Warrick
thon and that has similar syntax. (also, I wouldn’t consider such weird-thing-into-real-HTML template engines pythonic) -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: How to make Python interpreter a little more strict?

2016-03-26 Thread Chris Warrick
said, this code is designed badly. Here’s a better idea (also, note the fixed print statement): for x in range(0, 5): if x % 2 != 0: print(x) Or even with a more suitable range() that adds 2 instead of 1 in each step: for x in range(1, 5, 2): print(x) -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Python boilerplate

2016-03-21 Thread Chris Warrick
ject needs packages. It might not need it today, but it will probably grow. At which point you will notice that a module is not enough. You can also easily separate code with packages. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: WP-A: A New URL Shortener

2016-03-19 Thread Chris Warrick
neater. (PS. the page’s really ugly. Consider using Bootstrap or some other existing framework if you’re not good at designing pretty things.) -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: WP-A: A New URL Shortener

2016-03-19 Thread Chris Warrick
Please use reply-all in the future so that the list sees your message. On 17 March 2016 at 11:38, Vinicius wrote: > Thanks for replying Chris, > > Enviado do meu iPad > >> Em 16 de mar de 2016, às 1:18 PM, Chris Warrick >> escreveu: >> >>> On 15 Mar

Re: Python boilerplate

2016-03-19 Thread Chris Warrick
b.com/Kwpolska/python-project-template — it has a comprehensive `release` script, and follows best practices (including entry_points or packages instead of modules). It also uses .rst instead of .md documents. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Beginner Python Help

2016-03-19 Thread Chris Warrick
need (parentheses) around functions when assigning to variables: maxim = max(list1) minim = min(list1) (Also, list1 is not a good variable name. Try something that describes its contents.) -- Chris Warrick <https://chriswarrick.com/> Sent from my Galaxy S3. -- https://mail.python.org/mailman/listinfo/python-list

Re: E-commerce system in Python

2016-03-18 Thread Chris Warrick
oes a lot of the hard work for you. Flask is low-level. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: pdf version of python tutorial

2016-03-13 Thread Chris Warrick
> thanks > raju > -- > Kamaraju S Kusumanchi | http://raju.shoutwiki.com/wiki/Blog > -- > https://mail.python.org/mailman/listinfo/python-list There is a download link on the documentation index: https://docs.python.org/3/download.html -- Chris Warrick <https://chriswarrick.com/> PG

Re: Question

2016-03-07 Thread Chris Warrick
-bit processors are sometimes called i386…i686, where the i stands for Intel, and those processors were also manufactured by AMD and others) -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Everything good about Python except GUI IDE?

2016-02-28 Thread Chris Warrick
On 28 February 2016 at 15:11, Rustom Mody wrote: > On Sunday, February 28, 2016 at 7:30:57 PM UTC+5:30, Chris Warrick wrote: >> On 28 February 2016 at 14:49, Rustom Mody wrote: >> > On Sunday, February 28, 2016 at 6:54:40 PM UTC+5:30, Gordon Levi wrote: >> >> Ru

Re: Everything good about Python except GUI IDE?

2016-02-28 Thread Chris Warrick
00 line diff!! You clearly haven’t ever done that. 1. git can manage EOL changing if you want to enforce a newline style that way. 2. A good editor can read and write any newline style. It should also not convert without asking the user. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: [STORY-TIME] THE BDFL AND HIS PYTHON PETTING ZOO

2016-02-08 Thread Chris Warrick
er. > -- > https://mail.python.org/mailman/listinfo/python-list In fact, this was done by a very popular Python project two years ago. That project is pip, which went from 1.5.6 to 6.0, and is now at 8.0.2. And its best friend setuptools is up to version 20.0. -- Chris Warrick <https://c

Re: I can not install matplotlib, numpy, scipy, and pandas.

2016-01-06 Thread Chris Warrick
e from the website mentioned in 2. Alternatively, try: https://www.scipy.org/install.html#individual-binary-and-source-packages -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: CGI

2015-12-27 Thread Chris Warrick
-list Better yet, use a real WSGI server like uWSGI and its associated nginx module. (there are plenty of tutorials around the Internet) -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Python and multiple user access via super cool fancy website

2015-12-25 Thread Chris Warrick
o. And it’s a lot more fun to do that than lazily downloading something. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Python and multiple user access via super cool fancy website

2015-12-25 Thread Chris Warrick
blog/2012/04/09/php-a-fractal-of-bad-design/ http://reddit.com/r/lolphp http://phpsadness.com/ On the other hand, Python web frameworks are really fun and easy to learn, even though their general design is a bit different from PHP’s: https://docs.djangoproject.com/en/1.9/intro/tutorial01/ http://tut

Re: Python and multiple user access via super cool fancy website

2015-12-24 Thread Chris Warrick
f the desired output, though. There are many Python-based web services out there, eg. YouTube, Instagram or DISQUS. And they work well under constant load. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Unable to use python 3.5

2015-12-23 Thread Chris Warrick
r (b) find a binary package, eg. here: http://www.lfd.uci.edu/~gohlke/pythonlibs/ A student who wants to work in programming should be able to find answers to their questions online. And know better than putting a phone number in their e-mail signature for the whole world to see. -- Chris Warric

Re: Need help on a project To :"Create a class called BankAccount with the following parameters "

2015-12-12 Thread Chris Warrick
r course, or the Python tutorial and documentation at https://docs.python.org/ . -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Where is decorator in this example code?

2015-11-14 Thread Chris Warrick
e decorator wraps the output of your get_fullname function with HTML tags. (Running code examples is a great way to understand them.) -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Using subprocess to capture a progress line

2015-11-11 Thread Chris Warrick
ple will become: ### p = subprocess.Popen(list(args)) ### (is list(args) really necessary? Wouldn’t plain Popen(args) just work?) -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Using subprocess to capture a progress line

2015-11-11 Thread Chris Warrick
read its main file to figure out the problem. Don’t mess with subprocess. (2) [don’t do it] do you need to intercept the lines? If you don’t set stderr= and stdout=, things will print just fine. (3) [DON’T DO IT] .ernq() punenpgre ol punenpgre naq znxr n zrff. PS. Thank you for setting a sensibl

Re: Is there an archive of the gohlke python binaries on windows

2015-11-08 Thread Chris Warrick
.x, too, and you can get a binary from here: https://pypi.python.org/pypi/lxml/3.4.1 Also, those binaries are built by someone USING Windows. You can certainly build C extensions, if you install Visual Studio in the correct version. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAE

Re: Guide in Deskop Application Development in Python for newbies

2015-11-08 Thread Chris Warrick
t familiar with it but I know it's supposed to be a lightweight > framework for developing web-based sites and applications. Could be an > excellent tool for the OP to use to build his user interface. > > -- > https://mail.python.org/mailman/listinfo/python-list web2py is weir

Re: Problems connecting to PostgreSQL

2015-11-08 Thread Chris Warrick
/current/static/auth-pg-hba-conf.html http://www.postgresql.org/docs/current/static/auth-methods.html http://www.postgresql.org/docs/current/static/sql-alterrole.html (basically, the default peer authentication checks your Unix user name to see if it matches 'stressTest', and fails) -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Questions on Pickle and Shelve

2015-11-06 Thread Chris Warrick
n for you: 3) Why are you using either? Both are unsafe and can lead to issues if you take untrusted files. Use JSON. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Python PNG Viewer(Browser Based)

2015-11-03 Thread Chris Warrick
mplate and some code that is aware of the file being an image. But absolutely no PNG viewer is necessary. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: python doesn't install

2015-11-02 Thread Chris Warrick
— upgrade to a newer OS or use 3.4.3 instead” notice to the download page? -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: installer user interface glitch ?

2015-11-01 Thread Chris Warrick
uot;. here is a screen of it: Windows XP is not supported. Please upgrade to a modern version of Windows, or switch to Linux. (you could also use 3.4.3, but Windows XP is insecure, and more apps will follow suit.) -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.pyt

Re: pip trouble

2015-10-30 Thread Chris Warrick
sfully uninstalled numpy-1.10.0 > Running setup.py install for numpy > > -- > https://mail.python.org/mailman/listinfo/python-list You used --up (aka -U, --upgrade). That option tries to upgrade the package you asked for *and* all dependencies. And since numpy 1.10.1 is newer than wh

Re: Script To Remove Files Made Either By Python Or Git

2015-10-09 Thread Chris Warrick
module, it’s impossible. And I really hope that “by using git” really means “that are part of the git repo”. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: PySide window does not resize to fit screen

2015-10-05 Thread Chris Warrick
up later). -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: PySide window does not resize to fit screen

2015-10-02 Thread Chris Warrick
e to resize everything on **any** window size change event. And you especially do not need the screen size, because it would still hinder changing window sizes. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: The Nikola project is deprecating Python 2.7 (+2.x/3.x user survey results)

2015-10-02 Thread Chris Warrick
On 2 October 2015 at 01:59, Terry Reedy wrote: > On 10/1/2015 12:26 PM, Chris Warrick wrote: >> >> The Nikola developers decided to deprecate Python 2.7 support. >> Starting with v7.7.2, Nikola will display a warning if Python 2.7 is >> used (but it will still be full

Re: The Nikola project is deprecating Python 2.7 (+2.x/3.x user survey results)

2015-10-01 Thread Chris Warrick
19:02, Stefan Behnel wrote: > Chris Warrick schrieb am 01.10.2015 um 18:26: >> The Nikola developers decided to deprecate Python 2.7 support. > > I wonder why it took the Nikola project so long to take that decision. > Python 3.3 came out almost exactly three(!) years ago and s

The Nikola project is deprecating Python 2.7 (+2.x/3.x user survey results)

2015-10-01 Thread Chris Warrick
: https://getnikola.com/ -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: PySide window does not resize to fit screen

2015-10-01 Thread Chris Warrick
tton("Hello", lay) lay.addWidget(btn) Please check with Qt documentation for more details -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Fwd: Django Tutorial (Database setup) Question

2015-09-27 Thread Chris Warrick
Forwarding to list (forgot about this stupid reply all thing, sorry). -- Forwarded message -- From: Chris Warrick Date: 27 September 2015 at 19:50 Subject: Re: Django Tutorial (Database setup) Question To: Cai Gengyang On 27 September 2015 at 19:39, Cai Gengyang wrote

Re: for loop

2015-09-20 Thread Chris Warrick
nfo/python-list You have mixed indentation. Your code contains both tabs and spaces. Python interprets tabs as 8 spaces, while your other indentation is 4 spaces, leading to bad parsing. Please make sure you use only spaces (reconfigure your editor to always insert 4 spaces and reindent everything with

Re: Can anyone help me run python scripts with http.server?

2015-09-06 Thread Chris Warrick
th safe forms and databases. And then you will need to figure out how to run it. I personally use nginx and uwsgi for this, you may need to look for something else. Examples for Django: https://docs.djangoproject.com/en/1.8/#first-steps https://docs.djangoproject.com/en/1.8/howto/deployment/wsg

Re: Need Help w. PIP!

2015-09-04 Thread Chris Warrick
40,960 pythonw3.exe > [snip] > > I did not create those variant files, they were part of my original > install from ActiveState. You are using an unofficial build of Python; the official one (from python.org) does not have `python3.exe`. -- Chris Warrick <https://chri

Re: pip

2015-08-31 Thread Chris Warrick
> > > -- > https://mail.python.org/mailman/listinfo/python-list The inclusion is handled by the ensurepip module. Run this: python -m ensurepip -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Trouble getting to windows My Documents directory

2015-07-11 Thread Chris Warrick
Windows XP/7/8: My Documents Windows Vista/8.1: Documents As for localized versions, Vista and up do the translation in Windows Explorer but use English names on disk. …but even with all that, users (or their administrators) can move the My Documents folder away from the home directory (to a file ser

Re: [setuptools] install data-file in users home-dir

2015-07-10 Thread Chris Warrick
CC’ing the mailing list; please use Reply All in the future. On 10 July 2015 at 16:36, wrote: > Hi Chris, > > thank you for your answer. > > On 2015-07-10 09:39 Chris Warrick wrote: >> You should NEVER use sudo with pip. Instead, use virtualenvs as a >> regular us

  1   2   >