|
I will tell you from experience that upgrading python versions in an OS distribution is a -nightmare-. We upgraded from python 2.4 to 2.6 and, even with 2 months of lead time for all the projects using python to set themselves straight with 2.6, everything completely broke for a number of OS builds. It took a couple of additional weeks to straighten everything out to people's satisfaction. I highly doubt we'll upgrade to 2.7 unless there's a justifiable business reason to do so. New unittest.py functionality won't cut it.
|
# ? Aug 26, 2010 17:03 |
|
|
# ? May 21, 2024 02:19 |
|
Backport the new module into <2.7 using unittest2 from pypi
|
# ? Aug 26, 2010 18:08 |
|
The Journey Fraternity posted:I'd consider myself privileged if I could use 2.5 at work. We're stuck with 2.3. At my last job (which I left in 2006) we were still using 1.3. Apparently it takes far too much time to test the migration to a new version. Mainly because we had to roll all of our own libraries for everything under the sun since we were so far behind the times.
|
# ? Aug 26, 2010 19:10 |
|
I'm lucky in that I can use any Python version I can compile and make the dependencies run on for the most part - but I go along with the OS vendor's version because I'm lazy, and I don't need everything in 2.7 right now. I'll be really happy when my biggest dependency (Django) has a Python 3 version that's blessed
|
# ? Aug 27, 2010 03:47 |
|
Say I wanted to write a python program that allowed arrow key/mouse input but sort of like an old DOS program would. Is there support for input/output at a basic level? Sort of like being able to recreate vi editor in python is the closest example I can think of. Or do I have to either go with basic input functions asking questions or full GUI?
|
# ? Sep 2, 2010 23:14 |
|
Sylink posted:Say I wanted to write a python program that allowed arrow key/mouse input but sort of like an old DOS program would. Is there support for input/output at a basic level? If you use tkinter (or another GUI toolkit) you can capture keyboard events. I think that might be the most reasonable way to do what you want.
|
# ? Sep 3, 2010 02:49 |
|
Sylink posted:Say I wanted to write a python program that allowed arrow key/mouse input but sort of like an old DOS program would. Is there support for input/output at a basic level? if you're working in a CLI, you could use curses
|
# ? Sep 3, 2010 02:51 |
|
Deus Rex posted:if you're working in a CLI, you could use curses Not in Windows, though
|
# ? Sep 3, 2010 03:12 |
|
I need to work in Windows, otherwise that would be cool. I'll have to play with tkinter then. EDIT: though it says curses works in DOS and you can run python through the Windows command line anyway so would it work?
|
# ? Sep 3, 2010 04:56 |
|
Sylink posted:I need to work in Windows, otherwise that would be cool. I'll have to play with tkinter then. code:
|
# ? Sep 3, 2010 07:38 |
|
BeefofAges posted:
Curses: Foiled again! (Couldn't resist.)
|
# ? Sep 3, 2010 07:43 |
|
Some person made a port for Windows, I'll have to try it later. http://adamv.com/dev/python/curses/
|
# ? Sep 3, 2010 14:32 |
|
Way nicer than using curses directly is using urwid. It has a curses backend, so it's compatible with wcurses. I've also written an UrwidProtocol for twisted so you serve up console-based applications over telnet or whatever. curses can't do that!
|
# ? Sep 3, 2010 19:31 |
|
Quick question: how do I search a string with the origin on the right? find and rfind search from l to r and r to l respectively, but both have the origin on the left.
|
# ? Sep 4, 2010 04:14 |
|
Kolodny posted:Quick question: how do I search a string with the origin on the right? find and rfind search from l to r and r to l respectively, but both have the origin on the left. >>> 'abcde'[::-1].startswith('edc') True
|
# ? Sep 4, 2010 04:54 |
|
I don't know if I'm misreading what you want, but I think flipping the string and your search query would cause me to make a mistake. Especially since there is an endswith() method:code:
|
# ? Sep 4, 2010 05:36 |
|
reversed() might also be handy for this.
|
# ? Sep 4, 2010 05:43 |
|
How is image manipulation done in Python 3? What module should I use?
|
# ? Sep 4, 2010 17:28 |
|
Are you the same qntm from qntm.org? I ask because if you are, we have two posters named Sam Hughes, which is kinda
|
# ? Sep 4, 2010 17:59 |
|
Otto Skorzeny posted:Are you the same qntm from qntm.org? I ask because if you are, we have two posters named Sam Hughes, which is kinda Yes I am, and yes I know. We actually met online a few years ago. I think we decided that I was the evil one because I have the goatee.
|
# ? Sep 4, 2010 21:58 |
|
qntm posted:How is image manipulation done in Python 3? What module should I use? Edit: sorry, glossed over you saying Python 3. I think PIL for Py3 is still in the pipeline.
|
# ? Sep 4, 2010 22:17 |
|
code:
|
# ? Sep 6, 2010 16:59 |
|
Kolodny posted:
code:
code:
|
# ? Sep 6, 2010 17:06 |
|
Does anyone know why there are only pre-compiled versions of NumPy 1.5.0 for Python3.1 available for only win32, and not OSX? A cursory google reveals nothing and I don't like the idea of having to try and compile it myself.
|
# ? Sep 8, 2010 03:16 |
|
NumPy is pretty trivial to compile on OS X.
|
# ? Sep 8, 2010 04:08 |
|
a lot of people I work with use (darwin)port(s) to do their OSX python-wrangling, and so far I only see py2.6 and earlier version. That's normally my suggestion for this kind of thing though.
|
# ? Sep 8, 2010 04:14 |
|
I've been using homebrew for my OS X package management for a while. It's a pretty nice piece of work.
|
# ? Sep 8, 2010 04:18 |
|
Has anyone here used mod_python? I'm trying to use it with the publisher handle and I can't get it to work right, the server pages come as not found on a Fedora server. I know it kind of works because this yields a result if I have handler mptest.py code:
code:
Sylink fucked around with this message at 16:38 on Sep 8, 2010 |
# ? Sep 8, 2010 16:33 |
|
Sylink posted:Has anyone here used mod_python?
|
# ? Sep 8, 2010 16:41 |
|
I'm just playing with it. I'll be abandoning python for this project anyway. The web applications are weird as gently caress compared to the standard php/mysql.
|
# ? Sep 8, 2010 17:54 |
|
Use django with its built in web server. It's the easiest thing to setup for playing around and doesn't require any fidling with apache.
|
# ? Sep 8, 2010 18:01 |
|
Sylink posted:I'm just playing with it. Most Python web frameworks are MVC-based like the big PHP frameworks, but there's some that can be used like simple PHP pages, although I can't think of any names off hand. The reason for that is that, trust me on this, if you spend the 10 mins necessary to learn the basics of Django. As mentioned above, you can use the built in webserver and get started with playing around with it immediately. And once you do want it installed, mod_wsgi is much easier to get running on Apache than mod_python. I came from PHP and terrible web programming practices and Django seemed strange as gently caress, but it takes very little time working with it to realize how much better it is.
|
# ? Sep 8, 2010 18:26 |
|
Sylink posted:I'm just playing with it. We're very sorry that we have something that looks less like spaghetti and more like software engineering.
|
# ? Sep 8, 2010 19:00 |
|
king_kilr posted:We're very sorry that we have something that looks less like spaghetti and more like software engineering. PHP MVC Frameworks aren't bad. Get off your high horse.
|
# ? Sep 8, 2010 23:58 |
|
First Time Caller posted:PHP MVC Frameworks aren't bad. Get off your high horse. He never mentioned them being bad, the OP said quote:The web applications are weird as gently caress compared to the standard php/mysql.
|
# ? Sep 9, 2010 01:22 |
|
I'd like to use something that is sorta like JavaDoc. Does anyone have any recommendations for tools they like to use?
|
# ? Sep 9, 2010 03:37 |
|
Beseiged posted:I'd like to use something that is sorta like JavaDoc. Does anyone have any recommendations for tools they like to use? Sphinx.
|
# ? Sep 9, 2010 03:53 |
|
Beseiged posted:I'd like to use something that is sorta like JavaDoc. Does anyone have any recommendations for tools they like to use? We use Doxygen at my office.
|
# ? Sep 9, 2010 06:33 |
|
I'm new to to programming, so this an general advice question. My first language a few months ago was python, and I quite like it. However, in some instances it seems to run slow, so I'm learning C now. What I wonder is: is it worth it to mix the two languages with the Python/C API (or Cython) in order to get more speed and mix languages, or will I just create some putrid pile of crap? Do people write C extensions just for quicker code execution, or am I missing the point?
|
# ? Sep 9, 2010 18:49 |
|
|
# ? May 21, 2024 02:19 |
|
So...as a relatively hardcore Perl dork, I have to say that I'm rather enjoying Python these days. That said: The first page of the megathread mentions some alternative APIs that offer threads that span more than one CPU. Are they still the choices of today or has something else/better come along? I am sadly hitting 101% CPU utilization with my current implementation
|
# ? Sep 9, 2010 20:08 |