On Sun, Jun 5, 2016 at 11:57 PM, Archana Sonavane
wrote:
> Hi Team,
>
> I don't have any idea about python scripts, i have ganglia tool python
> scripts.
>
> I would like see the output of each code block, could you please guide.
>
> The code as follows:
With regard to your Subject line, please
On Tue, Dec 1, 2015 at 2:10 AM, Laura Creighton wrote:
> I think we have just dodged a bullet, let us now go thank the
> nice people who sent us this and figure out how we should
> secure the domain.
>
> Laura
>
>
> --- Forwarded Message
>
> Return-Path:
> Date: Tue, 1 Dec 2015 15:12:58 +0800
On Mon, Aug 31, 2015 at 6:42 PM, Mark Lawrence wrote:
> This contained the itertool recipes and was available on pypi but looks like
> it's gone. Can anybody tell me if it's defunct, superseded or what?
What do you mean? It's still there AFAICT:
https://pypi.python.org/pypi/more-itertools
St
On Mon, Aug 24, 2015 at 1:14 PM, DBS wrote:
> Hello,
>
> I'm trying to retrieve the number of commits and changed files on all pull
> requests submitted to a branch.
>
> The call to get all the pull requests is GET /repos/:owner/:repo/pulls, but
> it does not return "commits" or "changed_files".
On Mon, Aug 10, 2015 at 8:22 PM, Vladimir Ignatov wrote:
> Hi,
>
> In my code I often use my own home-brewed object for passing bunch of
> data between functions. Something like:
>
> class Data(object):
> def __init__ (self, **kwargs):
> self.__dict__ = kwargs
>
>
>
> return Data(
On Thu, Jan 8, 2015 at 6:33 PM, Devin Jeanpierre wrote:
> I noticed some very PHP-ish behavior today:
>
import decimal
x = 0
y = float(x)
z = decimal.Decimal(x)
x == y == z == x
> True
x ** x
> 1
y**y
> 1.0
z**z
> Traceback (most recent call last):
> File
On Wednesday, October 15, 2014, ryguy7272 wrote:
> So sorry everyone. I've posted here several times today. This is VERY
> frustrating.
>
> So, I'm reading this link.
> https://docs.python.org/2/howto/urllib2.html
>
>
Important note!: The "/2/" in the URL means those docs are for Python 2.x
Wh
On Mon, Aug 11, 2014 at 11:53 AM, Grant Edwards wrote:
> I just installed Arch Linux for the first time, and was surprosed to
> find that Python isn't installed as part of a "base" system. It's
> also not included in the 'base-devel' package group. It's trivial to
> install, but I'd still pretty
On Tue, Jul 22, 2014 at 9:23 PM, Steven D'Aprano wrote:
> A little known feature of Python: you can wrap your Python application in
> a zip file and distribute it as a single file. The trick to make it
> runnable is to put your main function inside a file called __main__.py
> inside the zip file.
On Wed, Jan 29, 2014 at 1:52 PM, Skip Montanaro wrote:
> Following up on my earlier note about UTC v. GMT, I am having some
> trouble grokking attempts to convert a datetime into UTC. Consider
> these three values:
>
import pytz
UTC = pytz.timezone("UTC")
LOCAL_TZ = pytz.timezone("A
on that I have posted
> to python-list@python.org, so I am forwarding it to here.
> Original Message
> Subject: Re: Postfix conditionals
> Date: Sun, 5 Jan 2014 14:09:14 -0800
> From: Chris Rebert
> To: Göktuğ Kayaalp
> CC: Python
--
https://mail.pyth
On Sun, Jan 5, 2014 at 12:24 PM, Göktuğ Kayaalp wrote:
> Hi,
>
> AFAIK, we do not have "postfix conditionals" in Python, i.e. a condition
> appended to a
> statement, which determines whether the statement runs or not:
>
> py> for i in [False]:
> ... break if not i
>
> The above piece of c
On Sat, Dec 14, 2013 at 5:31 PM, Dan Stromberg wrote:
> Where does PySonar2 sit in the spectrum from pylint
> (thorough/pedantic) to pyflakes (relaxed/few-false-positives)?
>
> I use pylint and pyflakes a lot, and I've heard that PyChecker sits in
> between them on this axis.
My impression is tha
On Wed, Nov 6, 2013 at 7:53 PM, Anthony Papillion wrote:
> Hello Everyone,
>
> I'm writing a little helper script in Python that will access a JSON
> formatted argument from the shell when it's called. The parameter will
> look like this:
>
> {"url":"http://www.google.com"}
>
> So, if my program i
On Wed, Oct 9, 2013 at 9:36 PM, Steven D'Aprano wrote:
> Just came across this little Javascript gem:
>
> ",,," == Array((null,'cool',false,NaN,4));
>
> => evaluates as true
>
> http://wtfjs.com/2011/02/11/all-your-commas-are-belong-to-Array
>
> I swear, I am never going to complain about Python a
* No explicit variable declarations (modulo `global`+`nonlocal`) means
that variable name typos can't be reliably detected at compile-time.
* The value of the loop variable at call-time for functions defined
within a loop trips people up.
* No self-balancing tree datatype of any kind is included in
On Jun 24, 2013 5:36 AM, wrote:
>
> Hi all,
>
> Any suggestions for a good name, for a framework that does automatic
server deployments?
>
> It's like Fabric, but more powerful.
> It has some similarities with Puppet, Chef and Saltstack, but is written
in Python.
Er, Salt is likewise written in P
On Jun 14, 2013 10:26 PM, wrote:
> I bet this is asked quite frequently, however after quite a few hours
searching I haven't found an answer.
>
> What is the thinking behind stopping 'one short' when slicing or
iterating through lists?
>
> By example;
>
> >>> a=[0,1,2,3,4,5,6]
> >>> a
> [0, 1, 2,
On Jun 11, 2013 12:21 AM, "Pete Forman" wrote:
>
> "Joseph L. Casale" writes:
>
> >> You leave out an awful amount of detail. I have no idea what ST is,
> >> so I'll have to guess your real problem.
> >
> > Ugh, sorry guys its been one of those days, the post was rather
> > useless...
> >
> > I a
On Mon, Jun 10, 2013 at 1:34 PM, Roy Smith wrote:
> I have a list, songs, which I want to divide into two groups.
> Essentially, I want:
>
> new_songs = [s for s in songs if s.is_new()]
> old_songs = [s for s in songs if not s.is_new()]
>
> but I don't want to make two passes over the list. I cou
On May 31, 2013 2:46 AM, "Lourens-Jan Ugen"
wrote:
>
> Hi all,
>
> The last few days I've been working on a script to manipulate some
scientific data. One thing I would like to be able to do is find relative
maxima in a data set.
> I'm using numpy in python3 (which I think I can't do without becau
On Sun, May 26, 2013 at 4:58 PM, Luca Cerone wrote:
> Hi Chris, first of all thanks for the help. Unfortunately I can't provide the
> actual commands because are tools that are not publicly available.
> I think I get the tokenization right, though.. the problem is not that the
> programs don't
On Wed, May 29, 2013 at 4:16 AM, Jabba Laci wrote:
> Hi,
>
> How can you detect if a key is duplicated in a JSON file? Example:
>
> {
> "something": [...],
> ...
> "something": [...]
> }
>
> I have a growing JSON file that I edit manually and it might happen
> that I repeat a key. If t
On May 24, 2013 7:06 AM, "Luca Cerone" wrote:
>
> Hi everybody,
> I am new to the group (and relatively new to Python)
> so I am sorry if this issues has been discussed (although searching for
topics in the group I couldn't find a solution to my problem).
>
> I am using Python 2.7.3 to analyse the
On May 23, 2013 3:42 AM, "Schneider" wrote:
>
> Hi list,
>
> how can I serialize a python class to XML? Plus a way to get the class
back from the XML?
There's pyxser: http://pythonhosted.org/pyxser/
> My aim is to store instances of this class in a database.
Honestly, I would avoid XML if you c
On May 24, 2013 9:02 PM, "Carlos Nepomuceno"
wrote:
>
> I'd like to have the option to download the source code as text/plain
from the docs.python.org pages.
>
> For example: when I'm a docs page, such as:
>
> http://docs.python.org/2/library/string.html
>
> and I click the source code link I'm ta
On Sat, Apr 20, 2013 at 4:46 PM, Colin J. Williams wrote:
> Below is part of a script which shows the changes made to permit the script
> to run on either Python 2.7 or Python 3.2.
>
> I was surprised to see that the CSV next method is no longer available.
>
> Suggestions welcome.
> if ver ==
On Tue, Apr 16, 2013 at 11:40 PM, Steven D'Aprano
wrote:
> On Tue, 16 Apr 2013 15:38:29 -0700, Mark Janssen wrote:
> > (Note this contrasts starkly with Java(script), which doesn't seem
> > to be based on anything -- can anyone clarify where Java actually comes
> > from?)
>
> C.
"Influenced by
On Tue, Apr 16, 2013 at 7:14 AM, PEnergy wrote:
> Greetings,
>
> I am trying to write a python script that, when called from the DOS prompt,
> will call another python script and pass it input variables. My current code
> will open the other python script but doesn't seem to pass it any values:
On Apr 14, 2013 4:27 PM, "Charles Hixson"
wrote:
>
> What is the best approach to implementing actors that accept and post
messages (and have no other external contacts).
You might look at how some of the existing Python actor libraries are
implemented (perhaps one of these might even save you fr
On Fri, Apr 5, 2013 at 3:00 PM, Cameron Simpson wrote:
> On 01Apr2013 20:26, John Gordon wrote:
> | In <0c9717ca-52dd-49ce-8102-e14328838...@googlegroups.com> cev...@gmail.com
> writes:
> | > someip = '192.168.01.01'
> | > var1 = 'lynx -dump http://' + someip +
> '/cgi-bin/.log&.submit=+++G
On Wed, Mar 27, 2013 at 7:54 PM, 小学园PHP wrote:
> Guys,
>
> I take a project that need send request to Hadoop by curl.
> But now, the curl and pycurl can't satisfy my project. So i need use the
> powerful httplib.
I would say that `requests`
(http://docs.python-requests.org/en/latest/ ) is general
On Thu, Mar 28, 2013 at 9:00 PM, Victor Hooi wrote:
> Hi,
>
> I have logline that I need to test against multiple regexes. E.g.:
>
> import re
>
> expression1 = re.compile(r'')
> expression2 = re.compile(r'')
>
> with open('log.txt') as f:
> for line in f:
>
On Tue, Mar 19, 2013 at 9:46 PM, Mark Janssen wrote:
> Hopefully this won't be considered mail spam, but another quora answer that
> gets to the idea I'm after: http://qr.ae/TMh7A
>
> Reposted here for those who don't have accounts:
>
> Q. Is it time for us to dump the OOP paradigm? If yes, what
On Thu, Mar 14, 2013 at 3:12 AM, Ana Dionísio wrote:
> Hi!!
>
> I keep having this error and I don't know why: TypeError: 'float' object is
> not iterable.
In general, in the future, always include the full exception
Traceback, not just the final error message. The extra details this
provides ca
On Mar 7, 2013 1:29 AM, "Sven" wrote:
>
> Stupid keyboard shortcuts, sent it too early. Apologies
>
>
> I was wondering what the best approach for the following might be.
>
> Say you have a list P of points and another list N of other items. You
can always assume that
>
> len(N) <= len(P)
>
> Now
On Mar 7, 2013 1:24 AM, "Sven" wrote:
>
> I was wondering what the best approach for the following might be.
>
> Say you have a list P of points and another list N of other items. You
can always assume that
>
> len(N) <= len(P)
>
> Now I would like to iterate over P and place one N at each point.
On Wed, Mar 6, 2013 at 10:33 PM, John Nagle wrote:
> Here's a traceback that's not helping:
> UnicodeEncodeError: 'ascii' codec can't encode character u'\xa3' in
> position 14: ordinal not in range(128)
> The program is converting some .CSV files that come packaged in .ZIP
> files. The files ar
On Wed, Mar 6, 2013 at 3:39 PM, eli m wrote:
> I have a python program that accepts input and calculates the factorial of
> that number, and i want to know if i can make it so commas get inserted in
> the number.
> For example: instead of 1000 it would say 1,000
Use the "," (i.e. comma) format(
On Fri, Mar 1, 2013 at 12:43 AM, Honghe Wu wrote:
> env: python 2.7.3
>
> 6 test files' name in a directory as below:
> 12ab Abc Eab a1bc acd bc
>
> the following is test code:
> for root, dirs, files in os.walk(os.getcwd()):
> print files
>
> the output in win32 platform is:
> ['12ab', '
On Tue, Feb 26, 2013 at 10:17 PM, Thorsten Kiefer wrote:
> Hi,
> my actual program imports ImageTk, to generate TK compatible images.
> But it seems like PIL is no longer supported.
Have you investigated the Pillow fork?
https://pypi.python.org/pypi/Pillow/
Cheers,
Chris
--
http://mail.python.o
On Sunday, February 24, 2013, Adam W. wrote:
> I'm trying to write a simple script to scrape
> http://www.vudu.com/movies/#tag/99centOfTheDay/99c%20Rental%20of%20the%20day
>
> in order to send myself an email every day of the 99c movie of the day.
>
> However, using a simple command like (in Pytho
On Sun, Feb 24, 2013 at 12:28 PM, llanitedave wrote:
> On Sunday, February 24, 2013 1:35:31 AM UTC-8, Chris Rebert wrote:
>> On Feb 24, 2013 1:21 AM, "llanitedave" wrote:
>> > I created an html help page for my Python 2.7.3 application and put it in
>>
On Feb 24, 2013 1:21 AM, "llanitedave" wrote:
>
> I created an html help page for my Python 2.7.3 application and put it in
a documentation folder. I used webbrowser.open() to fetch the page.
>
> On linux -- KDE specifically, the command opens the local file on my
default browser with no issues.
On Feb 24, 2013 1:21 AM, "llanitedave" wrote:
>
> I created an html help page for my Python 2.7.3 application and put it in
a documentation folder. I used webbrowser.open() to fetch the page.
>
> On linux -- KDE specifically, the command opens the local file on my
default browser with no issues.
On Wed, Feb 20, 2013 at 8:04 PM, Rita wrote:
> Hello,
>
> Here is what I am trying to do. (Currently, I am doing this in cron but i
> need much more granularity). I am trying to run program every 20 secs and
> loop forever. I have several of these types of processes, some should run
> every 5 mins
On Saturday, February 16, 2013, Phil wrote:
> Thank you for reading this.
>
> My adventures with Python have just begun and during the few weeks I have
> tried many IDEs. The following piece of code fails under all IDEs, and the
> interpreter, except under the Wing IDE.
>
> Why would this code wor
On Feb 15, 2013 8:13 AM, "Jason Swails" wrote:
> I'm not offering much help here, more like wondering aloud. Doesn't
Google (not to mention other software companies) have an interest staked in
binding the Python name with the Python language? I can't imagine
python.co.uk staging a successful ca
On Mon, Feb 11, 2013 at 9:13 PM, contro opinion wrote:
import os
os.system("i=3")
> 0
os.system("echo $i")
>
> 0
> how can i get the value of i?
Your example is too heavily contrived for me to give a much more
specific/useful answer than "use the `subprocess` module":
http://docs.
On Feb 11, 2013 6:16 AM, "Gilles" wrote:
>
> Hello
>
> I read this article...
>
> "Why is WSGI deployment under FASTCGI so painful?"
>
http://blog.dscpl.com.au/2011/09/why-is-wsgi-deployment-under-fastcgi-so.html
>
> ... and was wondering what better alternative is available to run
> Python web sc
On Sun, Feb 10, 2013 at 10:10 PM, Rodrick Brown wrote:
> Subject: cafebabe python macosx easter egg?
>
> $ hexdump -n4 -C $(which python) | awk '{print $2 $3 $4 $5 }'
cafebabe
~ $ # Huh. Let's google...
http://en.wikipedia.org/wiki/Hexspeak :
"0xCAFEBABE ("cafe babe") is used by Mach-O to identif
On Sat, Feb 2, 2013 at 2:27 AM, Schizoid Man wrote:
> I have a program that performs some calculations that runs perfectly on
> Python 2.7.3. However, when I try to execute it on Python 3.3.0 I get the
> following error:
>numer = math.log(s)
> TypeError: a float is required
>
> The quantity s
On Wed, Jan 30, 2013 at 9:15 AM, noydb wrote:
> I am looking for some guidance on using subprocess to execute an EXE with
> arguments and an output. The below code works in that it returns a 0 exit
> code, but no output file is created. I have tried a few different versions
> of this code (us
On Tue, Jan 29, 2013 at 8:55 PM, RichD wrote:
> I read Wall Street Journal, and occasionally check
> articles on their Web site. It's mostly free, with some items
> available to subscribers only. It seems random, which ones
> they block, about 20%.
>
> Anywho, sometimes I use their search utilit
On Jan 29, 2013 9:05 AM, "moonhkt" wrote:
>
> Hi All
>
> Python 2.6.2 on AIX 5.3
> How to using split o
>
> >>> y = '"abc.p,zip.p",a,b'
> >>> print y
> "abc.p,zip.p",a,b
> >>>
>
> >>> k= y.split(",")
> >>> print k[0]
> "abc.p
> >>>
>
> Need Result, First element is
> abc.p,zip.p
Try the csv modul
On Jan 22, 2013 11:31 PM, "moonhkt" wrote:
>
> Hi Al
>
> I have Data file have below
>
> Data file
> V1
> V2
> V3
> V4
> V4
> V3
>
> How to using count number of data ?
>
> Output
> V1 = 1
> V2 = 1
> V3 =2
> V4 = 2
Construct a frequency table using collections.Counter:
http://docs.python.org/2.7
On Friday, January 18, 2013, Steven D'Aprano wrote:
> I wish to add a key to a dict only if it doesn't already exist, but do it
> in a thread-safe manner.
>
> The naive code is:
>
> if key not in dict:
> dict[key] = value
>
>
> but of course there is a race condition there: it is possible that
On Sunday, January 6, 2013, Gene Heskett wrote:
> Greetings all;
>
> Trying to collect all the dependencies of FreeCad-0.13, but it appears that
> pycollada is behind some sort of a login/paywall on github. Is anyone here
> familiar with how that works?
>
Er, what? The repo seems freely browseab
On Sat, Jan 5, 2013 at 10:55 PM, iMath <2281570...@qq.com> wrote:
>
> os.path.realpath(path) bug on win7 ?
>
> Temp.link is a Symbolic link
> Its target location is C:\test\test1
> But
> >>> os.path.realpath(r'C:\Users\SAMSUNG\Temp.link\test2')
> 'C:\\Users\\SAMSUNG\\Temp.link\\test2'
>
> I though
On Thu, Jan 3, 2013 at 3:25 PM, Grant Edwards wrote:
>
> I've written a small assembler in Python 2.[67], and it needs to
> evaluate integer-valued arithmetic expressions in the context of a
> symbol table that defines integer values for a set of names. The
> "right" thing is probably an expressi
On Wed, Jan 2, 2013 at 10:01 PM, Ben Finney wrote:
> Ian Kelly writes:
>
>> On Wed, Jan 2, 2013 at 7:24 PM, someone wrote:
>> > 1) class somethingWork: Invalid name "somethingWork" (should match
>> > [A-Z_][a-zA-Z0-9]+$), I'm not that good at regular exps, but I
>> > suppose it wants my class na
On Wed, Jan 2, 2013 at 5:39 AM, wrote:
> On Wednesday, January 2, 2013 12:02:34 PM UTC+5:30, Chris Rebert wrote:
>> On Jan 1, 2013 8:48 PM, wrote:
>> > On Wednesday, January 2, 2013 12:00:06 AM UTC+5:30, Chris Rebert wrote:
>> > > On Jan 1, 2013 3:41 AM, wrote:
On Jan 1, 2013 8:48 PM, wrote:
> On Wednesday, January 2, 2013 12:00:06 AM UTC+5:30, Chris Rebert wrote:
> > On Jan 1, 2013 3:41 AM, wrote:
> >
> > > I am facing one issue in my module. I am gathering data from sql
server database. In the data that I got from db contains
On Jan 1, 2013 3:41 AM, wrote:
>
> I am facing one issue in my module. I am gathering data from sql server
database. In the data that I got from db contains special characters like
"endash". Python was taking it as "\x96". I require the same
character(endash). How can I perform that. Can you pleas
On Mon, Dec 31, 2012 at 1:23 AM, Ben Finney wrote:
> Chris Rebert writes:
>
>> By contrast, in the first part of the *expression*
>> `haha(object).theprint()`, you passed an argument (namely, `object`).
>> Since __init__() wasn't expecting any arguments whatsoever,
On Sun, Dec 30, 2012 at 8:18 PM, contro opinion wrote:
> here is my haha class
> class haha(object):
> def theprint(self):
> print "i am here"
>
haha().theprint()
> i am here
haha(object).theprint()
> Traceback (most recent call last):
> File "", line 1, in
> TypeError: objec
On Sun, Dec 30, 2012 at 10:36 PM, contro opinion wrote:
> here is my haha class
> class haha(object):
> def theprint(self):
> print "i am here"
>
haha().theprint()
> i am here
haha(object).theprint()
> Traceback (most recent call last):
> File "", line 1, in
> TypeError: obje
On Sun, Dec 30, 2012 at 10:32 PM, contro opinion wrote:
> import urllib
> import lxml.html
> down='http://blog.sina.com.cn/s/blog_71f3890901017hof.html'
> file=urllib.urlopen(down).read()
> root=lxml.html.document_fromstring(file)
> body=root.xpath('//div[@class="articalContent "]')[0]
> print bo
On Dec 28, 2012 4:26 AM, "Helmut Jarausch"
wrote:
>
> Hi,
>
> I'm trying to filter an mbox file by removing some messages.
> For that I use
> Parser= FeedParser(policy=policy.SMTP)
> and 'feed' any lines to it.
> If the mbox file contains a white line followed by '^From ',
> I do
>
> Msg= Parser.c
On Dec 26, 2012 11:55 PM, "Abhas Bhattacharya"
wrote:
>
> On Thursday, 27 December 2012 10:22:15 UTC+5:30, Tim Roberts wrote:
> > Abhas Bhattacharya wrote:
> >
[Oh god please stop/avoid using Google Groups with its godawful
reply-quoting style that adds excessive blank lines]
> > >While I am def
On Dec 25, 2012 6:06 PM, "Abhas Bhattacharya"
wrote:
>
> While I am defining a function, how can I access the name (separately as
string as well as object) of the function without explicitly naming
it(hard-coding the name)?
> For eg. I am writing like:
> def abc():
> #how do i access the funct
On Wednesday, December 26, 2012, Gnarlodious wrote:
> Error: AttributeError: 'module' object has no attribute '_strptime'
>
Please include the full Traceback, not just the final error message.
This problem is driving me crazy. It only happens in Python 3.3.0, while on
> my server running 3.1.3
On Sat, Dec 22, 2012 at 12:57 AM, Daniel Fetchinson
wrote:
> Hi folks, I realize this is slightly off topic and maybe belongs to a
> gnome email list but it's nevertheless python:
>
> I use an old python program that was written for gnome 2 and gtk 2 and
> uses the function get_local_path_from_uri
On Dec 15, 2012 4:51 AM, wrote:
>
> Hello,
>
> I'm trying to use pexpect to grab interactions with Python's REPL. I am
having trouble with tracebacks. Possibly it is related to buffering (hence
the subject line) but I admit that's a guess.
Why are you doing this in the first place? Why invoke a
On Dec 11, 2012 7:33 AM, "Bart Thate" wrote:
> pickle uses eval still ? or is is considered safe now ? i was told not to
use eval() stuff on data.
I don't believe pickle uses eval() per se, but per the red warning box in
its docs, it's still not safe when given untrusted input. IIRC, among other
On Thursday, December 6, 2012, INADA Naoki wrote:
> The reference says:
>
> The truth of x==y does not imply that x!=y is false.
> Accordingly, when defining __eq__(), one should also
> define __ne__() so that the operators will behave as expected.
>
> (http://docs.python.org/3/reference/dat
On Nov 26, 2012 3:03 AM, "Kushal Kumaran"
wrote:
> dacha...@gmail.com writes:
> > I want to list the repositories in svn using python. For this i have
used below command,
> > " res = subprocess.check_output(["svn.exe", "list", "
Https://127.0.0.1:443/svn/Repos"], stderr=subprocess.STDOUT) "
> >
>
On Nov 26, 2012 2:41 AM, wrote:
>
> Hi all,
>
> I want to list the repositories in svn using python. For this i have used
below command,
> " res = subprocess.check_output(["svn.exe", "list", "
Https://127.0.0.1:443/svn/Repos"], stderr=subprocess.STDOUT) "
>
> but it throws an exception, since it r
On Wed, Nov 21, 2012 at 9:19 AM, Christian wrote:
> Hi ,
>
> my purpose is a generic insert via tuple , because the number of fields and
> can differ. But I'm stucking .
>
> ilist=['hello',None,7,None,None]
>
> #This version works, but all varchar fields are in extra '' enclosed.
> con.execute(
On Wed, Nov 21, 2012 at 10:57 AM, rh wrote:
> On Wed, 21 Nov 2012 10:12:26 -0800
> Chris Rebert wrote:
>> On Wed, Nov 21, 2012 at 9:49 AM, rh
>> wrote:
>> > On Tue, 20 Nov 2012 20:41:42 +0300
>> > Andriy Kornatskyy wrote:
>> > I'm looking at
On Wed, Nov 21, 2012 at 7:48 AM, MRAB wrote:
> On 2012-11-21 14:59, saikari78 wrote:
>>
>> Hi,
>>
>> I'm using the json module to create a JSON string, then inserting that
>> string into a html template containing a javascript function (from the
>> highcharts library: http://www.highcharts.com/)
On Wed, Nov 21, 2012 at 9:49 AM, rh wrote:
> On Tue, 20 Nov 2012 20:41:42 +0300
> Andriy Kornatskyy wrote:
>> Cyclomatic (or conditional) complexity is a metric used to indicate
>> the complexity of a source code. Excessive complexity is something
>> that is beyond recommended level of 10 (thresh
On Monday, November 19, 2012, wrote:
> I am working on a cmd.Cmd-based program, and normally could just split the
> string and get the right parts.
>
> Now I have a case where I could have two or three words in the string that
> need to be grouped into the same thing.
>
> Then I realized that I'm
On Sun, Nov 18, 2012 at 5:48 AM, Tom Borkin wrote:
> Hi,
> I have this code:
>
> #!\Python27\python
>
> import subprocess
> #subprocess.call(['SchTasks /Create /SC ONCE /TN "My Tasks" /TR "C:/Program
> Files/Apache Group/Apache2/htdocs/ccc/run_alert.py" /ST 07:50'], shell=True)
> subprocess.call([
On Thursday, November 8, 2012, Kevin Holleran wrote:
> On Thu, Nov 8, 2012 at 9:43 AM, Kevin Holleran
>
> > wrote:
>
>> My goodness psexec.
>>
>> thanks can't believe that didn't come to me...
>>
>>
>>
>>
>> On Thu, Nov 8, 2012 at 9:31 AM, Tim Golden
>>
>> > wrote:
>>
>>> On 08/11/2012
On Sun, Nov 4, 2012 at 10:27 PM, Demian Brecht wrote:
> So, here I was thinking "oh, this is a nice, easy way to initialize a 4D
> matrix" (running 2.7.3, non-core libs not allowed):
>
> m = [[None] * 4] * 4
>
> The way to get what I was after was:
>
> m = [[None] * 4, [None] * 4, [None] * 4, [No
On Fri, Nov 2, 2012 at 1:19 AM, Sacha Rook wrote:
> Hi does anyone know where the python-form.org site has gone?
Some googling suggests that it's under new management:
http://mcompute.co.uk/showthread.php?tid=2161
But comp.lang.python/python-list is better anyway [ ;-) ], and you're
already here
On Mon, Oct 29, 2012 at 1:24 AM, wrote:
> On Sunday, October 28, 2012 9:44:56 PM UTC-7, alex23 wrote:
>> On Oct 29, 2:09 pm, Andrew wrote:
>> class RangedSlicer(list):
>> Then wrap your lists with your RangedSlicer class as needed.
>
> Hmmm...
>
> I began a test in an interactive shell:
>>
On Mon, Oct 29, 2012 at 1:08 AM, wrote:
> On Sunday, October 28, 2012 10:14:03 PM UTC-7, Paul Rubin wrote:
>> Andrew writes:
> I'm getting very frustrated with the editor provided for this group... It
> keeps posting prematurely, and putting my email in even when I tell it not to
> each time;
On Mon, Oct 29, 2012 at 12:54 AM, Andrew wrote:
> On Sunday, October 28, 2012 9:26:01 PM UTC-7, Ian wrote:
>> On Sun, Oct 28, 2012 at 10:00 PM, Andrew wrote:
> The slice class when passed to __getitem__() was created to merely pass two
> numbers and a stride to __getitem__; As far as I know s
On Sun, Oct 28, 2012 at 10:40 PM, wrote:
> I've learned a lot about Ubuntu just trying to install numpy for Python
> 3.2.3. I've finally managed to put it in the Python3.2 directory but when I
> try to import it, I still get there's "no module named numpy." There are
> other modules in the sam
On Sun, Oct 28, 2012 at 4:51 PM, Mark L. Hotz wrote:
> I have what I think should be a relatively simple question for someone who
> is knowledgeable about Python.
>
> At the IDLE prompt, when I enter “b” > 99, it responds True. In fact, it
> doesn’t matter which number is entered here, “b” is alwa
On Sun, Oct 28, 2012 at 4:30 PM, goldtech wrote:
> Hi,
>
> Trying to learn Python OOP. An example from a book, may not be
> formated after sending post but:
>
> class Contact:
> all_contacts = []
> def __init__(self, name, email):
> self.name = name
> self.email = email
>
On Tue, Oct 16, 2012 at 11:35 AM, Pradipto Banerjee
wrote:
> I am working with a series of large files with sizes 4 to 10GB and may need
> to read these files repeated. What data format (i.e. pickle, json, csv, etc.)
> is considered the fastest for reading via python?
Pickle /ought/ to be faste
On Wed, Oct 24, 2012 at 9:27 PM, seektime wrote:
> On Tuesday, October 23, 2012 11:07:29 PM UTC-7, Chris Rebert wrote:
>> P.S.: I'm guessing you obtained `L` from file.readlines() or similar;
>> it is worth noting for future reference that the readlines() method is
&g
On Tue, Oct 23, 2012 at 10:23 PM, seektime wrote:
> Here's some example code. The input is a list which is a "matrix" of letters:
>a b a
>b b a
>
> and I'd like to turn this into a Python array:
You mean a Python list. The datatype Python calls an `array` is very
different and relativ
On Thu, Oct 18, 2012 at 2:27 AM, Ashish Jain wrote:
> Hi,
>
> I have a html string in an object, when I do repr() of that object, I get
> value as:
>
> {'Id' : 1, 'Body': u' Hello '}
>
> I don't wish to have 'u' as the character in my string representation. As
> this is not a valid json notation
On Mon, Oct 15, 2012 at 5:12 AM, Neal Becker wrote:
> Is there a way to specify to format I want a floating point written with no
> more
> than e.g., 2 digits after the decimal? I tried {:.2f}, but then I get all
> floats written with 2 digits, even if they are 0:
>
> 2.35 << yes, that's what I
On Mon, Oct 15, 2012 at 4:23 AM, wrote:
> I want to fix an error in some code I have installed, however I don't
> really want to just bodge it.
"bodge". Well, I learned a new word this morning!
> The function producing the error is:-
>
> def get_text(self, idx): # override !
>
On Saturday, October 13, 2012, Cameron Simpson wrote:
> I'm having some trouble with closures when defining a decorator.
> However, I can't make my make_file_property function work. I've stripped
> the code down and it does this:
> Traceback (most recent call last):
> File "foo.py", li
1 - 100 of 2384 matches
Mail list logo