Confusing datetime.datetime

2012-07-05 Thread Damjan
strftime('%s') '1341453600' -- TZ=Asia/Tokyo python >>> from datetime import datetime >>> import pytz >>> tz = pytz.timezone('Europe/Skopje') >>> dt = datetime.fromtimestamp(1341446400, tz) >>> dt datetime.datetime(2012, 7, 5, 2, 0, tzinfo=CEST+2:00:00 DST>) >>> dt.strftime('%s') '1341421200' Python 2.7.3, pytz 2012c -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: Confusing datetime.datetime

2012-07-05 Thread Damjan
On 05.07.2012 16:10, Damjan wrote: I've been struggling with an app that uses Postgresql/Psycopg2/SQLAlchemy and I've come to this confusing behaviour of datetime.datetime. Also this: #! /usr/bin/python2 # retardations in python's datetime import pytz TZ = pytz.timezone

Re: Confusing datetime.datetime

2012-07-05 Thread Damjan
I recommend you report it as a bug against the pytz module. It returns True, so it seems to be changed in the datetime object?? I tried both 2.7 and 3.2 -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: why greenlet, gevent or the stackless are needed?

2012-07-07 Thread Damjan
a much larger memory address space footprint. There's one function, called the gevent hub, that waits for any I/O event and then switches to the function that "blocked" on that I/O. -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: Confusing datetime.datetime

2012-07-08 Thread Damjan
good references of using good times in Python? -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: 1 Million users.. I can't Scale!!

2005-09-28 Thread Damjan
ver TCP sockets. Is there some python module that provides a multi process Queue? -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: Confused on Kid

2005-10-25 Thread Damjan
e modeled to be similar to python. The way it works is you feed the template some data and it generates HTML documents. The document can have a reference to a CSS file just like any other HTML page. -- damjan -- http://mail.python.org/mailman/listinfo/python-list

cx_Oracle, is anything selected?

2005-10-31 Thread Damjan
Is there a way to see if the SELECT in cx_Oracle didn't return anything? I want to optimize the situation when the number of selected rows is zero. Is select count(*) the only option, seems inefficient? -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: cx_Oracle, is anything selected?

2005-11-01 Thread Damjan
7;d like to avoid that unnecessary step. c.rowcount will not give me the number of rows selected, it will only give me the number of rows already fetched. -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: cx_Oracle, is anything selected?

2005-11-01 Thread Damjan
> Apart from that: what harm does the connection to the smpt do? If it > works - keep it that way. I worry about being banned from the server. -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: how to write a blog system with Python

2005-11-08 Thread Damjan
> I am a fresh here , and I have no idea of it. > Do you have any comments? Take a look at aether, a single CGI script and it's easy to understand. http://www.logarithmic.net/pfh/aether -- damjan -- http://mail.python.org/mailman/listinfo/python-list

mod_python web-dav management system

2005-11-11 Thread Damjan
.. So, has anyone already done something similar? A management web-ui would be nice too. -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: mod_python web-dav management system

2005-11-14 Thread Damjan
> Zope has WebDAV support and is written in Python. You could > use Zope or perhaps use "parts" of it (since it is open source). I wouldn't use Zope as file storage. The ZODB is inefficient for storing big files. -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: HTML generation vs PSP vs Templating Engines

2005-11-16 Thread Damjan
sy to use (prety much pythonic). -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: python-mysqldb__debian_to_freebsd

2005-11-16 Thread Damjan
a Debian libmysql but now has to work with the FreeBSD libmysql... I just don't beleive you can make this work. -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Unicode in MIMEText

2005-11-23 Thread Damjan
.base64MIME.body_encode(s) File "/usr/lib/python2.4/email/base64MIME.py", line 136, in encode enc = b2a_base64(s[i:i + max_unencoded]) UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-7: ordinal not in range(128) -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode in MIMEText

