Hey Guys
I shud mention I am relative new to the language. Could you please let me
know based on your experience which module could help me with farm out jobs
to our existing clusters(we use SGE here) using python.
Ideally I would like to do the following.
1. Submit #N jobs to cluster
2. monitor
On Oct 28, 3:06 am, Steven D'Aprano wrote:
> On Thu, 27 Oct 2011 20:05:13 -0700, Fletcher Johnson wrote:
> > If I create a newUnicodeobject u'\x82\xb1\x82\xea\x82\xcd' how does
> > this creation process interpret the bytes in the byte string?
>
> It doesn't, because there is no byte-string. You ha
On Oct 31, 9:12 pm, Dave Angel wrote:
> I would claim that a well-written (in C) translate function, without
> using the delete option, should be much quicker than any python loop,
> even if it does copy the data.
Are you arguing with me? I was agreeing with you, I thought, that
translate would
Thanks a lot for your answer. I'm using python 2.7.2 and tweetpy 1.7
>>> help(tweepy)
Help on package tweepy:
NAME
tweepy - Tweepy Twitter API library
(...)
VERSION
1.7.1
and probably that is the problem, the link that you gave me refers to the
1.2 version page...
Anyway, i already h
On 10/31/2011 08:32 PM, Patrick Maupin wrote:
On Mon, Oct 31, 2011 at 4:08 PM, Dave Angel wrote:
Yes. Actually, you don't even need the split() -- you can pass an
optional deletechars parameter to translate().
On Oct 31, 5:52 pm, Ian Kelly wrote:
That sounds overly complicated and error-p
On 10/31/2011 7:02 PM, Steven D'Aprano wrote:
On Mon, 31 Oct 2011 17:47:06 -0400, Dave Angel wrote:
On 10/31/2011 03:54 PM, pyt...@bdurham.com wrote:
Wondering if there's a fast/efficient built-in way to determine if a
string has non-ASCII chars outside the range ASCII 32-127, CR, LF, or
Tab?
On Mon, Oct 31, 2011 at 4:08 PM, Dave Angel wrote:
Yes. Actually, you don't even need the split() -- you can pass an
optional deletechars parameter to translate().
On Oct 31, 5:52 pm, Ian Kelly wrote:
> That sounds overly complicated and error-prone.
Not really.
> For instance, split() wil
On 10/31/11 4:03 PM, Ric@rdo wrote:
On Mon, 31 Oct 2011 10:00:22 -0400, Kevin Walzer
wrote:
On 10/31/11 12:37 AM, Ric@rdo wrote:
What would be an equivalent widget in ttk like a Listbox and if
possible a small example? I tried to look here
http://docs.python.org/library/ttk.html but did not s
On 10/31/11 18:02, Steven D'Aprano wrote:
# Define legal characters:
LEGAL = ''.join(chr(n) for n in range(32, 128)) + '\n\r\t\f'
# everybody forgets about formfeed... \f
# and are you sure you want to include chr(127) as a text char?
def is_ascii_text(text):
for c in text:
On 10/31/2011 3:54 PM, pyt...@bdurham.com wrote:
Wondering if there's a fast/efficient built-in way to determine if a
string has non-ASCII chars outside the range ASCII 32-127, CR, LF, or Tab?
I presume you also want to disallow the other ascii control chars?
I know I can look at the chars of
On Mon, 31 Oct 2011 17:47:06 -0400, Dave Angel wrote:
> On 10/31/2011 03:54 PM, pyt...@bdurham.com wrote:
>> Wondering if there's a fast/efficient built-in way to determine if a
>> string has non-ASCII chars outside the range ASCII 32-127, CR, LF, or
>> Tab?
>>
>> I know I can look at the chars of
On Mon, Oct 31, 2011 at 4:08 PM, Dave Angel wrote:
> I was wrong once again. But a simple combination of translate() and
> split() methods might do it. Here I'm suggesting that the table replace all
> valid characters with space, so the split() can use its default behavior.
That sounds overly
On 10/31/2011 05:47 PM, Dave Angel wrote:
On 10/31/2011 03:54 PM, pyt...@bdurham.com wrote:
Wondering if there's a fast/efficient built-in way to determine
if a string has non-ASCII chars outside the range ASCII 32-127,
CR, LF, or Tab?
I know I can look at the chars of a string individually and
On 10/31/2011 03:54 PM, pyt...@bdurham.com wrote:
Wondering if there's a fast/efficient built-in way to determine
if a string has non-ASCII chars outside the range ASCII 32-127,
CR, LF, or Tab?
I know I can look at the chars of a string individually and
compare them against a set of legal chars
On 10/31/2011 12:18 PM, Ricardo Mansilla wrote:
Hi i'm trying to fetch realtime data from twitter using tweepy.Stream().
A reference to your source for tweepy would help.
The link below gives https://github.com/tweepy/tweepy
for the current source.
http://pypi.python.org/pypi/tweepy/1.7.1
has v
This was exactly what I was looking for. Thanks!
On Mon, Oct 31, 2011 at 4:48 PM, Chris Rebert wrote:
> On Mon, Oct 31, 2011 at 1:16 PM, extraspecialbitter
> wrote:
> > I'm trying to write a simple Python script to print out network
> > interfaces (as found in the "ifconfig -a" command) and th
On Mon, Oct 31, 2011 at 1:16 PM, extraspecialbitter
wrote:
> I'm trying to write a simple Python script to print out network
> interfaces (as found in the "ifconfig -a" command) and their speed
> ("ethtool "). The idea is to loop for each interface and
> print out its speed. os.popen seems to be
On Mon, 31 Oct 2011 13:16:25 -0700, extraspecialbitter wrote:
> cmd = 'ethtool %interface'
Do you perhaps mean:
cmd = 'ethtool %s' % (interface, )
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, Oct 31, 2011 at 16:16, extraspecialbitter
wrote:
> if line[10:20] == "Link encap":
> interface=line[:9]
> cmd = 'ethtool %interface'
> print cmd
> gp = os.popen(cmd)
because you're saying that cmd is 'ethtool %interface' as you pointed
out later on...
how about:
cmd =
On Mon, Oct 31, 2011 at 2:16 PM, extraspecialbitter
wrote:
> cmd = 'ethtool %interface'
That is not Python syntax for string interpolation. Try:
cmd = 'ethtool %s' % interface
On a side note, os.popen is deprecated. You should look into using
the higher-level subprocess.check_output instead
I'm trying to write a simple Python script to print out network
interfaces (as found in the "ifconfig -a" command) and their speed
("ethtool "). The idea is to loop for each interface and
print out its speed. os.popen seems to be the right solution for the
ifconfig command, but it doesn't seem to
Wondering if there's a fast/efficient built-in way to determine
if a string has non-ASCII chars outside the range ASCII 32-127,
CR, LF, or Tab?
I know I can look at the chars of a string individually and
compare them against a set of legal chars using standard Python
code (and this works fine), bu
Looking for feedback from anyone who has tried or is using
ActiveState Stackato, PiCloud or other Python orientated
SaaS/PaaS offerings?
Pros, cons, advice, lessons learned?
Thank you,
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, Oct 31, 2011 at 12:15 PM, Brian Curtin wrote:
>
> You'd just add "__enter__" and "__exit__" in the PyMethodDef. If you
> have the CPython source, we do it in there in a few places. Off the
> top of my head, PC\winreg.c contains at least one class that works as
> a context manager (PyHKEY),
On Mon, Oct 31, 2011 at 13:34, Chris Kaynor wrote:
> I am currently rewritting a class using the Python C API to improve
> performance of it, however I have not been able to find any
> documentation about how to make a context manager using the C API.
>
> The code I am working to produce is the fo
On Mon, 31 Oct 2011 10:00:22 -0400, Kevin Walzer
wrote:
>On 10/31/11 12:37 AM, Ric@rdo wrote:
>>
>> What would be an equivalent widget in ttk like a Listbox and if
>> possible a small example? I tried to look here
>> http://docs.python.org/library/ttk.html but did not see anything.
>>
>> Maybe I
On Mon, 31 Oct 2011 10:00:22 -0400, Kevin Walzer
wrote:
>On 10/31/11 12:37 AM, Ric@rdo wrote:
>>
>> What would be an equivalent widget in ttk like a Listbox and if
>> possible a small example? I tried to look here
>> http://docs.python.org/library/ttk.html but did not see anything.
>>
>> Maybe I
I am currently rewritting a class using the Python C API to improve
performance of it, however I have not been able to find any
documentation about how to make a context manager using the C API.
The code I am working to produce is the following (its a method of a class):
@contextlib.contextmanage
Hi i'm trying to fetch realtime data from twitter using tweepy.Stream().
So I have tried the following...
After successfully authenticate using oauth:
auth = tweepy.OAuthHandler(...) (it works fine, i have my access_token.key
and secret)
i did:
streaming_api = tweepy.streaming.Stream(auth, Custom
When visitors visit your site to post their code; often such posts ask
for username and email address; consider adding additional fields to
generate some Python documenting feature like Sphinx or epydoc.
and let your site inject the docstring (module string) into the
snippet; primarily, author, u
On Oct 31, 10:00 am, Andrea Crotti wrote:
> Suppose that I have a project which (should be)/is multiplatform in python,
> which, however, uses some executables as black-boxes.
>
> These executables are platform-dependent and at the moment they're just
> thrown inside the same egg, and using pkg_re
Hi,
A new version of the Karrigell web framework for Python 3.2+ has just
been released on http://code.google.com/p/karrigell/
One of the oldest Python web frameworks around (the first version was
released back in 2002), it now has 2 main versions, one for Python 2
and another one for Python 3. T
On 10/31/2011 02:00 PM, Andrea Crotti wrote:
Suppose that I have a project which (should be)/is multiplatform in
python,
which, however, uses some executables as black-boxes.
These executables are platform-dependent and at the moment they're just
thrown inside the same egg, and using pkg_resour
On 10/31/11 12:37 AM, Ric@rdo wrote:
What would be an equivalent widget in ttk like a Listbox and if
possible a small example? I tried to look here
http://docs.python.org/library/ttk.html but did not see anything.
Maybe I did not look in the right place?
tia
The listbox isn't part of the the
Suppose that I have a project which (should be)/is multiplatform in python,
which, however, uses some executables as black-boxes.
These executables are platform-dependent and at the moment they're just
thrown inside the same egg, and using pkg_resources to get the path.
I would like to rewrite t
Thanks for all of the responses; everyone was exactly correct, and
obeying the binding rules for special methods did work in the example
above. Unfortunately, I only have read-only access to the class
itself (it was a VTK class wrapped with SWIG), so I had to find
another way to accomplish what I
hi
http://www.tkdocs.com/tutorial/index.html
remember that you have to import like
from tkinter import ttk
(at "from tkinter import *" ttk in not included)
--
http://mail.python.org/mailman/listinfo/python-list
hi
http://www.tkdocs.com/tutorial/index.html
remember that you have to import like
from tkinter import ttk
(at "from tkinter import *" ttk in not included)
--
http://mail.python.org/mailman/listinfo/python-list
hi
http://www.tkdocs.com/tutorial/index.html
remember that you have to import like
from tkinter import ttk
(at "from tkinter import *" ttk in not included)
--
http://mail.python.org/mailman/listinfo/python-list
hi
http://www.tkdocs.com/tutorial/index.html
remember that you have to import like
from tkinter import ttk
(at "from tkinter import *" ttk in not included)
--
http://mail.python.org/mailman/listinfo/python-list
hi
http://www.tkdocs.com/tutorial/index.html
remember that you have to import line
from tkinter import ttk
(at "from tkinter import *" ttk in not included)
--
http://mail.python.org/mailman/listinfo/python-list
patx wrote:
> Hello I have recently started work on a new project called pickleDB. It is
> a lightweight key-value database engine (inspired by redis).
>
> Check it out at http://packages.python.org/pickleDB
>
> import json as pickle # ;)
>
> def load(location):
> global db
> try:
>
Am 31.10.2011 04:13, schrieb est:
Is it possible to rewrite the above gcc code in python using ctypes
(preferably Win/*nix compatible)?
No; the (gcc-injected) functions starting with __builtin_* are not
"real" functions in the sense that they can be called by calling into a
library, but rathe
Hi guys,
Here is the sample code
http://stackoverflow.com/questions/6389841/efficiently-find-binary-strings-with-low-hamming-distance-in-large-set/6390606#6390606
static inline int distance(unsigned x, unsigned y)
{
return __builtin_popcount(x^y);
}
Is it possible to rewrite the above gcc c
Hello I have recently started work on a new project called pickleDB. It is
a lightweight key-value database engine (inspired by redis).
Check it out at http://packages.python.org/pickleDB
--
Harrison Erd
--
http://mail.python.org/mailman/listinfo/python-list
45 matches
Mail list logo