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: 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: 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: 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 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: 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: 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: 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
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-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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: # 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: 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: 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: 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: 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-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: 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: 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: [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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: [newbie] how to make program suggest to install missing modules

2014-12-12 Thread Chris Warrick
sys.exit('Sorry could not install module rtlsdr, contact your > local Python-guru') > import rtlsdr > print('Module rtlsdr succesfully imported') > > > > -- > https://mail.python.org/mailman/listinfo/python-list This is bad practice. The user should install it themselves: sudo pip may interfere with virtualenv and OS package managers. Just tell the user what to install and call it a day. -- Chris Warrick <https://chriswarrick.com/> Sent from my Galaxy S3. -- https://mail.python.org/mailman/listinfo/python-list

Re: Run Programming ?????

2014-12-12 Thread Chris Warrick
keyboard. It's easier to buy a notebook. -- Chris Warrick <https://chriswarrick.com/> Sent from my Galaxy S3. -- https://mail.python.org/mailman/listinfo/python-list

Re: How to use the .isalpha() function correctly

2014-12-14 Thread Chris Warrick
"Enter a word: " and NOT SAVING IT 2. setting original to a string representation of the function `raw_input`, which is something like >>> str(raw_input) '' The correct way to do this is: original = raw_input("Enter a word: ") as raw_input already outputs a string. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: uWSGI, nGinx, and python on Wheezy: how do you configure it?

2014-12-16 Thread Chris Warrick
.0.0.1:3031 chdir = /var/flask/ master = true threads = 5 module = %n callable = app plugins = python uid = http gid = http processes = 3 --- If /var/flask is a virtualenv, add: binary-path = /var/flask/bin/uwsgi virtualenv = /var/flask -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Hello World

2014-12-22 Thread Chris Warrick
x27; Try 'rm --help' for more information. BSD: $ rm --rf / rm: illegal option -- - usage: rm [-f | -i] [-dIPRrvWx] file ... unlink file That’s two-step “protection”. (This e-mail brought to you by Unicode.) -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: problem with for and if

2015-01-05 Thread Chris Warrick
ich will do it for you: zmienna = 'traktorzysta' szukana = 't' print("Literka '",szukana,"' w słowie ",zmienna, "wystąpiła ",zmienna.count(szukana)," razy") -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: application console with window

2015-01-08 Thread Chris Warrick
erfejs użytkownika), np. przy użyciu biblioteki Tkinter lub czegoś innego co wygląda lepiej niż stary brzydki Tkinter (np. PyQT) -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: [ANN] EasyGUI_Qt version 0.9

2015-01-10 Thread Chris Warrick
t;> date 'Sat Jan 10 2015' >>> cal.date PyQt4.QtCore.QDate(2015, 1, 10) >>> cal.date.toPyDate() datetime.date(2015, 1, 10) -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: [OT] absolute vs. relative URI

2015-01-23 Thread Chris Warrick
On Fri, Jan 23, 2015 at 4:40 PM, Grant Edwards wrote: > On 2015-01-23, Marko Rauhamaa wrote: >> Grant Edwards : >> >>> I'm not an HTLM/HTTP guru, but I've tinkered with web pages for 20+ >>> years, and for links within sites, I've always used links either >>> relative to the current location or a

Re: Is there a more elegant way to spell this?

2015-01-27 Thread Chris Warrick
On Jan 27, 2015 2:16 PM, "Neal Becker" wrote: > > Is there a more elegant way to spell this? > > for x in [_ for _ in seq if some_predicate]: for x in seq: if some_predicate: do_something_to(x) -- Chris Warrick <https://chriswarrick.com/> Sent

Re: Use à Python 2 module with Python 3

2015-03-11 Thread Chris Warrick
e more-or-less straight bindings to the underlying C++ Qt library, which does not follow Python’s naming conventions. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Survey -- Move To Trash function in Python?

2015-05-14 Thread Chris Warrick
ted by Xfce, KDE, GNOME, PCManFM and probably many others. And if you are looking for a mostly-compliant Python library/app (and a shameless plug): https://pypi.python.org/pypi/trashman/1.5.0 -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Using "import math".

2015-06-06 Thread Chris Warrick
oes not exist; moreover you are not calling the method/discarding the value so it would be useless anyways -- Chris Warrick <https://chriswarrick.com> Sent from my Galaxy S3. -- https://mail.python.org/mailman/listinfo/python-list

Re: Is it a newsgroup or a list?

2015-06-07 Thread Chris Warrick
On Sun, Jun 7, 2015 at 1:45 PM, Steven D'Aprano wrote: > As far as I know, python-list a.k.a. comp.lang.python is the only one of the > Python mailing lists with an official newsgroup mirror. comp.lang.python.announce also exists. Sent via mailing list. -- Chris War

Re: enhancement request: make py3 read/write py2 pickle format

2015-06-09 Thread Chris Warrick
ode, like JSON. It will also work with other programming languages and environments if you ever need to talk to anyone else. But, FYI: there is backwards compatibility if you ask for it, in the form of protocol versions. That’s all you should know — again, don’t use pickle. -- Ch

Re: New Python student needs help with execution

2015-06-11 Thread Chris Warrick
ul to newcomers (especially since there are much better ways to accomplish what it does) -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Trying to configure Apache and Python 2.7 on Red Hat I get 403 Forbidden

2015-06-16 Thread Chris Warrick
would need to issue it on every restart if you did not change the config file. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: Trying to configure Apache and Python 2.7 on Red Hat I get 403 Forbidden

2015-06-16 Thread Chris Warrick
ities. Well, that’s not wsgi’s fault. There was a “permission denied” error, that’s everything wsgi ever knew. As a RHEL sysadmin, you should know that this is most likely caused by braindead syslinux and to read the audit log. PS. please don’t top-post. -- Chris Warrick <https://chriswarr

Re: [ANN] PySWITCH 0.2

2015-06-26 Thread Chris Warrick
to get a lot of downloads with that. SourceForge spreads malware, and lots of people avoid them nowadays. Upload to PyPI and switch to GitHub, or you won’t be successful in this world. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

Re: understanding why there is no setup.py uninstall

2015-07-06 Thread Chris Warrick
o a tarball, or to an unpacked directory: $ pip install foo-0.1.0.tar.gz $ pip install /home/kwpolska/bar $ cd baz; pip install . pip has an uninstall option. (It should also work with packages installed with plain setup.py.) -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

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

2015-07-10 Thread Chris Warrick
nly then you should copy this file to user’s config directory (use pkg_resources to help you get it) if it does not exist yet. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list

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

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: 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: 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: 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: 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

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: 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

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: 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

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: 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: 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: 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: 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: 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: 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: 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

  1   2   >