2005-11-23 Thread Damjan
0 +0100 @@ -244,6 +244,8 @@ """Convert a string from the input_codec to the output_codec.""" if self.input_codec <> self.output_codec: return unicode(s, self.input_codec).encode(self.output_codec) +elif isinstance(s, unico

Re: ANNOUNCE: Mod_python 3.2.5 Beta

2005-11-23 Thread Damjan
;s not true (at least in 2.3 and 2.4): >>> def f(): ... return 'a' ... >>> f.__auth__ = {1:'one'} -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode in MIMEText

2005-11-25 Thread Damjan
> ... and being concerned to improve the library you logged this patch in > Sourceforge for consideration by the developers? > > That's the only way to guarantee proper consideration of your fix. Ok I will, can you confirm that the patch is correct? Maybe I got something wr

Any way to change files in a ZIP archive?

2005-11-25 Thread Damjan
in it, and then send the result back. I've made the most of my script, but I can't find a way to replace (freshen) the file that's already in the archive? -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode in MIMEText

2005-11-28 Thread Damjan
patch submitted... > Thanks for taking the time to improve the quality of the Python library. Do you think it would be possible to do some kind of an automatic comprehensive test of compatibility of the standard library with unicode strings? -- damjan -- http://mail.python.org/mail

Re: Oracle 9i client for Linux

2005-11-30 Thread Damjan
This is a list of files I use to compile cx_Oracle, php-oci amd perl DB::OCI on Linux. I set ORACLE_HOME to /usr/lib/oracle and symlink the *.so files in /usr/lib so that I don't need to set LD_LIBRARY_PATH. I guess this list can be reduced some more... but I got tired of experimenting And the ins

small inconsistency in ElementTree (1.2.6)

2005-12-08 Thread Damjan
Attached is the smallest test case, that shows that ElementTree returns a string object if the text in the tree is only ascii, but returns a unicode object otherwise. This would make sense if the sting object and unicode object were interchangeable... but they are not - one example, the translate

Re: small inconsistency in ElementTree (1.2.6)

2005-12-09 Thread Damjan
>> Do I need to check the output of ElementTree everytime, or there's some >> hidden switch to change this behaviour? > > no. > > ascii strings and unicode strings are perfectly interchangable, with some > minor exceptions. It's not only translate, it's decode too... probably other methods and beh

Re: small inconsistency in ElementTree (1.2.6)

2005-12-10 Thread Damjan
>>> ascii strings and unicode strings are perfectly interchangable, with >>> some minor exceptions. >> >> It's not only translate, it's decode too... > > why would you use decode on the strings you get back from ET ? Long story... some time ago when computers wouldn't support charsets people inven

Python curses wizard

2005-01-24 Thread Damjan
Is there some tool that can help me design a simple curses wizards, preferably one that uses Python, but if there's some other sollution I'd be happy to hear. The important requirement is that its curses based (or similar text based UI). -- damjan -- http://mail.python.org/mailma

Re: execute python code from db

2005-01-26 Thread Damjan
> for python_code in c.fetchall(): > execute (python_code) > > Maybe feed python with stdin??. eval -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: importing a package

2005-06-22 Thread Damjan
e script the src/ directory was added to the sys.path list. If you relocate dir1/ and dir2/ in a "package" directory here it will not work. -- damjan -- http://mail.python.org/mailman/listinfo/python-list

MySQLdb reconnect

2005-06-22 Thread Damjan
on program were displayed as if the "set names utf8" was not executed i.e. I got question marks where utf-8 cyrillics should've appeared. After restarting the Python program everything was ok, just as when I first started it. The long running Python process is actually a scgi quixote

Re: importing a package

2005-06-22 Thread Damjan
ther directory is added to the default builtin sys.path. In you case (the second case), you can import package.dir2.file2. -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: MySQLdb reconnect

2005-06-29 Thread Damjan
.OperationalError: db = MySQLdb.connect(godot.dbhost, godot.dbuser, godot.dbpass, godot.dbname, use_unicode=1) db.charset = 'utf8' -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: CherryPy-2.1.0-beta released

2005-07-15 Thread Damjan
en its stored in a database or file which I handle myself fine). -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: Python scripts wont run - HELP

2005-07-18 Thread Damjan
y to where your files are ("cd /path/to/files/"). execute them ("python my-script.py'). -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: python image thumbnail generator?

2005-08-29 Thread Damjan
e very fast by calling an apache.send_file function. see http://www.modpython.org/pipermail/mod_python/2004-September/016471.html -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: Python on WWW - beginners question: what to choose?

2005-02-07 Thread Damjan
w.owlfish.com/software/simpleTAL/) -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: Big development in the GUI realm

