Zhang JiaQiang writes:
> I try to use simpleXMLRPC and support request multithreads ,used
> ThreadingMixIn.
>
> Why what I get from the console still blocking ?
I am not sure - but, you fail to call the inherited "__init__" method
in your deriving class. This might things mess up.
> ...
> clas
adam.pre...@gmail.com wrote:
> On Thursday, August 8, 2013 3:50:47 AM UTC-5, Peter Otten wrote:
>> Peter Otten wrote:
>> Oops, that's an odd class name. Fixing the name clash in Types.__new__()
>> is
>>
>> left as an exercise...
>
> Interesting, I got __main__.T, even though I pretty much just t
On Thu, Aug 8, 2013 at 10:17 PM, wrote:
> PyLint can't figure out imports of .NET code being referenced in my Python
> scripts that use Python.NET. I can kind of see why; you have to evaluate
> some clr.AddReference calls for the imports to even succeed. I wonder if I
> have any recourse. G
PyLint can't figure out imports of .NET code being referenced in my Python
scripts that use Python.NET. I can kind of see why; you have to evaluate some
clr.AddReference calls for the imports to even succeed. I wonder if I have any
recourse. Generally, to import a DLL you have to do a few thi
On Thursday, August 8, 2013 3:50:47 AM UTC-5, Peter Otten wrote:
> Peter Otten wrote:
> Oops, that's an odd class name. Fixing the name clash in Types.__new__() is
>
> left as an exercise...
Interesting, I got __main__.T, even though I pretty much just tried your code
wholesale. For what it's
On 9 August 2013 14:28, snakeinmyboot wrote:
> On Thursday, August 8, 2013 1:13:48 AM UTC-4, David wrote:
>> On 8 August 2013 14:06, snakeinmyboot wrote:
>>
>> Did you try at all to find the answer to this yourself?
>>
>> I ask because it took me only a few seconds to go to wikipedia and
>> searc
On 9 August 2013 14:11, Adam Mercer wrote:
>
> I'm trying to write a script that writes some content to a file root
> through sudo, but it's not working at all. I am using:
[...]
At a quick glance, I have a couple of suggestions.
> command = ['echo', '-n', channel, '|', 'sudo', 'tee', config_
On Thu, 08 Aug 2013 23:11:09 -0500, Adam Mercer wrote:
> Hi
>
> I'm trying to write a script that writes some content to a file root
> through sudo, but it's not working at all. I am using:
>
> channel = 'stable'
> config_file = '/opt/ldg/etc/channel.conf'
> command = ['echo', '-n', channe
On Thursday, August 8, 2013 1:13:48 AM UTC-4, David wrote:
> On 8 August 2013 14:06, snakeinmyboot wrote:
>
> >
>
> > for REAL you guys...wtf does this even mean lol. what is a boilerplate test
> > code?
>
>
>
> Did you try at all to find the answer to this yourself?
>
>
>
> I ask because
Hi
I'm trying to write a script that writes some content to a file root
through sudo, but it's not working at all. I am using:
channel = 'stable'
config_file = '/opt/ldg/etc/channel.conf'
command = ['echo', '-n', channel, '|', 'sudo', 'tee', config_file]
p = subprocess.Popen(command, stdo
On Fri, Aug 9, 2013 at 1:50 AM, D. Xenakis wrote:
>> Alternatively, can you use PostgreSQL instead? :)
>
> Yes there is such an option to be honest.
> Would that be helpfull instead of MySQL?
It would, mainly because it's simply a better database engine.
Everything to do with tunneling is going t
On Fri, Aug 9, 2013 at 1:46 AM, D. Xenakis wrote:
> I've played with putty to achieve this but to be honest i'd like something
> more efficient. Opening putty everytime and making all the connection
> settings etc, and then running the programm, is kinda messy. Id like this to
> be done in an a
> Alternatively, can you use PostgreSQL instead? :)
Yes there is such an option to be honest.
Would that be helpfull instead of MySQL?
--
http://mail.python.org/mailman/listinfo/python-list
> > HOWTO anyone?
>
> >
>
> > What im trying to succeed here is create one SSH tunnel, so that i can
> > connect from a python script running on my pc, to a remote MySQL database
> > running on my Host and id like to stick with Python 3.3 .
>
> >
>
> > I contacted my host and he informed me
On Thu, Aug 8, 2013 at 8:30 PM, D. Xenakis wrote:
> HOWTO anyone?
>
> What im trying to succeed here is create one SSH tunnel, so that i can
> connect from a python script running on my pc, to a remote MySQL database
> running on my Host and id like to stick with Python 3.3 .
>
> I contacted my
WOW as if it was something as easy as that,i had been looking for awhile on
what i was doing wrong. as it seems i just don't know my way around if
statements at all, thank a bunch for this. makes everything else i have been
code work
thanks again
--
http://mail.python.org/mailman/listinfo/pyt
On 8/8/2013 5:32 PM, Joshua Landau wrote:
On 8 August 2013 21:03, Terry Reedy wrote:
If .pop were being added today, I would argue against including the index
parameter.
GASP! That's no fair!
1) When using pop you normally want to keep the mutability available,
so iter(mylist) is a no-go.
2)
On 2013-08-08 22:32, Joshua Landau wrote:
> On 8 August 2013 21:03, Terry Reedy wrote:
> > If .pop were being added today, I would argue against including
> > the index parameter.
>
> 3) There's always deque for deques
Unless you have pre-2.4 code, in which case I'm glad .pop() was
included (but
On 8 August 2013 21:03, Terry Reedy wrote:
> If .pop were being added today, I would argue against including the index
> parameter.
GASP! That's no fair!
1) When using pop you normally want to keep the mutability available,
so iter(mylist) is a no-go.
2) When using the index, it's often somewher
On 8/8/2013 11:24 AM, Kurt Mueller wrote:
print( u'{0:>3} {1:>3} {2:>3} {3:>3} {4:>3}'.format( *output_list ) )
Using autonumbering feature, same as
print( u'{:>3} {:>3} {:>3} {:>3} {:>3}'.format( *output_list ) )
print( (u' '.join([u'{:>3}']*5)).format(*output_list) )
print( (u' '.join([u'{:
On 8/8/2013 7:41 AM, Chris Angelico wrote:
On Thu, Aug 8, 2013 at 7:20 AM, wrote:
def z2():
... letters = 'abc'
... while True:
... c = input('letter: ')
... if c not in letters:
... print('end, fin, Schluss')
... break
... else:
...
On Thu, Aug 8, 2013 at 2:30 PM, D. Xenakis wrote:
> HOWTO anyone?
>
> What im trying to succeed here is create one SSH tunnel, so that i can
> connect from a python script running on my pc, to a remote MySQL database
> running on my Host and id like to stick with Python 3.3 .
http://lmgtfy.com/
On 8/8/2013 7:44 AM, Neatu Ovidiu wrote:
Objection 1. People usually want to chunk sequences, not lists
specifically. We now try to add new features that work with iterators
and iterables generally, not just lists.
This can be useful for doing all kinds of basic stuff. For example if you
wa
HOWTO anyone?
What im trying to succeed here is create one SSH tunnel, so that i can connect
from a python script running on my pc, to a remote MySQL database running on my
Host and id like to stick with Python 3.3 .
I contacted my host and he informed me that this is the only way.
I tried pyc
On Thu, Aug 8, 2013 at 3:19 PM, Gary Herron
wrote:
> On 08/08/2013 12:05 PM, wachk...@gmail.com wrote:
>>
>> I have a dilemma I cant figure out how to send multiple files as an
>> attachment to my email using this script. I can only send a single file
>> attachment . Help!!! Here is my script.
>>
On Thu, Aug 8, 2013 at 1:05 PM, wrote:
> I have a dilemma I cant figure out how to send multiple files as an
> attachment to my email using this script. I can only send a single file
> attachment . Help!!! Here is my script.
You just need to repeat part3 for each attachment. Also the content
Wow thats bad news. Any workaround?
What im trying to succeed here is create one SSH tunnel, so that i can connect
from a python script running on my pc, to a remote MySQL database running on my
Host and id like to stick with Python 3.3 .
Any thoughts?
--
http://mail.python.org/mailman/listinfo
On 08/08/2013 12:05 PM, wachk...@gmail.com wrote:
I have a dilemma I cant figure out how to send multiple files as an attachment
to my email using this script. I can only send a single file attachment .
Help!!! Here is my script.
All filename's are txt files.
There is a standard Python mo
On 8/8/2013 12:20 PM, adam.pre...@gmail.com wrote:
On Thursday, August 8, 2013 3:04:30 AM UTC-5, Terry Reedy wrote:
def test(f):
f.__class__.__dict__['test_'+f.__name__]
Sorry, f.__class__ is 'function', not the enclosing class. A decorator
for a method could not get the enclosing cl
I have a dilemma I cant figure out how to send multiple files as an attachment
to my email using this script. I can only send a single file attachment .
Help!!! Here is my script.
All filename's are txt files.
fo = with open(filename,'rb')
fo1 = open(filename2,'rb')
fo2= open(filename3, 'rb')
On 08/08/2013 19:04, D. Xenakis wrote:
import sys
print (sys.path)
returns:
['C:\\Python33\\Lib\\idlelib',
'C:\\Python33\\lib\\site-packages\\pip-1.4-py3.3.egg',
'C:\\Windows\\system32\\python33.zip', 'C:\\Python33\\DLLs',
'C:\\Python33\\lib', 'C:\\Python33', 'C:\\Python33\\lib\\site-packag
>>> import sys
>>> print (sys.path)
returns:
['C:\\Python33\\Lib\\idlelib',
'C:\\Python33\\lib\\site-packages\\pip-1.4-py3.3.egg',
'C:\\Windows\\system32\\python33.zip', 'C:\\Python33\\DLLs',
'C:\\Python33\\lib', 'C:\\Python33', 'C:\\Python33\\lib\\site-packages']
then if i type:
>>> sys.path
Kurt Mueller wrote:
> Now I have this small example:
> --
> #!/usr/bin/env python
> # vim: set fileencoding=utf-8 :
>
> from __future__ import print_function
> import sys, shlex
>
> print( repr( sys.stdin.encoding ) )
>
> strg_form = u'{0:>3}
On 8/8/13 12:17 PM, adam.pre...@gmail.com wrote:
On Thursday, August 8, 2013 3:50:47 AM UTC-5, Peter Otten wrote:
Peter Otten wrote:
Oops, that's an odd class name. Fixing the name clash in Types.__new__() is
left as an exercise...
I will do some experiments with a custom test loader since I w
Rui Maciel wrote:
> Chris Angelico wrote:
>
> > On Tue, Aug 6, 2013 at 10:01 AM, Rui Maciel wrote:
> >> It would be nice if some functions threw an error if they were passed a
> >> type
> >> they don't support or weren't designed to handle. That would avoid
> >> having to deal with some bugs whi
On Thu, Aug 8, 2013 at 5:16 PM, Kurt Mueller
wrote:
> Am 08.08.2013 17:44, schrieb Peter Otten:
>> Kurt Mueller wrote:
>>> What do I do, when input_strings/output_list has other codings like
>>> iso-8859-1?
>>
>> You have to know the actual encoding. With that information it's easy:
> output_l
Kurt Mueller wrote:
> Am 08.08.2013 17:44, schrieb Peter Otten:
>> Kurt Mueller wrote:
>>> What do I do, when input_strings/output_list has other codings like
>>> iso-8859-1?
>>
>> You have to know the actual encoding. With that information it's easy:
> output_list
>> ['\xc3\xb6', '\xc3\xbc',
On Thursday, August 8, 2013 3:04:30 AM UTC-5, Terry Reedy wrote:
> I cannot help but note that this is *more* typing. But anyhow, something
It wasn't so much about the typing so much as having "test" in front of
everything. It's a problem particular to me since I'm writing code that, well,
run
Now I have this small example:
--
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
from __future__ import print_function
import sys, shlex
print( repr( sys.stdin.encoding ) )
strg_form = u'{0:>3} {1:>3} {2:>3} {3:>3} {4:>3}'
for inpt_l
On Thursday, August 8, 2013 3:50:47 AM UTC-5, Peter Otten wrote:
> Peter Otten wrote:
> Oops, that's an odd class name. Fixing the name clash in Types.__new__() is
>
> left as an exercise...
I will do some experiments with a custom test loader since I wasn't aware of
that as a viable alternativ
On Thursday, August 8, 2013 12:04:38 PM UTC+2, Jean-Michel Pichavant wrote:
> - Mail original -
>
> > Hi
> > 1) I prefer to use start/stop and not the decorator .
> > 2) mock_play is the name of the module where the code belongs
>
> > Thanks
>
> > Avishay
> > Sent from my iPhone
>
>
>
Am 08.08.2013 17:44, schrieb Peter Otten:
> Kurt Mueller wrote:
>> What do I do, when input_strings/output_list has other codings like
>> iso-8859-1?
>
> You have to know the actual encoding. With that information it's easy:
output_list
> ['\xc3\xb6', '\xc3\xbc', 'i', 's', 'f']
encoding
Kurt Mueller wrote:
> Am 08.08.2013 16:43, schrieb jfhar...@gmail.com:
>> On Thursday, 8 August 2013 15:23:46 UTC+1, Kurt Mueller wrote:
>>> I'd like to print strings right adjusted.
>>> print( '>{0:>3}<'.format( 'ä' ) )
>>
>> Make both strings unicode
>> print( u'>{0:>3}<'.format( u'ä' ) )
>> W
Kurt Mueller wrote:
> Am 08.08.2013 16:43, schrieb jfhar...@gmail.com:
>> On Thursday, 8 August 2013 15:23:46 UTC+1, Kurt Mueller wrote:
>>> I'd like to print strings right adjusted.
>>> print( '>{0:>3}<'.format( 'ä' ) )
>>
>> Make both strings unicode
>> print( u'>{0:>3}<'.format( u'ä' ) )
>> W
Am 08.08.2013 16:43, schrieb jfhar...@gmail.com:
> On Thursday, 8 August 2013 15:23:46 UTC+1, Kurt Mueller wrote:
>> I'd like to print strings right adjusted.
>> print( '>{0:>3}<'.format( 'ä' ) )
>
> Make both strings unicode
> print( u'>{0:>3}<'.format( u'ä' ) )
> Why not use rjust for it though
On 08/08/2013 15:40, Neil Cerutti wrote:
On 2013-08-08, Kurt Mueller wrote:
I'd like to print strings right adjusted.
( Python 2.7.3, Linux 3.4.47-2.38-desktop )
from __future__ import print_function
print( '>{0:>3}<'.format( 'a' ) )
a<
But if the string contains an Umlaut:
print( '>{0:>3}
On Thu, Aug 8, 2013 at 6:40 AM, Neatu Ovidiu wrote:
> This can be useful for doing all kinds of basic stuff. For example if you
> wanted to take 4 items of a list at at a time, do something with them and
> then update the list.
>
> jobs = ['job1', 'job2', 'job3', 'job5', 'job6', 'job7', 'job8',
On Thursday, 8 August 2013 15:23:46 UTC+1, Kurt Mueller wrote:
> I'd like to print strings right adjusted.
>
> print( '>{0:>3}<'.format( 'ä' ) )
>
Make both strings unicode
print( u'>{0:>3}<'.format( u'ä' ) )
Why not use rjust for it though?
u'ä'.rjust(3)
--
Jonathan
--
http://mail.python
On 2013-08-08, Kurt Mueller wrote:
> I'd like to print strings right adjusted.
> ( Python 2.7.3, Linux 3.4.47-2.38-desktop )
>
> from __future__ import print_function
> print( '>{0:>3}<'.format( 'a' ) )
>> a<
>
> But if the string contains an Umlaut:
> print( '>{0:>3}<'.format( '??' ) )
>> ??<
>
I'd like to print strings right adjusted.
( Python 2.7.3, Linux 3.4.47-2.38-desktop )
from __future__ import print_function
print( '>{0:>3}<'.format( 'a' ) )
> a<
But if the string contains an Umlaut:
print( '>{0:>3}<'.format( 'ä' ) )
> ä<
Same with % notation:
print( '>%3s<' % ( 'a' ) )
> a<
On Thu, Aug 8, 2013 at 2:32 PM, Neatu Ovidiu wrote:
> On Thursday, August 8, 2013 4:08:13 PM UTC+3, Nicholas wrote:
> > On Thu, Aug 8, 2013 at 12:50 PM, Neatu Ovidiu wrote:
> >
> >
> >
> >
> > On Thursday, August 8, 2013 2:44:05 PM UTC+3, Neatu Ovidiu wrote:
> >
> > > On Thursday, August 8, 2013
On Thursday, August 8, 2013 4:08:13 PM UTC+3, Nicholas wrote:
> On Thu, Aug 8, 2013 at 12:50 PM, Neatu Ovidiu wrote:
>
>
>
>
> On Thursday, August 8, 2013 2:44:05 PM UTC+3, Neatu Ovidiu wrote:
>
> > On Thursday, August 8, 2013 2:12:53 PM UTC+3, Nicholas wrote:
>
> >
>
> > > On Thu, Aug 8, 2
In article ,
Skip Montanaro wrote:
> When Tim Peters wrote datetime, the world became a better
> place.
Lots of languages and databases have things called datetimes. It's easy
to be lulled into thinking that they're all the same, but they're not.
They all have slightly different ranges an
On Thu, Aug 8, 2013 at 12:50 PM, Neatu Ovidiu wrote:
> On Thursday, August 8, 2013 2:44:05 PM UTC+3, Neatu Ovidiu wrote:
> > On Thursday, August 8, 2013 2:12:53 PM UTC+3, Nicholas wrote:
> >
> > > On Thu, Aug 8, 2013 at 11:38 AM, Neatu Ovidiu
> wrote:
> >
> > >
> >
> > >
> >
> > >
> >
> > >
> >
> i did:
>
>from time import strftime, time
>from datetime import datetime
>
>now = datetime.now()
>
>self.logfile.write('%s\t'%(strftime("%Y-%m-%d",)))
>self.logfile.write('%s\t'%(now.strftime("%H:%M:%S.%f",)))
Note that you don't need the time module here. Datetime objects h
On Thursday, August 8, 2013 2:44:05 PM UTC+3, Neatu Ovidiu wrote:
> On Thursday, August 8, 2013 2:12:53 PM UTC+3, Nicholas wrote:
>
> > On Thu, Aug 8, 2013 at 11:38 AM, Neatu Ovidiu wrote:
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
> > > But what's your use case?
>
> >
>
> > >
On Thursday, August 8, 2013 2:12:53 PM UTC+3, Nicholas wrote:
> On Thu, Aug 8, 2013 at 11:38 AM, Neatu Ovidiu wrote:
>
>
>
>
>
>
>
> > But what's your use case?
>
> >
>
> > Does it occur often enough that you cannot afford a two-liner like
>
> I think uses cases are plenty.
>
>
>
>
>
On Thursday, August 8, 2013 2:12:53 PM UTC+3, Nicholas wrote:
> On Thu, Aug 8, 2013 at 11:38 AM, Neatu Ovidiu wrote:
>
>
>
>
>
>
>
> > But what's your use case?
>
> >
>
> > Does it occur often enough that you cannot afford a two-liner like
>
> I think uses cases are plenty.
>
>
>
>
>
On Thu, Aug 8, 2013 at 7:20 AM, wrote:
def z2():
> ... letters = 'abc'
> ... while True:
> ... c = input('letter: ')
> ... if c not in letters:
> ... print('end, fin, Schluss')
> ... break
> ... else:
> ... print('do stuff')
On Thu, Aug 8, 2013 at 11:38 AM, Neatu Ovidiu wrote:
>
>
> > But what's your use case?
> >
> > Does it occur often enough that you cannot afford a two-liner like
> I think uses cases are plenty.
>
>
The possible cases I can think of would be better served with list
comprehensions (what you seem t
Im having problems using paramiko after installation on my Win7 64bit system.
I can see both paramiko and pycrypto being "there" installed via pip list:
I have tried so many different ways but in the end im always getting the same
error when trying to import paramiko:
(i can import Crypto with no
On Thursday, August 8, 2013 1:07:16 PM UTC+3, Peter Otten wrote:
> Neatu Ovidiu Gabriel wrote:
>
>
>
> > The list.pop(index) returns the element represented by the index and also
>
> > reduces the list by removing that element. So it a short one liner for
>
> > doing both things. But when it c
krismesenbr...@gmail.com wrote:
> def town():
> print ("You stand in the middle of Coffeington while you descide what"
> " to do next, you have herd rumor of the Coffeington Caves that run"
> "under the city, would you like to check them out?")
> answer = input()
> if answer ==
Neatu Ovidiu Gabriel wrote:
> The list.pop(index) returns the element represented by the index and also
> reduces the list by removing that element. So it a short one liner for
> doing both things. But when it comes for popping a slice of the list there
> is nothing similar for doing in that simpl
- Mail original -
> Hi
> 1) I prefer to use start/stop and not the decorator .
> 2) mock_play is the name of the module where the code belongs
> Thanks
> Avishay
> Sent from my iPhone
You should not neeed to refer to the Calc class using mock_play since it is
defined in the very same
Hello
I upgraded to ActivePython 2.7.2.5, and would like to get started
learning about Qt and wxWidgets in Python.
I have a couple of question:
1. Are there obvious reasons to choose either QT/PyQt or
wxWidgets/wxPython? I have the impression that Qt is a richer GUI than
wxWidgets, but it could
The list.pop(index) returns the element represented by the index and also
reduces the list by removing that element. So it a short one liner for doing
both things.
But when it comes for popping a slice of the list there is nothing similar for
doing in that simple way.
If you want to remove a sl
On Thu, 8 Aug 2013 01:47:21 -0700 (PDT), sagar varule
wrote:
>Pyside is also Good. It has a Designer which can be helpful.
Thanks for the info.
--
http://mail.python.org/mailman/listinfo/python-list
I try to use simpleXMLRPC and support request multithreads ,used ThreadingMixIn.
Why what I get from the console still blocking ?
launch the two clients at the same time,one finish, then begin the other,
between them there is 15 sec.
Here is the console output on server windows:
Use Cc to ex
Peter Otten wrote:
> $ python3 mytestcase_demo.py -v
> test_one (__main__.test_two) ... ok
> test_two (__main__.test_two) ... ok
>
> --
> Ran 2 tests in 0.000s
Oops, that's an odd class name. Fixing the name clash in Types.__new
On Tuesday, August 6, 2013 4:05:40 PM UTC+5:30, Gilles wrote:
> Hello
>
>
>
> I need to write a small GUI application that should run on Windows and
>
> Mac.
>
>
>
> What open-source framework would you recommend? I just need basic
>
> widgets (button, listbox, etc.) and would rather a solu
adam.pre...@gmail.com wrote:
> We were coming into Python's unittest module from backgrounds in nunit,
> where they use a decorate to identify tests. So I was hoping to avoid the
> convention of prepending "test" to the TestClass methods that are to be
> actually run. I'm sure this comes up all
On 8/8/2013 2:32 AM, adam.pre...@gmail.com wrote:
We were coming into Python's unittest module from backgrounds in nunit, where they use a
decorate to identify tests. So I was hoping to avoid the convention of prepending
"test" to the TestClass methods that are to be actually run. I'm sure th
I wrote many times on this list, the ascii (generic name for
"byte string") world and the unicode world are two incompatible
worlds. There are bridges, basically there are incompatible,
they requires to think differently.
There is an interesting case on the dev list:
http://mail.python.org/piperma
>> the same exploits. Think of a binary generated elsewhere (where
> "gcc" is available) and put into your environment.
That's pretty bad news :(
>
> I am convinced that 100 % security is impossible - and correspondingly
> would use a pragmatic approach: I would rely on OS level
> constraints (us
Hi All,
Im using Paramiko for my SSH automation. Im using method that is shown in
demo_simple.py example which comes with Paramiko. Below is code from
demo_simple.py.
As you can make out, below code opens SSH connection and opens Interactie
Shell, and then wait for the command from user.
I wan
def town():
print ("You stand in the middle of Coffeington while you descide what"
" to do next, you have herd rumor of the Coffeington Caves that run"
"under the city, would you like to check them out?")
answer = input()
if answer == ("yes") or ("Yes") or ("y"):
print("
77 matches
Mail list logo