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 Feb 20, 6:54 am, Michael Herman wrote:
> First - you can use Python in
> Excel.http://www.python-excel.org/orhttps://www.datanitro.com/
>
> Updated code:
>
> import json
> import urllib
> import csv
>
> url = "http://bitcoincharts.com/t/markets.json";
> response = urllib.urlopen(url);
> data =
On 21/02/2013 06:04, 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, 10 secs, 20 secs, 1
On Feb 21, 9:04 am, 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, 10 secs, 20
On 2/20/2013 11:04 PM, Rita wrote:
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, 10 secs, 20 secs, 1 min a
You could simply put a time delay in your program at the end of the loop
before it starts again-
import time
# sleep for 1 minute
time.sleep(60)
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
In article
,
Chris Angelico wrote:
> On Thu, Feb 21, 2013 at 2:36 PM, Ned Deily wrote:
> > the venerable curses module
>
> See, now, curses is *definitely* venerable. I think that means Python
> is venerable too.
Wp sez that a Curses was released with 4BSD in 1980 so it's much more
venerable
Hi - I have a script which instantiates a SimpleXMLRPCServer server and which I
use to simulate a 'real server' when developing client scripts which will
eventually get used with the 'real server'.
I would like to stop the script running in response to a CTRL-C.
The script is run on windows.
T
On 02/20/2013 12:44 AM, Steve Simmons wrote:
> 2. Qt isn't 'free' (depending on what you are going to be doing with it)
> - read the licensing rules.
How so? It's LGPL. You can't get much freer than that. Both in terms of
code and developer freedom, and proprietary freedom.
--
http://mail.pyth
On Thu, Feb 21, 2013 at 2:36 PM, Ned Deily wrote:
> the venerable curses module
See, now, curses is *definitely* venerable. I think that means Python
is venerable too.
:)
ChrisA
--
http://mail.python.org/mailman/listinfo/python-list
In article <51255c8a.7090...@bigpond.com>, Phil
wrote:
> I'm attempting to put a simple remote control program together and to do
> so I need to check if the arrows are pressed. I could probably do this
> with pyqt4 but I'm looking for something simple to experiment with.
>
> Pygame looked lik
On Friday, December 7, 2012 11:22:12 AM UTC+11, Mark Shroyer wrote:
> On Thu, Dec 06, 2012 at 04:39:41PM -0500, Mark Shroyer wrote:
>
> > I'm having trouble with the py-bt, py-locals, etc. GDB commands (from
>
> > Python's python-gdb.py) while using GDB 7.4 to debug Python 2.7.3; I was
>
> > won
Thank you for reading this.
I'm attempting to put a simple remote control program together and to do
so I need to check if the arrows are pressed. I could probably do this
with pyqt4 but I'm looking for something simple to experiment with.
Pygame looked like a suitable solution but the error
That worked perfectley!
Thanks alot.
--
http://mail.python.org/mailman/listinfo/python-list
On 02/20/2013 04:49 PM, Tim Daneliuk wrote:
On 02/20/2013 12:38 PM, Ian Kelly wrote:
On Wed, Feb 20, 2013 at 7:21 AM, Tim Daneliuk wrote:
Thanks. I was specifically curious about your use of dynamic programming.
What about this algorithm makes it particularly an example of this? Is
it your u
On 02/20/2013 12:38 PM, Ian Kelly wrote:
On Wed, Feb 20, 2013 at 7:21 AM, Tim Daneliuk wrote:
Thanks. I was specifically curious about your use of dynamic programming.
What about this algorithm makes it particularly an example of this? Is
it your use of memoization or something other than thi
On 20 February 2013 17:54, wrote:
> On Tuesday, February 19, 2013 5:47:16 PM UTC, Michael Torrie wrote:
>> On 02/19/2013 02:24 AM, mikp...@gmail.com wrote:
>>
>> > Or rather: what would you try to catch in this particular case?
>>
>>
>> As Peter said, nothing for now. But you seem very resistant
Hi,
Wingware is a Gold Sponsor at PyCon 2013 and we have three conference
passes that we are looking to give away. The conference is completely
sold out, and these passes are a hot commodity, so we thought we would
have some fun with this, rather than just offering them on a
first-come-first
On 02/20/2013 03:53 PM, eli m wrote:
How long does it take for the program to import something? I am asking this
because i have like 7 imports at the beginning of my program and i am thinking
thats the reason why it is slow to start up. Thanks in advance.
That would be easy to measure. If y
you can check each import as it varies in loading time: time python -c
"import [name of module]"
example: time python -c "import flask"
On Wed, Feb 20, 2013 at 12:53 PM, eli m wrote:
> How long does it take for the program to import something? I am asking
> this because i have like 7 imports at
Il 20/02/2013 21:53, eli m ha scritto:
How long does it take for the program to import something? I am asking this
because i have like 7 imports at the beginning of my program and i am thinking
thats the reason why it is slow to start up. Thanks in advance.
It depend of your code module code..
How long does it take for the program to import something? I am asking this
because i have like 7 imports at the beginning of my program and i am thinking
thats the reason why it is slow to start up. Thanks in advance.
--
http://mail.python.org/mailman/listinfo/python-list
Am 19.02.2013 23:19, schrieb Rex Macey:
I'm new to Python and only a hobbyist programmer.
A long time ago I used Microsoft's Visual Basic which had a nice (graphical)
facility for creating GUIs which was part of the development environment.
There are GUI builders, but unfortunately there's none
In mikp...@gmail.com
writes:
> As written before, I don't know what exception to search for, so I wrote
> the (wrong) code:
> except:
> print "error"
> Let's why I don't have a clue about it.
> But someone already explained me that I should not do this.
If you don't know what exception is be
On Wed, Feb 20, 2013 at 7:21 AM, Tim Daneliuk wrote:
> Thanks. I was specifically curious about your use of dynamic programming.
> What about this algorithm makes it particularly an example of this? Is
> it your use of memoization or something other than this?
In retrospect, I was using the ter
Looks like you got it figured out. The indentation error probably occurred
from the copy and paste job into the email.
If you're interested in getting up to speed quickly on Python and Python
Web Development, I have a kickstarter going - http://kck.st/VQj8hq
The $25 pledge will give you access to
On 2013-02-20 08:26, Ziliang Chen wrote:
Hi Guys,
I am using the multiprocessing module. The following code snippet occasionally throws the
"Exception in thread QueueFeederThread (most likely raised during interpreter
shutdown)" exception.
I searched google for the cause, someone says there ar
On Tuesday, February 19, 2013 5:47:16 PM UTC, Michael Torrie wrote:
> On 02/19/2013 02:24 AM, mikp...@gmail.com wrote:
>
> > Or rather: what would you try to catch in this particular case?
>
>
> As Peter said, nothing for now. But you seem very resistant to telling
>
> us what exception was ra
On 2013-02-19, John Immarino wrote:
> Thanks,Chris. I'm a newbie to Python and didn't realize that
> it's not as good at number crunching as some of the others. It
> does seem to do better than Basic with numbers in lists as
> opposed to arrays in Basic.
Python is good enough at number crunching
On 02/20/2013 04:50 AM, Steven D'Aprano wrote:
>[...]
> Or if your ISP provides Usenet access, you can use a News client to read it
> via comp.lang.python, or gmane.comp.python.general. If you don't have a
> News client, there are various free ones available, starting with
> Thunderbird.
I think v
On 20/02/2013 03:53, Barry W Brown wrote:
[...]
Homer Simpson put it accurately last night. "I used to be with it when
I was younger. But it moved and now what I am with is no longer it."
Sorry to be pedantic, but the quote you're thinking of is from Abe Simpson:
http://www.youtube.com/watc
Mark:
I finished the fingerprinting this morning at the local crime bureau here in
Raleigh. You don't have to wait for Judy Yost to mail the FD-258 FBI form
to you. Your local crime bureau should have these available. Judy has to
have the fingerprints in order to open up your electronic applica
On 20/02/2013 11:50, Steven D'Aprano wrote:
[...alternatives to Google...]
Or if your ISP provides Usenet access, you can use a News client to read it
via comp.lang.python, or gmane.comp.python.general.
And if it doesn't, you can get free Usenet access that includes most of
the text-only gro
On 02/19/2013 12:31 PM, Ian Kelly wrote:
On Tue, Feb 19, 2013 at 7:46 AM, Tim Daneliuk wrote:
Are you sure you wouldn't like to share with the class? I'd be interested
in seeing your approach...
Very well:
def collatz(n, memo):
if n not in memo:
if n % 2 == 0:
nex
It's really just a supplement to PyPI. I use it quite a bit. I wish they
would collaborate with PyPi or have an open API.
http://www.saltycrane.com/blog/2012/10/how-use-pip-crateio/
On Wed, Feb 20, 2013 at 6:12 AM, Mark Lawrence
wrote:
>
> Today was the first I've heard about it, can anyone shed
Today was the first I've heard about it, can anyone shed any light as
documentation appears to be rather sparse?
https://crate.io/
--
Cheers.
Mark Lawrence
--
http://mail.python.org/mailman/listinfo/python-list
In article ,
Chris Angelico wrote:
> On Wed, Feb 20, 2013 at 2:38 PM, Terry Reedy wrote:
> > Liskov Substitution Principle (LSP): I met this over 15 years ago reading
> > debates among OOP enthusiasts about whether Rectangle should be a subclass
> > of Square or Square a subclass of Rectangle,
On 2/19/13 5:19 PM, Rex Macey wrote:
I see that there is TKinter, which is a scripting function to build GUIs. To be
clear, I'm looking for a graphical interface to build GUIs.
Tkinter is so easy to use to build GUI's that a GUI tool isn't needed.
Hardly any Tk or Tkinter developer uses anyth
Hi,
I'd like to write some code to capture images from a web cam.
I found opencv and videocapture.
However it seems, that the python opencv API is quite limited.
I don't seem to be able to set all parameters (focus,contrast,exposure,.
. . ) of a web cam via opencv.
Is there any python mod
You have to think about your window differently - think about what
you're putting where, rather than going visually "that looks about
right" - but the reward is that it'll look right no matter where you
run your app. As an added bonus, you don't need any sort of graphical
builder; you can just w
On Wed, Feb 20, 2013 at 11:09 PM, Laszlo Nagy wrote:
>
>> You have to think about your window differently - think about what
>> you're putting where, rather than going visually "that looks about
>> right" - but the reward is that it'll look right no matter where you
>> run your app. As an added bo
alex23 wrote:
> On Feb 20, 3:14 am, rusi wrote:
>> How do you "revert to old interface"?
>> So far I have managed to keep to the old by
>> - logging out of gmail
>> - reload GG -- now the choice to revert should appear
>>
>> It seems everyone does not get that option
>
> In an amazing piece of s
Hi Phil,
> > In Qt Designer (at least in 4.x), the default is a fixed layout, where
> > I have to position the widgets at precise pixel-positions and have to
> > define the size in pixels. And I cannot remove the default fixed layout
> > without modifying the .ui-file in a text editor!
>
> I'm so
Chris Angelico wrote:
>> I'm wondering why you used map.
>>
>>
>> apple, pear, dog, cat, fork, spoon = "apple pear dog cat fork
>> spoon".split()
>
> Why, in case someone monkeypatched split() to return something other
> than strings, of course!
>
> Sorry, I've been learning Ruby this week, and
On Wed, Feb 20, 2013 at 10:35 PM, Steve Simmons wrote:
>
> On 20/02/2013 12:03, Albert Hopkins wrote:
>>
>> On Tue, Feb 19, 2013, at 11:10 PM, Gene Heskett wrote:
>> [...]
>>>
>>> And even us old (78) farts are calling things Kewl now.
>>
>> 78??? Is that the year you were born or the years since
On 20/02/2013 12:03, Albert Hopkins wrote:
On Tue, Feb 19, 2013, at 11:10 PM, Gene Heskett wrote:
[...]
And even us old (78) farts are calling things Kewl now.
78??? Is that the year you were born or the years since you were born?
-a
Yeah, 2078 - Marty McFly, Back From the Future. Kewl !!
On Wed, Feb 20, 2013 at 12:04 PM, Dave Angel wrote:
> On 02/20/2013 05:38 AM, inshu chauhan wrote:
>
>> On Wed, Feb 20, 2013 at 11:26 AM, Roland Koebler
>> wrote:
>>
>>
>>>
>>>
>>>
>>> If you only want to concat the files, I would use some shell-tools,
>>> like "cat" on Linux or "copy" on Windo
On 02/20/2013 06:01 AM, inshu chauhan wrote:
For simple concating the files , I tried the following code :
import glob
with open(r"C:\Users\inshu.chauhan\Desktop\test2.arff", "w") as w:
print w
for f in glob.glob(r"C:\Users\inshu.chauhan\Desktop\For
Model_600\*.arff"):
You fo
On Wed, 20 Feb 2013 11:42:48 +0100, Roland Koebler
wrote:
> Hi,
>
>> > [q] In Qt, it's also possible to generate such flexible layouts. But
>> > it's unfortunately not the default way in Qt, and the Qt designer
only
>> > supports it rudimentarily, and in a much less obvious way. And Qt
does
>> >
On Wed, Feb 20, 2013 at 10:01 PM, Steven D'Aprano
wrote:
> Leo Breebaart wrote:
>
>> Peter Otten <__pete...@web.de> writes:
>>
>>> >>> class Name(str):
>>> ... def __repr__(self):
>>> ... return self
>>> ...
>>> >>> apple, pear, dog, cat, fork, spoon = map(Name, "apple pear dog cat
Leo Breebaart wrote:
> Peter Otten <__pete...@web.de> writes:
>
>> >>> class Name(str):
>> ... def __repr__(self):
>> ... return self
>> ...
>> >>> apple, pear, dog, cat, fork, spoon = map(Name, "apple pear dog cat
>> >>> fork spoon".split())
>
> Is there any reason why you intro
On 02/20/2013 05:38 AM, inshu chauhan wrote:
On Wed, Feb 20, 2013 at 11:26 AM, Roland Koebler wrote:
If you only want to concat the files, I would use some shell-tools,
like "cat" on Linux or "copy" on Windows, so
copy C:\Users\inshu.chauhan\Desktop\ForModel_600\*.arff
C:\Users\inshu.chauh
On Wed, Feb 20, 2013 at 11:38 AM, inshu chauhan wrote:
>
>
>
> On Wed, Feb 20, 2013 at 11:26 AM, Roland Koebler wrote:
>
>> Hi,
>>
>> On Wed, Feb 20, 2013 at 10:50:54AM +0100, inshu chauhan wrote:
>> > I have 10 simple text files with 3 columns x,y,z delimited by "space".
>> I am
>> > trying to co
On Tue, Feb 19, 2013, at 11:10 PM, Gene Heskett wrote:
[...]
> And even us old (78) farts are calling things Kewl now.
78??? Is that the year you were born or the years since you were born?
-a
--
http://mail.python.org/mailman/listinfo/python-list
inshu chauhan wrote:
> Yes I just want to concat the files , not parse/mangle the files. How
> can
> i simply read all files in a folder in my computer and write them into a
> single file ? just by 'printf ' is it possible ?
Assuming the files' last line always ends with a newline and the files
On Feb 20, 2:20 pm, Chris Angelico wrote:
> On Wed, Feb 20, 2013 at 8:08 PM, Rui Maciel wrote:
> > rusi wrote:
>
> >> Heh! I am reminded:
> >> Some years ago a new reprint of Knuth's Art of Programming had on the
> >> back cover something to the effect that this was 'classical CS.'
>
> >> So what
Try something like:
for d in data:
if d["bid"] is not None and d["ask"] is not None:
c.writerow([str(d["currency"]),str(d["symbol"]),str(d["bid"]),str(d["ask"]),str(d["currency_volume"])])
I've used 'is not None' in case 0 or 0.0 are acceptable bid or offer values. If
you want to ex
Leo Breebaart wrote:
> Peter Otten <__pete...@web.de> writes:
>
>> >>> class Name(str):
>> ... def __repr__(self):
>> ... return self
>> ...
>> >>> apple, pear, dog, cat, fork, spoon = map(Name, "apple pear dog cat
>> >>> fork spoon".split())
>
> Is there any reason why you intro
Hi,
> > [q] In Qt, it's also possible to generate such flexible layouts. But
> > it's unfortunately not the default way in Qt, and the Qt designer only
> > supports it rudimentarily, and in a much less obvious way. And Qt does
> > not have such a "container"-concept, where many widgets (e.g. butto
On Wed, Feb 20, 2013 at 11:26 AM, Roland Koebler wrote:
> Hi,
>
> On Wed, Feb 20, 2013 at 10:50:54AM +0100, inshu chauhan wrote:
> > I have 10 simple text files with 3 columns x,y,z delimited by "space". I
> am
> > trying to combine these 10 files to get a single text file.
> >
> > Eg. of data in
Hi,
On Wed, Feb 20, 2013 at 10:50:54AM +0100, inshu chauhan wrote:
> I have 10 simple text files with 3 columns x,y,z delimited by "space". I am
> trying to combine these 10 files to get a single text file.
>
> Eg. of data in 10 files is
> 299 446 2
Do you only want to concat the files, or do you
Peter Otten <__pete...@web.de> writes:
> >>> class Name(str):
> ... def __repr__(self):
> ... return self
> ...
> >>> apple, pear, dog, cat, fork, spoon = map(Name, "apple pear dog cat fork
> >>> spoon".split())
Is there any reason why you introduced the Name class? In Python
2.
Hi,
> I agree that on Linux GTK is pretty darn slick. I use it for all my
> little GUIs. But on Windows, GTK, particularly under python, isn't
> quite as easy to get running.
installing GTK+ 2.x should be easy, since there are all-in-one-installers
for windows on http://www.gtk.org (for GTK+) an
On Wed, Feb 20, 2013 at 8:34 PM, Roland Koebler wrote:
> Hi,
>
>> That way of building a window tends to produce programs that port
>> badly to other systems.
> hmm, I don't think so. I've build several applications in C + GTK/Glade and
> Python + GTK/Glade, which easily run on Linux and Windows w
On Wed, 20 Feb 2013 10:34:50 +0100, Roland Koebler
...
> [q] In Qt, it's also possible to generate such flexible layouts. But
> it's unfortunately not the default way in Qt, and the Qt designer only
> supports it rudimentarily, and in a much less obvious way. And Qt does
> not have such a "conta
I have 10 simple text files with 3 columns x,y,z delimited by "space". I am
trying to combine these 10 files to get a single text file.
Eg. of data in 10 files is
299 446 2
I had written this prog for merging files:
import csv
import glob
with open(r"C:\Users\inshu.chauhan\Desktop\test2.arff"
Hi,
> That way of building a window tends to produce programs that port
> badly to other systems.
hmm, I don't think so. I've build several applications in C + GTK/Glade and
Python + GTK/Glade, which easily run on Linux and Windows without any GUI
changes.
> playing with Java applets introduced
>
Hi,
Thanks for below code:
After this code:
isbn = isbn[:-1]
if len(isbn) != 10:
return False
Add:
if isbn[4:6] == "00":
isbn = isbn[6:]
It is working exactly how it should :)
I didn't even change that part . The zip function automatically truncates
to the length of the shorter input seq
On Wed, Feb 20, 2013 at 8:08 PM, Rui Maciel wrote:
> rusi wrote:
>
>> Heh! I am reminded:
>> Some years ago a new reprint of Knuth's Art of Programming had on the
>> back cover something to the effect that this was 'classical CS.'
>>
>> So what then is pop-CS, folk-CS?
>
> Knuth's work is undoubte
rusi wrote:
> Heh! I am reminded:
> Some years ago a new reprint of Knuth's Art of Programming had on the
> back cover something to the effect that this was 'classical CS.'
>
> So what then is pop-CS, folk-CS?
Knuth's work is undoubtedly classic.
Classic:
1.
of the first or highest quality, c
Hi Guys,
I am using the multiprocessing module. The following code snippet occasionally
throws the "Exception in thread QueueFeederThread (most likely raised during
interpreter shutdown)" exception.
I searched google for the cause, someone says there are some issues with the
multiprocessing.Que
Il Wed, 20 Feb 2013 06:59:46 +, Cousin Stanley ha scritto:
> io wrote:
>
>>
>> How do i manage to read the data source from
>> http://bitcoincharts.com/t/markets.json
>> I just need currency, symbol, bid, ask, volume
>
> Following is a simple way load the json data and write
72 matches
Mail list logo