2005-02-07 Thread Damjan
how much of PyQT is ready for QT4? Anyway its time for a PyQT based VB-killer [ a GPL one :) ]. -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: Big development in the GUI realm

2005-02-07 Thread Damjan
be people that know how to compile :), and they'll be able to release & distibute binaries... Previously you couldn't even compile the GPL QT on windows, since it lacks the low-level win32 api calls that do all the work. -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: Big development in the GUI realm

2005-02-08 Thread Damjan
al to distribute it as source code. > Am I bound by GPL? Certainly not, I did not sign or agree to it in way. correct -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: Reportlab and Barcodes

2005-02-09 Thread Damjan
> One of the users on the Reportlabs mailing list was kinda enough to > offer me the solution.. A simple call to the drawOn function, e.g.: > > bc = code39.Standard39("123",xdim = .015*inch) whats code39 in this example? > x = 6*inch > y = -5*inch > bc.drawOn(c

Re: Big development in the GUI realm

2005-02-11 Thread Damjan
a binary thats derived from GPL software (and you didn't publish it source code under the GPL too). > Nobody really knows what the GPL means when it gets down to it; If you don't know, you should ask the person whose GPL code you are using. -- damjan -- http://mail.python.org/mailman/listinfo/python-list

ElementTree, how to get the whole content of a tag

2005-03-16 Thread Damjan
Given the folowing XML snippet, I build an ElementTree instance with et=ElementTree.fromstring(..). Now et.text returns just '\n text\n some other text'. Is there any way I could get everything between the and tag? text some other text and then some more -- damja

Re: I can do it in sed...

2005-03-16 Thread Damjan
Or, much nicer > if line[:5]=='start': printing=1 if line.startswith('start'): printing=1 > if line[:3]=='end': printing=0 if line.endswith('end'): printing=0 -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: ElementTree, how to get the whole content of a tag

2005-03-16 Thread Damjan
'\n text\n some other text\n and then some more\n' And if there were attributes in I'd want them too where they were. Can't I just get ALL the text between the tags? -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: MySQLdb problem with mod_python, please help

2004-11-30 Thread Damjan
> MySQLdb is working fine at command line, however when I tried to use > it with mod_python, it give me a "server not initialized" error. Maybe its this problem? http://www.modpython.org/FAQ/faqw.py?req=show&file=faq02.013.htp -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: cross platform use of set locale

2005-03-23 Thread Damjan
Python program (2.3.4 [GCC 3.3.3] on linux2) import locale locale.setlocale(locale.LC_ALL, "") print locale.format("%'.2f", 1234567.89, grouping=True) complains about the ' in the format ValueError: unsupported format character ''' (0x27) at index 1 without the ' it outputs: 1234567,89 -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: escape single and double quotes

2005-03-24 Thread Damjan
xecuting the simple string expansion SQL % """""", I call the execute method with the text as a second *parametar*. Everything else is magic :). -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: string join() method

2005-03-24 Thread Damjan
> but perhaps the webserver sanitizes the output of CGI script and converts > plain "\n" into "\r\n" Yes apache does this, since it adds its own headers anyway it will replace all '\n' in the headers with '\r\n' and '\n\n' with '\r\n\r

Re: non-ascii charater image gereration with PIL

2005-04-11 Thread Damjan
", 12) draw.text((10, 10), text, font=font) image.save('wow.jpg') -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: PyChart into web site error

2005-04-13 Thread Damjan
ing mod_python there's no sys.argv (and what would it contain if it existed??). Now the real question is why PyChart needs sys.argv? OTOH, maybe you can make a dummy sys module in your script that provides sys.argv?? BTW, I tested with Apache 2.0.53, mod_python 3.1.4 and Python 2.4 to confirm

Re: using locales

2005-04-20 Thread Damjan
achine, or something like that. > > Can anyone tell me how I *do* get these names? In linux (glibc) you can see all locales with "locale -a". -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: quick unicode Q

2005-12-15 Thread Damjan
>> Read it as a string, and then decode it with the .decode method. You >> specify what encoding it's in. > > Most probably, the OP is asking what to do with an UTF-8 encoded string. > > To decode that, just use: > > s.decode("utf-8") I prefer: unicode(s, 'utf-8') That way it's more clear that

Re: SVG rendering with Python

2005-12-15 Thread Damjan
Do you want to create a SVG file or display a SVG file? SVG files are just XML so maybe you can create them easyly? -- http://mail.python.org/mailman/listinfo/python-list

Re: OO in Python? ^^

2005-12-15 Thread Damjan
> sorry for my ignorance, but after reading the Python tutorial on > python.org, I'm sort of, well surprised about the lack of OOP > capabilities in python. Honestly, I don't even see the point at all of > how OO actually works in Python. > For one, is there any good reason why I should ever inher

Re: SMPP implementation in python

2006-01-17 Thread Damjan
You can see some code here http://pysmpp.sourceforge.net/ but it's not complete... it need much more work. -- http://mail.python.org/mailman/listinfo/python-list

Re: unicode html

2006-07-17 Thread Damjan
conversion: > \uc3B4 => ô '&#%d;' % ord(u'\u0430') or '&#x%x;' % ord(u'\u0430') > for all available html entities. -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: ImportError: libclntsh.so.10.1: cannot open shared object file: Permission denied

2006-07-20 Thread Damjan
ME, which is /usr/share/oracle on my system and it contains bin/ install/ lib/ network/ ocommon/ oracore/ rdbms/ sqlplus/ -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: threading+ftp+import => block

2006-07-25 Thread Damjan
t; > But : > $ python >>>> import ftp_thread > / > This has been documented in the blog posts titled "How well you know Python" (find it on google) The problem is that, once you run "import ftp_thread" a lock is set in the Python interpreter, so then you can't start a new thread... (this from the back of my mind). -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: threading+ftp+import => block

2006-07-25 Thread Damjan
Damjan wrote: > Panard wrote: > >> Hi, >> I'm experiencing a strange problem while trying to manage a ftp >> connection into a separate thread. >> >> I'm on linux, python 2.4.3 >> >> Here is a test : >> -- ftp_thread.p

Re: Need a compelling argument to use Django instead of Rails

2006-07-25 Thread Damjan
uby (Rails or not).. and from that little I've seen from it.. I didn't like it. OTOH Ruby surelly is not that bad either. -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: How to force a thread to stop

2006-07-29 Thread Damjan
e first boot the machine would reboot on exactly 2 minutes. After a bit of poking around I found that hotplug detected the WDT support and loaded the driver for it (i8xx_tco), and it seems the WDT chip was set to start ticking right away after the driver poked it. -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows vs. Linux

2006-07-30 Thread Damjan
el 2.6.17, and probably you could easily make it work if you make some upgrades to Ubuntu. -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: Need a compelling argument to use Django instead of Rails

2006-08-05 Thread Damjan
be replaced with mod_python scripts. OTOH SCGI or FastCGI seem better sutied for python web (WSGI) applications. -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: Which Python API for PostgreSQL?

2006-08-05 Thread Damjan
> I also recommend psycopg. But make sure you use psycopg2 -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: ImportError: libclntsh.so.10.1: cannot open shared object file: Permission denied

2006-08-08 Thread Damjan
o that no environment variables are neccesseary - >> actually this is not possible, but what I have is, symbolic links >> in /usr/lib to the libraries in $ORACLE_HOME/lib, thus I don't need the >> LD_LIBRARY_PATH variable, and the only other variable I need is the >> ORACLE_HOME

Re: Need a compelling argument to use Django instead of Rails

2006-08-08 Thread Damjan
n.3F Now that it's GPL AppArmor seems to get a lot of supporters. -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: hide python code !

2006-08-14 Thread Damjan
e same room with your software 100-fold if you release it under.. say GPL. -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: WSGI - How Does It Affect Me?

2006-10-08 Thread Damjan
like not in CGI) so: s = wsgiref.simple_server.make_server('',8080, app) s.server_forever() More info at http://wsgi.org/wsgi/Learn_WSGI > 3. Using IIS at all for that matter, does WSGI work on IIS, do any > frameworks? There's an IIS server gateway (WSGI server) but you can always run WSGI applications with CGI, as seen above. -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: is a wiki engine based on a cvs/svn a good idea?

