Using shlex, I now have this:
#!\Python27\python
import os, subprocess
path = os.path.join("C:\\", "Program Files", "Apache Group", "Apache2",
"htdocs", "ccc", "run_alert.py")
#subprocess.call(['SchTasks', '/Create', '/SC', 'ONCE', '/TN', '"test"',
'/TR', path, '/ST', '23:50'])
subprocess.call(['Sc
On 11/20/2012 11:29 AM, mherrmann...@gmail.com wrote:
> ... generate_keystrokes? ...
Not bad. "gen_keystrokes", or even "keystrokes" might also do.
I suggest using a name that is unique enough that you can grep through
piles of code and find where it's used. "type" fails that test.
"genera
On 11/20/12 06:18, Michael Herrmann wrote:
> am having difficulty picking a name for the function that
> simulates key strokes. I currently have it as 'type' but that
> clashes with the built-in function.
Just to add one more to the pot, Vim uses "feedkeys()" for a similar
purpose.
-tkc
--
ht
On 20 November 2012 10:02, Johannes Bauer wrote:
> Hi list,
>
> I have a problem with Python3.2's argparse module. The following sample:
>
> parser = argparse.ArgumentParser(prog = sys.argv[0])
> parser.add_argument("-enc", metavar = "enc", nargs = "+", type = str,
> default = [ "utf-8" ])
> pars
On Tue, 20 Nov 2012 18:00:59 -0600, Tim Chase wrote:
> On 11/20/12 06:18, Michael Herrmann wrote:
>> am having difficulty picking a name for the function that simulates key
>> strokes. I currently have it as 'type' but that clashes with the
>> built-in function.
>
> Just to add one more to the po
On Tue, 20 Nov 2012 21:08:24 +, Prasad, Ramit wrote:
>> I believe that your initial instinct for the name of this function was
>> correct. It automates typing, so you should call it "type" or (for
>> those paranoid about shadowing the built-in, "type_str".
>>
>>
> I can too easily see somebo
On 11/20/2012 06:41 PM, Tom Borkin wrote:
(Please don't top-post. Now we lose all the context)
> Using shlex, I now have this:
> #!\Python27\python
> import os, subprocess
> path = os.path.join("C:\\", "Program Files", "Apache Group", "Apache2",
> "htdocs", "ccc", "run_alert.py")
> #subprocess.ca
On 11/20/12 19:17, Steven D'Aprano wrote:
> On Tue, 20 Nov 2012 18:00:59 -0600, Tim Chase wrote:
>> Just to add one more to the pot, Vim uses "feedkeys()" for a similar
>> purpose.
>
> What does it feed to the keys?
In Vim's case, the signature would be something like
def feedkeys(str, mode='m
When I try to open facebook or search something using google it is just
not working. gives me forbidden or not found errors. that's why I think
the problem is about the headers of the request.
On 20/11/12 15:29, Joshua Landau wrote:
On 20 November 2012 14:48, Jorge Alberto Diaz Orozco
mailto:j
On 11/20/12 19:20, Steven D'Aprano wrote:
> *Accidental* shadowing of names is a bad thing, because you get
> unexpected bugs. *Deliberate* shadowing is not. We're all
> consenting adults here, if somebody calls "from module import
> type", and shadows the builtin type, that's their right to shoot
On Tue, 20 Nov 2012 20:07:54 +, Robert Kern wrote:
> The source of bugs is not excessive complexity in a method, just
> excessive lines of code.
Taken literally, that cannot possibly the case.
def method(self, a, b, c):
do_this(a)
do_that(b)
do_something_else(c)
def method(self
On 11/20/2012 05:46 PM, Alan Meyer wrote:
On 11/20/2012 11:29 AM, mherrmann...@gmail.com wrote:
> ... generate_keystrokes? ...
Not bad. "gen_keystrokes", or even "keystrokes" might also do.
I would emphatically vote "no" for "keystrokes". That's a noun, not a
verb. What does it do? Tell you
>
>The former can be generated from the seed each
>time you enter the level; the latter must be generated the first time then
>stored.
>
Random.random() is already populating the levelSeed list; I've set it as part
of new_game() so that any time the player begins a new game, the levelSeed list
Since the event being generated is commonly called a "keystroke", and since
my dictionary defines the noun "stroke" as being: "the act of striking", a
good verb to choose for the action itself would seem to be "strike":
strike('a')
--
http://mail.python.org/mailman/listinfo/python-list
I'm trying to move an object along a circle (orbit), and I did come up with
this:
radius = 100
from math import sqrt
for x in range(-radius,radius):
y = sqrt(radius**2-x**2)
print(x, y)
however it moves faster at the beginning and end of the range (y value changes
faster than x value) b
On Tue, 20 Nov 2012 18:18:17 -0800, frednotbob wrote:
> The problem, in a nutshell, is this:
>
> When the player starts a new game, make_map() randomly generates level
> 'Foo' as the player's starting floor. Floor 'Bar' is similarly
> generated as the player descends from 'Foo' to 'Bar.
>
> Ea
On Wed, Nov 21, 2012 at 1:18 PM, wrote:
> Each time the player goes from 'Foo' to 'Bar' (or vice versa), make_map
> randomly generates a new layout for either level.
>
> What I'd like to do is select values from 'levelSeed' and assign them to the
> levels that make_map generates so that the pla
On Wed, Nov 21, 2012 at 2:47 PM, Steven D'Aprano
wrote:
> On Wed, 21 Nov 2012 14:41:24 +1100, Chris Angelico wrote:
>
>> However, this still means that the player will see the exact same level
>> regenerated every time, absolutely fresh. As previously stated in this
>> thread, that's not usually a
On Wed, Nov 21, 2012 at 4:25 PM, rh wrote:
> To counter your question. 10 sec. poll for the name for the law that
> states that people will discuss/argue the most over those things
> having little or no significance.
You mean bikeshedding? Parkinson's Law of something-or-other... not
the Law of
On Wed, 21 Nov 2012 17:35:27 +1100, Chris Angelico wrote:
> And yet, trivial though it may seem, function naming in a permanent API
> is pretty important. Threads like this can be the difference between
> coherent and useful APIs and veritable piles of excrement.
"There are only two hard problem
Hello List,
I have to build a simple web service which will:
- receive queries from our other servers
- forward the requests to a third party SOAP service
- process the response from the third party
- send the result back to the original requester
>From the point of view of the requester, th
Hi c.l.p folks
Following is a description of what i am trying to achieve :
The user should log into a django web app, select a file & the web app should
generate a .torrent file & a private
tracker(http://IP_ADDRESS:PORT_NUMBER/announce) for that .torrent file.
Basically, i want to programmati
101 - 122 of 122 matches
Mail list logo