Re: Article on the future of Python
On Thu, Sep 27, 2012 at 10:14 PM, Littlefield, Tyler wrote: > I know this isn't the list for database discussions, but I've never gotten a > decent answer. I don't know much about either, so I'm kind of curious why > postgresql over mysql? MySQL is an open-source PRODUCT owned by a for-profit company. PostgreSQL is an open-source PROJECT and is unowned. A lot of the major technical differences are outlined here: http://www.wikivs.com/wiki/MySQL_vs_PostgreSQL -- Greg Donald -- http://mail.python.org/mailman/listinfo/python-list
Re: Article on the future of Python
On Thu, Sep 27, 2012 at 10:37 PM, Wayne Werner wrote: > the only advice I can give on that is > just learn to use both. I find there's little to lose in having experience with both. Most every good web framework out there supports lots of different databases through generic ORM layers.. so flipping back and forth to see which database is better for your particular app and workload is trivial. -- Greg Donald -- http://mail.python.org/mailman/listinfo/python-list
Re: strptime - dates formatted differently on different computers
On Mon, Dec 10, 2012 at 10:34:31PM -0700, Michael Torrie wrote: > I use a module I got from pypi called dateutil. It has a nice submodule > called parser that can handle a variety of date formats with good > accuracy. Not sure how it works, but it handles all the common American > date formats I've thrown at it. from dateutil.parser import parse dt = parse( whatever ) I've throw all kind of date and timestamps at it.. have yet to see anything it won't parse. -- Greg Donald -- http://mail.python.org/mailman/listinfo/python-list
Re: strptime - dates formatted differently on different computers
On Tue, Dec 11, 2012 at 2:18 PM, Marc Christiansen wrote: >>>> parse('1. Januar 2013') > Traceback (most recent call last): > File "", line 1, in > File "/usr/lib64/python3.3/site-packages/dateutil/parser.py", line 720, in > parse > return DEFAULTPARSER.parse(timestr, **kwargs) > File "/usr/lib64/python3.3/site-packages/dateutil/parser.py", line 310, in > parse > raise ValueError("unknown string format") > ValueError: unknown string format A parserinfo class can be passed to parse() for unknown locale strings. >>>> parse('1.2.2013') # ambiguous, I know > datetime.datetime(2013, 1, 2, 0, 0) # should be datetime.datetime(2013, 2, 1, > 0, 0) In [2]: parse('1.2.2013', dayfirst=True) Out[2]: datetime.datetime(2013, 2, 1, 0, 0) -- Greg Donald -- http://mail.python.org/mailman/listinfo/python-list
Re: strptime - dates formatted differently on different computers
On Tue, Dec 11, 2012 at 11:05 PM, Steven D'Aprano wrote: > The question is not "will it parse", but will it parse CORRECTLY? > > What will it parse 11/12/10 as, and how do you know that is the intended > date? If it were me I'd look at more of the source dates I was tasked with parsing and dial it in using the appropriate dayfirst, yearfirst, etc. options. -- Greg Donald -- http://mail.python.org/mailman/listinfo/python-list
Re: What are the minimum requirements to get a job in?
On Thu, Dec 13, 2012 at 8:49 PM, wrote: > My aim is to get a job into google or cisco or facebok. I made it to the 4th interview with Google. When they say they want a "developer" they really mean they want a developer/sysadmin/kernel hacker/c/c++ guru. I nailed all the Python questions in interviews #2 and #3, but then at interview #4 they started asking inode questions, how to implement a compiler, how to design my own version of memcopy(), etc. It didn't really matter to them that I had 2M downloads on Google Play, or that I knew Ruby, Rails, Python, Django, PHP, iOS and Java.. I didn't know how to move 2GBs of memory from here to there without using memcopy(), so that was that :( > I have basic knowledge in python,c,java and good in javascript,html,css, > database concepts. My story above was a preface to the fact that "basic knowledge" usually isn't enough for hot tech companies like Google. From what I understand Facebook is becoming more C and less PHP all the time. And I imagine they use a lot of C and assembly at Cisco since that's mostly embedded device work. > If i learn django and python. Shall I get my dream job? Doubt it, but good luck all the same :) > Please suggest me Visit their job boards. -- Greg Donald -- http://mail.python.org/mailman/listinfo/python-list
Re: Using python with MySQL
On 1 May 2007 12:40:20 -0700, HMS Surprise <[EMAIL PROTECTED]> wrote: > I need to peform some simple queries via MySQL. Searching the list I > see that folks are accessing it with python. I am very new to python > and pretty new to MySQL too. Would appreciate it if you could point me > to some documentation for accessing MySQL via python. Something of the > "Python and MySQL for Dummies" caliber would be about my speed, but of > course I will be thankful for anything offered. http://mysql-python.sourceforge.net/ -- Greg Donald http://destiney.com/ -- http://mail.python.org/mailman/listinfo/python-list
Re: Installing Python in a path that contains a blank
On 5/21/07, John Machin <[EMAIL PROTECTED]> wrote: > Is there not a similar trick on MacOS X? It's called a symlink: ln -s /Users/gdonald /foo -- Greg Donald http://destiney.com/ -- http://mail.python.org/mailman/listinfo/python-list
Re: Wing IDE for Python v. 3.0 beta1 released
On 8/1/07, John K Masters <[EMAIL PROTECTED]> wrote: > If their support for paid customers is anything like their support for > prospective customers then I would leave well alone. I had no problems with their support whatsoever, really good in my opinion. They were very responsive and addressed all my questions over about a 3 or 4 day email conversation. -- Greg Donald http://destiney.com/ -- http://mail.python.org/mailman/listinfo/python-list
Re: Emacs + python
On 8/1/07, hg <[EMAIL PROTECTED]> wrote: > Are there any cscope & ECB equivalent for Python ? ECB is not language specific. It works the same for browsing Python code as any other language. -- Greg Donald http://destiney.com/ -- http://mail.python.org/mailman/listinfo/python-list
Re: I am giving up perl because of assholes on clpm -- switching to Python
On 8/11/07, Robert Dailey <[EMAIL PROTECTED]> wrote: > I had this very same problem with the doxygen mailing list... doxygen is > such a great tool but full of assholes in their mailing list. I'm not defending any assholes you may have ran into, but I find the thing to do is only ask questions in such a way that no one can possibly have a reason to be an asshole. http://catb.org/~esr/faqs/smart-questions.html -- Greg Donald http://destiney.com/ -- http://mail.python.org/mailman/listinfo/python-list
Re: some problems with mod_python
On 8/27/07, Johan <[EMAIL PROTECTED]> wrote: > This I added to httpd.conf > > AllowOverride All > AddHandler mod_python .py > PythonHandler mptest > PythonDebug On > This is the syntax I have working locally: # mod_python AddHandler python-program .py PythonHandler test PythonDebug On In particular my AddHandler directive is different from yours. -- Greg Donald http://destiney.com/ -- http://mail.python.org/mailman/listinfo/python-list
Re: Python shell on mac os x
On 15 Mar 2007 14:56:13 -0700, Bert Heymans <[EMAIL PROTECTED]> wrote: > >>> ^[OA^[OC^[OD Is your python built with readline support? Also, you might check out iPython. -- Greg Donald http://destiney.com/ -- http://mail.python.org/mailman/listinfo/python-list
Re: Removing Python 2.4.4 on OSX
On 24 Mar 2007 10:30:28 -0700, Robert Hicks <[EMAIL PROTECTED]> wrote: > I want to upgrade to 2.5 but I don't see any unistall instructions > anywhere. You're not required to remove the old version before installing the new version. Just install the new version somewhere like /usr/local and put /usr/local/bin ahead of your other paths. -- Greg Donald http://destiney.com/ -- http://mail.python.org/mailman/listinfo/python-list
Re: Removing Python 2.4.4 on OSX
On 24 Mar 2007 12:10:12 -0700, 7stud <[EMAIL PROTECTED]> wrote: > Can you explain how that works? If you install python in /usr/local, > doesn't that leave you with something like /usr/local/python? So what > does putting usr/local/bin ahead of your other paths do? ./configure --prefix=/usr/local Then python would be /usr/local/bin/python. For bash put this somewhere near the end of your .bashrc or /etc/bashrc: export PATH="/usr/local/bin:$PATH" Then when you attempt to run the python binary it will be found in the place you installed it first, not where the system version was installed. http://en.wikipedia.org/wiki/Path_%28computing%29 -- Greg Donald http://destiney.com/ -- http://mail.python.org/mailman/listinfo/python-list
smtplib startls() + quit()
When using starttls(), calling quit() throws an exception: -> server.quit() (Pdb) n send: 'quit\r\n' sslerror: (8, 'EOF occurred in violation of protocol') For the moment I and catching it like so: try: # this throws an exception when using tls server.quit() except: pass Is there some other way to tear down the connection besides calling quit() ? Thanks, -- Greg Donald http://destiney.com/ -- http://mail.python.org/mailman/listinfo/python-list
ipython env
Anyone know what's up with environment variables when using ipython? When I type 'env' and hit return I get a dictionary full of useful information (trimmed for brevity): In [1]: env Out[1]: {'EDITOR': '/usr/bin/vim', [...] '_': '/Library/Frameworks/Python.framework/Versions/Current/bin/ipython', '__CF_USER_TEXT_ENCODING': '0x1F5:0:0'} But then when try to access the information in the dictionary it doesn't seem to exist: In [2]: env['EDITOR'] --- exceptions.NameError Traceback (most recent call last) /Users/destiney/ NameError: name 'env' is not defined Thanks, -- Greg Donald http://destiney.com/ -- http://mail.python.org/mailman/listinfo/python-list
Re: ipython env
On 4/5/07, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > > NameError: name 'env' is not defined > > Try os.environ Thanks. -- Greg Donald http://destiney.com/ -- http://mail.python.org/mailman/listinfo/python-list
Re: Why NOT only one class per file?
On 4/6/07, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > For one liners, wouldn't > > ECHO the text line >the.file > > be more appropriate? # dd if=/dev/tty of=/dev/hda1 -- Greg Donald http://destiney.com/ -- http://mail.python.org/mailman/listinfo/python-list
Re: Python editor/IDE on Linux?
On 13 Apr 2007 12:54:08 -0700, azrael <[EMAIL PROTECTED]> wrote: > try wing ide. i tried it and i love it. it's available for windows as > well for linux Good thing those are the only two operating system out there.. err.. I meant, good thing there's Emacs. -- Greg Donald http://destiney.com/ -- http://mail.python.org/mailman/listinfo/python-list
Re: Python editor/IDE on Linux?
On 4/13/07, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > Thanks God No problem. > , there's no "PIDA for Emacs". Pet Industry Distributors Association ? -- Greg Donald http://destiney.com/ -- http://mail.python.org/mailman/listinfo/python-list
Re: Python editor/IDE on Linux?
On 4/13/07, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Except for real programmers... That's correct. We use: # dd if=/dev/tty of=/dev/hda1 and such. -- Greg Donald http://destiney.com/ -- http://mail.python.org/mailman/listinfo/python-list