2006-05-31 Thread Damjan
dea to use > it in a wiki engine. Pro: versioning / diffs, Cons: you need your own > svn/cvs repository, can pyLucene or Xapwrap index this? You can certanly index the svn checkout if nothing else. -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: PyQt v4.0 Released - Python Bindings for Qt v4

2006-06-12 Thread Damjan
> QtNetwork > A set of classes to support TCP and UDP socket programming and higher > level protocols (eg. HTTP). Since QtNetwork is asynchronous how does it compare to twisted? I find Qt's signals and slots easier to understand and work with than twisted deferreds.

Re: Python database access

2006-06-27 Thread Damjan
> The odbc module is part of the Python Standard Library. Since when? -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: Chapter 9 Tutorial for Classes Not Working

2006-06-30 Thread Damjan
gt; > This gives the following error: > > Traceback (most recent call last): > File "", line 2, in ? > TypeError: unbound method f() must be called with MyClass instance as > first argument (got nothing instead) > > Please help...this is killing me! What you a

Re: Persistent Session in CGI

2006-08-30 Thread Damjan
an run your app as CGI, in mod_python, as a standalone http server, with SCGI/FastCGI. You'll benefit from authentication and session middleware. Middleware is a great WSGI concept, there are also caching middlewares etc.. -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: Persistent Session in CGI

