Tim Chase wrote:
> On 08/31/12 22:41, contro opinion wrote:
>>> u"english".encode("utf-8")
'english'
>>> u"english".encode("ascii")
'english'
how can i get 656e676c697368 in encode method?
>>>
>>> At least in 2.x, you can do:
>>>
>>> >>> u"english".encode("hex")
>>> '
contro opinion wrote:
locale.setlocale(locale.LC_ALL, 'gbk')
> Traceback (most recent call last):
> File "", line 1, in
> File "/usr/lib/python2.6/locale.py", line 513, in setlocale
> return _setlocale(category, locale)
> locale.Error: unsupported locale setting
Try picking one of t
On 09/01/2012 12:59 AM, contro opinion wrote:
1) you top-posted
2) you replied privately, excluding the list from your query
> the file is utf-8 format,
str='/0x31/0x32/0x33/0x34'
3) No idea what that value is supposed to mean. Perhaps you intended to
use backslashes here? And perhaps you
Is there any extension for Python that can do async I/O for PostgreSQL
with tornadoweb's ioloop?
Something like:
class MainHandler(tornado.web.RequestHandler):
@tornado.web.asynchronous
def get(self):
pg_connection.(long_taking_query_sql,params,callback=self.on_query_opened)
On Saturday, September 1, 2012 12:19:10 AM UTC+8, Chris Withers wrote:
> On 23/08/2012 12:25, Tigerstyle wrote:
>
> > class FileTest(unittest.TestCase):
>
> >
>
> > def setUp(self):
>
> > self.origdir = os.getcwd()
>
> > self.dirname = tempfile.mkdtemp("testdir")
>
> >
On 09/01/2012 12:15 AM, contro opinion wrote:
> there is a only line in the file nanmed test:
> 1234
> when i open it whit xxd
> xxd test
> what i get is :
> 000: 3132 3334 0a 1234.
> can you explain it ?
>
>
>
Explain what, exactly? Explain why you were able to
On Sat, Sep 1, 2012 at 2:15 PM, contro opinion wrote:
> there is a only line in the file nanmed test:
> 1234
> when i open it whit xxd
> xxd test
> what i get is :
> 000: 3132 3334 0a 1234.
> can you explain it ?
I would explain it as a file with one line named
there is a only line in the file nanmed test:
1234
when i open it whit xxd
xxd test
what i get is :
000: 3132 3334 0a 1234.
can you explain it ?
--
http://mail.python.org/mailman/listinfo/python-list
On 08/31/12 22:41, contro opinion wrote:
>> u"english".encode("utf-8")
>>> 'english'
>> u"english".encode("ascii")
>>> 'english'
>>>
>>> how can i get 656e676c697368 in encode method?
>>
>> At least in 2.x, you can do:
>>
>> >>> u"english".encode("hex")
>> '656e676c697368'
>
> how about i
On 08/31/12 21:21, contro opinion wrote:
for i in "english" :
> ... print(hex((ord(i
> ...
> 0x65
> 0x6e
> 0x67
> 0x6c
> 0x69
> 0x73
> 0x68
u"english".encode("utf-8")
> 'english'
u"english".encode("ascii")
> 'english'
>
> how can i get 656e676c697368 in encode method?
At leas
On Fri, Aug 31, 2012 at 8:21 PM, contro opinion wrote:
for i in "english" :
> ... print(hex((ord(i
> ...
> 0x65
> 0x6e
> 0x67
> 0x6c
> 0x69
> 0x73
> 0x68
u"english".encode("utf-8")
> 'english'
u"english".encode("ascii")
> 'english'
>
> how can i get 656e676c697368 in encode me
>>> for i in "english" :
... print(hex((ord(i
...
0x65
0x6e
0x67
0x6c
0x69
0x73
0x68
>>> u"english".encode("utf-8")
'english'
>>> u"english".encode("ascii")
'english'
how can i get 656e676c697368 in encode method?
--
http://mail.python.org/mailman/listinfo/python-list
>>> locale.setlocale(locale.LC_ALL, 'gbk')
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python2.6/locale.py", line 513, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting
--
http://mail.python.org/mailman/listinfo/python-list
Tim Chase writes:
> Or we can take the opportunity to thank you for all your work on
> making this a relatively spam-free mailing list. So thanks!
Indeed. This forum has a very high signal-to-noise ratio, largely due to
efforts that are often invisible to the participants.
Thank you!
--
\
Zeromq (suggested by someone) is an option since it's pretty fast for
most purposes, but I don't think it uses shared memory.
Interesting question. The documentation says:
http://api.zeromq.org/2-1:zmq-ipc
The inter-process transport is currently only implemented on operating
systems that prov
Laszlo Nagy shopzeus.com> writes:
>
> There are just so many IPC modules out there. I'm looking for a solution
> for developing a new a multi-tier application. The core application will
> be running on a single computer, so the IPC should be using shared
> memory (or mmap) and have very short
Laszlo Nagy writes:
> application will be running on a single computer, so the IPC should be
> using shared memory (or mmap) and have very short response times.
Zeromq (suggested by someone) is an option since it's pretty fast for
most purposes, but I don't think it uses shared memory. The close
On Friday, August 31, 2012 9:22:00 PM UTC+2, Laszlo Nagy wrote:
> There are just so many IPC modules out there. I'm looking for a solution
>
> for developing a new a multi-tier application. The core application will
>
> be running on a single computer, so the IPC should be using shared
>
> me
Hi,
As a work-around, you could use the CRAN R package XLConnect, using RPy or
RPy2, to do what you want. IIRC it's based on Java, so it's not extremely fast.
http://cran.r-project.org/web/packages/XLConnect/vignettes/XLConnect.pdf
This is another package I just saw for the first time
http://cra
There are just so many IPC modules out there. I'm looking for a solution
for developing a new a multi-tier application. The core application will
be running on a single computer, so the IPC should be using shared
memory (or mmap) and have very short response times. But there will be a
tier that
On 31 August 2012 16:41, Alister wrote:
> On Fri, 31 Aug 2012 11:21:14 -0400, Kevin Walzer wrote:
>
>> On 8/31/12 11:18 AM, Arnaud Delobelle wrote:
>>
>>
>>> I'm not trying to do anything. When a user presses the UP or DOWN
>>> arrow, then a strange character is inserted in the Entry box. I'd
>>
Tim Chase wrote:
On 08/31/12 09:15, Skip Montanaro wrote:
We just upgraded the Mailman installation on mail.python.org. Part of that
installation includes spam filtering on messages gated from Usenet to the python-
l...@python.org mailing list. This message is a quick test of that function.
On 23/08/2012 12:25, Tigerstyle wrote:
class FileTest(unittest.TestCase):
def setUp(self):
self.origdir = os.getcwd()
self.dirname = tempfile.mkdtemp("testdir")
os.chdir(self.dirname)
I wouldn't change directories like this, it's pretty fragile, just use
absolu
Hi,
I am trying to create an extension to call into a c++ library, a library
which simply returns a string, given a string. At first, a quick and
simple approach was tried (based on post
http://stackoverflow.com/questions/1615813/how-to-use-c-classes-with-ctypes)
in which the usual infrastructure
On Fri, 31 Aug 2012 11:21:14 -0400, Kevin Walzer wrote:
> On 8/31/12 11:18 AM, Arnaud Delobelle wrote:
>
>
>> I'm not trying to do anything. When a user presses the UP or DOWN
>> arrow, then a strange character is inserted in the Entry box. I'd
>> rather nothing happened.
>>
> Why is the user
On 8/31/12 11:18 AM, Arnaud Delobelle wrote:
I'm not trying to do anything. When a user presses the UP or DOWN
arrow, then a strange character is inserted in the Entry box. I'd
rather nothing happened.
Why is the user doing that? If they are trying to navigate to a
different part of the int
On 31 August 2012 15:25, Kevin Walzer wrote:
> On 8/31/12 6:18 AM, Arnaud Delobelle wrote:
>>
>> I'm very inexperienced with Tkinter (I've never used it before). All
>> I'm looking for is a workaround, i.e. a way to somehow suppress that
>> output.
>
>
> What are you trying to do? Navigate the fo
On Fri, Aug 31, 2012 at 6:32 AM, Steven D'Aprano
wrote:
> That's one thing that I'm unclear about -- under what circumstances will
> a string be in compact versus non-compact form?
I understand it to be entirely dependent on which API is used to
construct. The legacy API generates legacy strings
On Fri, 31 Aug 2012 08:43:55 -0400, Roy Smith wrote:
> In article <503f8e33$0$30001$c3e8da3$54964...@news.astraweb.com>,
> Steven D'Aprano wrote:
>
>> On Thu, 30 Aug 2012 07:02:24 -0400, Roy Smith wrote:
>> > Is the implementation smart enough to know that x == y is always
>> > False if x and y
On 8/31/12 6:18 AM, Arnaud Delobelle wrote:
I'm very inexperienced with Tkinter (I've never used it before). All
I'm looking for is a workaround, i.e. a way to somehow suppress that
output.
What are you trying to do? Navigate the focus to another widget? You
should use the tab bar for that, n
On 08/31/12 09:15, Skip Montanaro wrote:
> We just upgraded the Mailman installation on mail.python.org. Part of that
> installation includes spam filtering on messages gated from Usenet to the
> python-
> l...@python.org mailing list. This message is a quick test of that function.
>
> You c
On 31/08/2012 14:58, Grant Edwards wrote:
On 2012-08-31, Mark Lawrence wrote:
On 31/08/2012 14:40, lipska the kat wrote:
I was hacking away at some x86_64 assembler today
when I found myself obsessively indenting my code
by EXACTLY 4 spaces or (multiples thereof)
What's wrong with structu
We just upgraded the Mailman installation on mail.python.org. Part of that
installation includes spam filtering on messages gated from Usenet to the
python-
l...@python.org mailing list. This message is a quick test of that function.
You can ignore it.
Skip Montanaro
--
http://mail.python
On 2012-08-31, Mark Lawrence wrote:
> On 31/08/2012 14:40, lipska the kat wrote:
>> I was hacking away at some x86_64 assembler today
>> when I found myself obsessively indenting my code
>> by EXACTLY 4 spaces or (multiples thereof)
> What's wrong with structured assembler? :)
Nothing -- it's c
On 31/08/2012 14:40, lipska the kat wrote:
Worryingly
I was hacking away at some x86_64 assembler today
when I found myself obsessively indenting my code
by EXACTLY 4 spaces or (multiples thereof)
Who'd have thought it.
lipska
What's wrong with structured assembler? :)
--
Cheers.
Mark Law
Worryingly
I was hacking away at some x86_64 assembler today
when I found myself obsessively indenting my code
by EXACTLY 4 spaces or (multiples thereof)
Who'd have thought it.
lipska
--
Lipska the Kat©: Troll hunter, sandbox destroyer
and farscape dreamer of Aeryn Sun
--
http://mail.python.or
In article <503f8e33$0$30001$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
> On Thu, 30 Aug 2012 07:02:24 -0400, Roy Smith wrote:
> > Is the implementation smart enough to know that x == y is always False
> > if x and y are using different internal representations?
>
> [...] There
On Thu, 30 Aug 2012 16:44:32 -0400, Terry Reedy wrote:
> On 8/30/2012 12:00 PM, Steven D'Aprano wrote:
>> On Thu, 30 Aug 2012 07:02:24 -0400, Roy Smith wrote:
[...]
>>> Is the implementation smart enough to know that x == y is always False
>>> if x and y are using different internal representation
On 08/31/2012 08:21 AM, Stefan Behnel wrote:
> Florian Lindner, 31.08.2012 14:03:
>> I plan to use the etree.ElementTree XML parser to parse a config file
>> in which the order of the elements matter, e.g.:
>>
>>
>>
>>
>>
>> is not equal to:
>>
>>
>>
>>
>>
>> I have found different answers to
Florian Lindner, 31.08.2012 14:03:
> I plan to use the etree.ElementTree XML parser to parse a config file
> in which the order of the elements matter, e.g.:
>
>
>
>
>
> is not equal to:
>
>
>
>
>
> I have found different answers to the question if order matters in XML
> documents. So my
Hello,
I plan to use the etree.ElementTree XML parser to parse a config file
in which the order of the elements matter, e.g.:
is not equal to:
I have found different answers to the question if order matters in XML
documents. So my question here: Does it matters (and is more or less
guare
Hi Ben,
On 31/08/2012 03:36, Ben Finney wrote:
That way, I can set ‘sys.dont_write_bytecode’ to the value I need in
this part of the code, knowing that however the code continues the
previous value of that setting will be restored to whatever it was
before I touched it.
Have I re-invented a con
Hi all,
I'm writing a small GUI on OS X (v. 10.7.4) using Tkinter. I'm using
stock Python. It mostly works fine but there is a bug in Entry
widgets: if and Entry widget has focus and I press the UP arrow, a
"\uf700" gets inserted in the widget. If I press the DOWN arrow, a
"\uf701" gets inserte
Peter Otten <__pete...@web.de> writes:
> You should wrap yield in a try ... finally. You might allow setting
> the new value in the manager (untested):
Thank you, both good advice.
I would still like to know if Python already has something to make this
unnecessary.
--
\ “Compulsory unifi
On Friday, August 31, 2012 2:49:32 PM UTC+5:30, Octavian Rasnita wrote:
> Maybe I didn't understand well, but if you want your Perl program to get and
> store the data submitted by the form, then the action of the form should
> point to the Perl script something like:
>
>
>
>
>
>
>
> So yo
Maybe I didn't understand well, but if you want your Perl program to get and
store the data submitted by the form, then the action of the form should point
to the Perl script something like:
So your "form" object in Python should set the action as the path to the Perl
program.
--Octavian
--
On 31/08/2012 09:40, Mulla wrote:
[snip]
how can I do this ...>>?
Look forward for hear from you soon
Thank You
Search the archives as it's the fourth time the question has been asked
within a few weeks.
--
Cheers.
Mark Lawrence.
--
http://mail.python.org/mailman/listinfo/python-list
hey,
when i submit the form in html , the entered data (fname,lanme,uname.)all
have to come in perl script to store that data in DB.
Python View.py
def ProfileRegistration(request):
if request.user.is_authenticated():
return HttpResponseRedirect('/profile/')
if request.met
48 matches
Mail list logo