2006-08-30 Thread Damjan
the app in the paste httpserver ... # but make some error in your python code to see it's results -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: Egg problem (~/.python-eggs)

2006-08-30 Thread Damjan
ctually) so that the kernel/lib-loader can map them. If your .egg package doesn't have any binary modules, then it doesn't need to unpack anything. -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: Broadcast server

2006-08-31 Thread Damjan
et the stdlib docs: http://docs.python.org/lib/module-socket.html http://docs.python.org/lib/module-select.html -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: Python newbie with a problem writing files

2006-09-04 Thread Damjan
ite = (feed_title) > AttributeError: 'file' object attribute 'write' is read-only -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: get the en of a program running in background

2006-09-11 Thread Damjan
ember the PIDs of the forked procesess and in your signal handler use os.wait() to see which one has died. BTW os.wait() can work in non-blocking mode . -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: egg and modpython

2006-09-11 Thread Damjan
> I applaud you for studying the traceback in more depth than I can find > the motivation for, Bruno. ;-) However, this looks like a program using > some package installed by setuptools/easy_install needs to unpack that > package when running. See news:[EMAIL PROTECTED] -- dam

Re: BaseHTTPServer weirdness

2006-09-11 Thread Damjan
viron and then provide that (either in os.environ or in a custom environ dictionary). BUT why don't you use WSGI? -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a way to find IP address?

2006-09-17 Thread Damjan
"] > > (but that can easily be spoofed, and is mostly meaningless if the user > uses local IP addresses at the other side of the proxy, so you should > use it with care) Yep, you should only use "HTTP_X_FORWARDED_FOR" if you trust the proxy and you check that the request

Re: Is there a way to find IP address?

2006-09-17 Thread Damjan
; address is not possible change. I can setup my browser to always send you a fake HTTP_X_FORWARDED_FOR header. -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: CONSTRUCT - Adding Functionality to the Overall System

2006-09-17 Thread Damjan
ich you don't control or create in your code. I remeber I've seen an implementation of import_with_metaclass somewhere on IBM's developerworks. I didn't quite undersntad it though. -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: CONSTRUCT - Adding Functionality to the Overall System

2006-09-19 Thread Damjan
ss B(UserDict): ... pass >>> type(B) It seems that NOT every class in my module will be a new style class, especially those that inherit from other old-style classes in other modules. -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: naming objects from string

2006-09-20 Thread Damjan
manstey wrote: > Hi, > > But this doesn't work if I do: > > a=object() > x='bob' > locals()[x] = a > > How can I do this? try sys.modules[__name__].__dict__[x] = a But what's the point? -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: Don't use regular expressions to "validate" email addresses (was: Ineed some help with a regexp please)

2006-09-22 Thread Damjan
mplement some limiting features. Try two times from the same IP address in less than 10 minutes and you are banned for the day. Or some such. -- damjan -- http://mail.python.org/mailman/listinfo/python-list

RE: CGI -> mod_python

2006-10-03 Thread Damjan
t of WSGI servers (server gateways) http://wsgi.org/wsgi/Servers Start from here to learn more: http://wsgi.org/wsgi/Learn_WSGI Then come back, we'll discuss -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: lxml/ElementTree and .tail

2006-11-19 Thread Damjan
ave been sold all the expensive proprietary tools > so it's simply not fair when others are cheating. -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: Mod_python vs. application server like CherryPy?

2006-12-08 Thread Damjan
's already WSGI middleware that's more flexible than the Apache modules for most of the features you mention. It's not that I think mod_python doesn't have uses.. I just think it's not practical to make python web applications targeted solely to mod_python. -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there any python-twisted tutorial or texts?

2006-12-21 Thread Damjan
Then I got back to the Twisted book. I think it needs more work. -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with curses and UTF-8

2006-02-08 Thread Damjan
I just recompiled my python to link to ncursesw, and tried your example with a little modification: import curses, locale locale.setlocale(locale.LC_ALL, '') s = curses.initscr() s.addstr(u'\u00c5 U+00C5 LATIN CAPITAL LETTER A WITH RING ABOVE\n'.encode('utf-8') ) s.addstr(u'\u00f5 U+00F5 LATIN SMA

Python 2.4.2 and Berkeley DB 4.4.20 ?

2006-02-13 Thread Damjan
This is from the Slackware-current changelog: d/python-2.4.2-i486-1.tgz: Upgraded to python-2.4.2. The bsddb module didn't build against the new 4.4.x version of Berkeley DB. Does anyone care? Or perhaps have a patch? :-) Does anyone have a suggestion? -- http://mail.python.org/ma

Re: ANNOUNCE: Mod_python 3.2.7

2006-02-13 Thread Damjan
Just upgraded from 3.1.4 / Apache-2.0.55, and I can confirm that both moin-1.5 and trac-0.9.3 continued to work without problems. -- http://mail.python.org/mailman/listinfo/python-list

Is there a WSGI sollutions repository somewhere

2006-03-04 Thread Damjan
It seems that WSGI support starts to flourish is there some document or a web site that tracks what's out there, some place to pick and choose WSGI components? -- http://mail.python.org/mailman/listinfo/python-list

Re: PyQt issue

2006-03-04 Thread Damjan
> Because you wrote curentText - note the missing t. :) You mean the missing 'r' :) -- http://mail.python.org/mailman/listinfo/python-list

a cx_Oracle ORA-01036 problem

2005-05-05 Thread Damjan
c = db.cursor() c.execute(SQL, **args) Same thing. Everything works If I use python string substituion, like this sql: SQL = """insert into D.D_NOTIFY values (%s,'%s','%s','%s','%s','%s', \ to_date('%s&#

Re: a cx_Oracle ORA-01036 problem

2005-05-05 Thread Damjan
vincent wehren wrote: > |c = db.cursor() > |c.execute(SQL, **args) > > > Shouldn't that be c.execute(SQL, args) (no **-unpacking of the > dictionary)? Actually I tried that too, I still get the same error. -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: a cx_Oracle ORA-01036 problem

2005-05-12 Thread Damjan
ng a variable name other than "id" for the CARDREF variable... say > "card_id". id is a built in function name; I suspect your problem may be > that you are assiging that function to the variable rather than your > intended value... I changed it to 'cardref' but I'm still getting the same error. -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: Building a Python app with Mozilla

2007-07-10 Thread Damjan
> Last I looked (3.1-ish), Qt didn't use the Aqua widgets Qt is now up to 4.3 and they use native Aqua -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Python IMAP web-access

2007-08-01 Thread Damjan
Is there some project that implements web access to an IMAP store? Maybe something AJAXy like http://roundcube.net/?? -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: encoding problems

2007-08-29 Thread Damjan
> > is there a way to sort this string properly (sorted()?) > I mean first 'a' then 'à' then 'e' etc. (sorted puts accented letters at > the end). Or should I have to provide a comparison function to sorted? After setting the locale... locale.strcoll

  1   2   >