On Tuesday, June 29, 2021 at 2:03:58 PM UTC-4, Chris Angelico wrote:
> On Wed, Jun 30, 2021 at 3:38 AM Jerry Thefilmmaker
> wrote:
> > Thanks for taking the time to explained, Chris. Believe me, it helps. It
> > had me thinking for a while. So, All the stuff about HTTP
On Monday, June 28, 2021 at 3:59:54 PM UTC-4, Chris Angelico wrote:
> On Tue, Jun 29, 2021 at 5:43 AM Jerry Thefilmmaker
> wrote:
> >
> > Do you mind elaborating a bit more on making one function for any given
> > request?
> >
> > As far as defining a bun
On Monday, June 28, 2021 at 2:41:23 PM UTC-4, Chris Angelico wrote:
> On Tue, Jun 29, 2021 at 4:36 AM Jerry Thefilmmaker
> wrote:
> > @app.route("/", methods = ['POST', 'GET'])
> > def play():
> >
> > @app.route("/", meth
I am new at python but newer at flask, and I'm trying to deploy a web app where
I:
1. Send the user the question
2. Get the answer from the user
3. Send additional information based on the answer
I am able to send the question but stuck at getting the answer from the user.
Base on the answer fro
t's not installed via pip, it's part of
the python standard library (see docs here:
https://docs.python.org/3/library/webbrowser.html). There's also an
'os' module in the standard library
(https://docs.python.org/3/library/os.html). Are those the modules you
were looking for?
--
Jerry
--
https://mail.python.org/mailman/listinfo/python-list
ocess). If you're using
python 3, the subprocess module's page is here:
https://pymotw.com/3/subprocess/.
>From your sample code, you may still be using python 2. If so, the
PyMOTW page for that version is here:
https://pymotw.com/2/subprocess/.
--
Jerry
--
https://mail.python.org
On Mon, Mar 19, 2018 at 5:07 PM, MRAB wrote:
> You didn't say which installer you used.
>
It might also be helpful to know:
Did you install python for "Just Me" or "All Users" in the installer?
Does the user you're logged in as have enough authority to install for All
Users if that's what you
- "IDLE (Python 3.6 32-bit)", "Python 3.6 (32-bit)", "Python
3.6 Manuals (32-bit)", and "Python 3.6 Module Docs (32-bit)". What do you
have?
When you installed python, do you remember if you installed it for "All
Users" or "Just Me"?
--
Jerry
--
https://mail.python.org/mailman/listinfo/python-list
ure language at this point, I don't expect that
it will ever change.
--
Jerry
--
https://mail.python.org/mailman/listinfo/python-list
icense" for more information.
>>> import math
>>> help (math.sin)
Help on built-in function sin in module math:
sin(...)
sin(x)
Return the sine of x (measured in radians).
>>>
--
Jerry
--
https://mail.python.org/mailman/listinfo/python-list
cent call last):
File "", line 1, in
TypeError: unorderable types: builtin_function_or_method() > int()
>>> isinstance < 100
Traceback (most recent call last):
File "", line 1, in
TypeError: unorderable types: builtin_function_or_method() < int()
>>&
uot;, "copyright", "credits" or "license" for more information.
> >>> import math
> >>> math.sqrt(1.3)
> 1.140175425099138
> >>>
>
> This is on 64-bit Windows 10.
> --
> https://mail.python.org/mailman/listinfo/python-list
efaultdict
frequency = defaultdict(int)
...
...
if word1 == word:
frequency[word] += 1
The defaultdict takes care of the special case for you. If the value is
missing, it's defaulted to 0.
--
Jerry
--
https://mail.python.org/mailman/listinfo/python-list
thing to end up mixed in with the desired results. It goes
on in that vein out to page 11 or so, at which point things seem to
devolve a bit.
I'd be totally sympathetic with your plight if you didn't know the key
phrase 'dict comprehension' to find all of that information. I
search results,
Google does a fine job of answering python questions, at least when
you already know the key phrase to look for.
--
Jerry
--
https://mail.python.org/mailman/listinfo/python-list
st.Add):
node.op = ast.Mult()
return node
code = 'print(2+5)'
tree = ast.parse(code)
tree = ChangeAddToMultiply().visit(tree)
ast.fix_missing_locations(tree)
co = compile(tree, '', "exec")
exec(code)
exec(co)
--
Jerry
--
https://mail.python.org/mailman/listinfo/python-list
change, you get newbies who are a slightly less confused about for
loops. That tradeoff isn't worth it.
--
Jerry
--
https://mail.python.org/mailman/listinfo/python-list
hi im trying to run this program and it opens a screen really ast and closes it
faster withou any results. im totally a noob. everything i google is confusing.
do i need to place this is in a folder or just run from command line? i have
the latest version of python. im running win 7. any help wo
arch, I only find one for
unicode glyphs: http://shapecatcher.com/ and another one for TeX
codes: http://detexify.kirelabs.org/classify.html
--
Jerry
--
https://mail.python.org/mailman/listinfo/python-list
e looking for PyDev: http://www.pydev.org/
--
Jerry
--
https://mail.python.org/mailman/listinfo/python-list
n accepted, my impression is that it's still a work in progress).
--
Jerry
--
https://mail.python.org/mailman/listinfo/python-list
On Sun, Apr 12, 2015 at 10:29 PM, Pippo wrote:
> Any guide on this?
>
> http://snap.stanford.edu/snappy/#download
Sure. http://snap.stanford.edu/snappy/#docs
--
https://mail.python.org/mailman/listinfo/python-list
Hi Grant:
Why use SIGHUP, Does it has something to do with configure file
modification? I don't get it. Thank you.
On Thu, Mar 26, 2015 at 11:49 PM, Grant Edwards wrote:
> On 2015-03-26, Ben Finney wrote:
>> Jerry OELoo writes:
>>
>>> Currently, I can just think
equirement?
Thanks!
Best Regards
Jerry
--
Rejoice,I Desire!
--
https://mail.python.org/mailman/listinfo/python-list
ime.
I think AutoHotKey is also widely used for automating windows GUI
apps, but it's not related to python at all.
--
Jerry
--
https://mail.python.org/mailman/listinfo/python-list
nting nam[num].encode('utf-8') perhaps I
have to convert it first ?
Can someone please help.
Thanks
--
Jerry Rocteur
je...@rocteur.com
--
https://mail.python.org/mailman/listinfo/python-list
ry scientific ;-)
Which module would you use and how would you suggest is the best way to do it ?
Thanks very much in advance, I haven't done a lot of HTML parsing.. I
would much prefer using WebServices and an API but unfortunately they
don't have it.
--
Jerry Rocteur
--
https://mail.python.org/mailman/listinfo/python-list
uired
I'm Googling it and I can see there are other ways to connect but
can't seem to get the syntax.
Can anyone help.
Thanks in advance,
--
Jerry Rocteur
je...@rocteur.com
--
https://mail.python.org/mailman/listinfo/python-list
;s browser of choice to the search terms, you
should get some explicit instructions for setting everything up
properly.
--
Jerry
--
https://mail.python.org/mailman/listinfo/python-list
on you're
using.
--
Jerry
--
https://mail.python.org/mailman/listinfo/python-list
've seen,
and as you mentioned, it's not as interactive and integrated into an
IDE as Visual Studio is.
--
Jerry
--
https://mail.python.org/mailman/listinfo/python-list
when you so mylist[:] = [0,1] you're taking all of the contents of
the existing list, and replacing them with the contents of the list
[0,1]. That changes the existing list, it doesn't just assign a new
list to the name mylist.
--
Jerry
--
https://mail.python.org/mailman/listinfo/python-list
Ok thanks so much i really want to get good. I also found this MIT open course
lectures for python. Is this good to use as a source of learning? I think it
would because it is MIT.
--
https://mail.python.org/mailman/listinfo/python-list
ok I seem to very confused about this. Is there like a page or web page that
like completely sums this up so i can study. I am going to look up 'functions
in python'. I am not sure if this is what we a talking about as a whole here
but I'am sure that I'll find something. I am all good with decor
Ok thanks man I have never used forums and stuff before but it is great help
thank you so much.
--
https://mail.python.org/mailman/listinfo/python-list
oh yeah i forgot about the decorators. Um say that you wanted to decorate a
function with the outer() func you would just put @outer on top of it? And this
is the same as passing another func into the outer func?
and also with the first example you say x is in the scope when is was created
can
Ok so i am trying to learn this and i do not understand some of it. I also
tried to searched the web but i couldnt find any answers.
1. I dont understand when i will need to use a function that returns another
function.
eg
def outer():
def inner():
On Sat, May 10, 2014 at 7:39 AM, Preethi wrote:
> future==0.9.0
It looks like that library is out of date. The current version looks
to be 0.12.0, and it also looks like this bug was fixed in the 0.12.0
release. I'd upgrade your version if at all possible.
--
Jerry
-
nd values -- really can
help people who are struggling to learn the language. I know it
certainly helped me.
--
Jerry
--
https://mail.python.org/mailman/listinfo/python-list
ba build, but you really ought to install the
software, not just run it out of the build directory. Best of all
would be to install a version that's actually been packaged up for
your OS using the CentOS packaging system.
--
Jerry
--
https://mail.python.org/mailman/listinfo/python-list
ss seen that object
passed to functions with None-based sentinels.
I feel like 'is' is an operator that ought to be saved for an advanced course.
Out of curiosity, do you think we should be doing truth checking with
'is'? True and False are singletons, and it seems to me that t
e the case, I'm still not
convinced that you can tell from looking at those two lines of code
which one is buggy, except for the fact that there has been 20 years
of custom saying that comparing to None with equality is wrong.
--
Jerry
--
https://mail.python.org/mailman/listinfo/python-list
an/listinfo/python-ideas) before opening
an issue on the bug tracker.
--
Jerry
--
https://mail.python.org/mailman/listinfo/python-list
appear to be
a lot of caveats. Take a look at the section of that page starting
with "If you write directly to a volume that has a mounted file
system, you must first obtain exclusive access to the volume." for
lots of details.
--
Jerry
--
https://mail.python.org/mailman/listinfo/python-list
tions/__init__.py#l862
. In that class, the code responsible for handling the bracketed name
lookup (i.e., self["name"]), is in the __getitem__ and __setitem__
methods (and peripherally in __delitem__, __len__ and __contains__)
--
Jerry
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, Feb 4, 2014 at 1:51 AM, wrote:
> I got it. If I'm visiting a page like this:
>
> http://docs.python.org/3/tutorial/index.html#the-python-tutorial
>
> 1) To read the page, I'm scrolling down.
> 2) When I have finished to read the page, I scroll up
> (or scroll back/up) to the top of the pa
king with a subprocess like this, you're going
to want to be in the line-based mode, so you'll probably want to add
-l or -L to your command line.
--
Jerry
--
https://mail.python.org/mailman/listinfo/python-list
ommand line, python itself can take command line options,
including one that does exactly what you're looking for.
python -i script.py
That command will run script.py to its end, then drop you into the
interactive interpreter with the environment intact from running the
script.
--
Jerry
owledge. If someone else
happens to already know all of that background, they may be able to
help right off. If not, they may be interested enough to do the
research to figure it all out and then help. You just may be able to
prompt more people to help by cutting down on the amount of work it
wou
, 100)
setattr(my_object, 'foo-bar', 1000)
print(my_object.foo-bar)
Today (in python 3.3), it prints 9, because my_object.foo is 10, the
local variable bar is equal to 1, and 10 minus 1 is 9.. Under your
new proposal, it would print 1000, right? Is there any way for your
proposal to be
in trouble.
Drag and drop layout tools exist for all of your proposed systems.
--
Jerry
--
https://mail.python.org/mailman/listinfo/python-list
output, err = p.communicate()
That's it. No need for a loop, or manually handling the fact that
stderr and/or stdout could end up with a full buffer and start to
block.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
P 249 compliant, and
didn't have much documentation beyond that.
It seems to me that adding the PEPs to the compiled documentation
would be a good thing. They are at least as useful as the Language
Reference or the Embedding and Extending Python sections that are
already included.
--
#x27;re accidentally importing the pyglet package from the
local directory instead of from the proper location in dist-packages.
Try changing back to your home directory and trying this again. I
think you're picking up the code from
~/Desktop/pyglet-1.2alpha1/pyglet instead of from
/usr/local/lib/python3.3/dist-packages.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
nating IP address and look it up in a
geolocation database or submit it to a geolocation service and get the
response back from them. It's not stored in any environment
variables.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
> language have a continue that can go to the next iteration of an outer
> loop?)
Bash:
continue: continue [n]
Resume for, while, or until loops.
Resumes the next iteration of the enclosing FOR, WHILE or
UNTIL loop.
If N is specified, resumes the Nth enclosing loop.
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
n32\lib\json\decoder.py", line 351, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Python32\lib\json\decoder.py", line 367, in raw_decode
obj, end = self.scan_once(s, idx)
File "", line 5, in json_checker
raise ValueError("Duplicate key %r in json document" % key)
ValueError: Duplicate key 'x' in json document
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
) [MSC v.1500 32 bit (Intel)]
on win32
>>> f = "{} {} {}"
>>> v = "1,2,3"
>>> print(f.format(*eval(v)))
1 2 3
>>>
The * unpacks the tuple returned from eval(), so that you get 3 separate
parameters passed to format(), instead of the single tuple.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
er object, told it to read in ~/my.cnf, the asked for the value
of section 'client', option 'mmz'. The error indicates that your config
files doesn't have a section named 'client'.
What is the content of your ~/my.cnf file?
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
of your suggestions about using your
pyimport-relative tool aren't helpful unless the author re-names his
package from "collections" to "mypackage" and then moves all of their
code into a "collections" module inside "mypackage", right?
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
man being behind the keyboard.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
"while/else".
That's always been my opinion too. I'd remember how the construct
worked if it was for/then (and while/then). Since seeing for/else
always makes my brain lock up for a few seconds when I'm reading code,
I don't bother using it.
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
a maximum length of 79 characters per line, and
that's probably what PythonTidy was trying to accomplish by splitting
your line.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
ce from python's
interactive interpreter. I think that could shed a lot of light on
the behavior you're seeing.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
> So does anyone know of a way to do this? Unfortunately, I've tried
> some searching but google doesn't like the term klog, and most of the
> hits involved injecting code or other things that are not related at
> all.
>
> Or, if there's a better way to get ac
x27;str' object has no attribute 'contains').
If that isn't what you're seeing, you'll need to provide the full and
complete text of the error you are getting, and preferably enough of
your code that we can reproduce the issue and help you solve it.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
general TOS document.
That said, I am not a lawyer. If you want legal advice, you'll need
to pay a lawyer for that advice.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
ons, or money transfer, or whatever, be done on
the server, and just pass back the results.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
rity of a process, though it's a
little different from the *nix niceness level. See
http://code.activestate.com/recipes/496767/ for a recipe using
pywin32. I believe the psutil module handles this too, but I don't
think it manages to abstract away the platform differences.
b service is going to have to
authenticate with the remote web site. The details of that
authentication are going to vary with each remote web site you want to
connect to.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
have your CPU sitting
idle, rather than continuing with whatever code is waiting to be run?
I'm having a hard time understanding what problem you might be having
that some combination of setting the nice level and imposing resource
limits won't handle.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
imented with the very first bit of example code in the
documentation? What do you get if you do the following at the
interactive interpreter?
>>> from ctypes import *
>>> print windll.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
e can help you, including the
specific documentation of the DLL you're trying to wrap, your
platform, and python version. If you are not permitted to share those
things, we may not be able to give you much help. Ctypes is very
specific to the actual library you are accessing, and requires th
t for trying to explain python fundamentals in
several different ways. Sometimes explaining the same idea in
different words helps people understand the concept better.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
those arrays (what you're getting
from str(x_dates), etc) include the '...' in the middle instead of the
full contents.
Am I close?
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
the thread has been commenting on the OP's choice of
python version and operating system. That's not exactly on topic, but
the original question was answered in the very first response.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
writing to, why
bother? I know I certainly have no desire to spend any time at all on
your problem when you say things like that. Perhaps you're looking
for for the argument clinic instead?
http://www.youtube.com/watch?v=RDjCqjzbvJY
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
edia.org/wiki/Web_host
3 http://en.wikipedia.org/wiki/Virtual_private_server
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
;they" know this and provided
> all the complementary packages to circumvent this. It was
> in 199? (Python was not even born).
>
> Ditto for the foundries (Adobe, Linotype, ...)
I don't understand what any of this has to do with Python. Just
output your text in UTF-8 like any civilized person in the 21st
century, and none of that is a problem at all. Python make that easy.
It also makes it easy to interoperate with older encodings if you
have to.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
r code directly from the command line?
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
ls turned on so I can see the
alerts, even when they pop up in another screen.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
>
>
> > > (Among our points are such diverse elements as... wrong Pythons, but
> whatever.)
> >
> > > There's no official Python-Facebook module (afaik!!), but a quick web
> > > search for 'python facebook' should get you to the couple that I saw,
> > > and possibly others. The next question is, do
about doing it.
Can someone please put me in the right direction.
Thanks in advance,
--
Jerry Rocteur
je...@rocteur.com
Contact me: Google Talk/jerry.roct...@gmail.com, Skype/rocteur
--
http://mail.python.org/mailman/listinfo/python-list
guys don't use Facebook, you have a life ..
Can someone please point me in the right direction..
Thanks in advance,
Jerry
On Fri, Jun 22, 2012 at 4:28 PM, Jerry Rocteur wrote:
> Hi,
>
> I've done a bit of searching on this but I can find nothing really up to
> date and a
... a call of aa() somewhere in the body of bb
> ...
>
>
> Whatever the order of definition of aa and bb the problem remains, one of the
> two identifiers is not known ...
This works just fine in python, exactly as you've written it. What's
the actual problem yo
ly I've just seen "see other side", or (very occasionally) "see
reverse" and "see obverse".
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
ant "%A %p, %B %d".
That is, Full Weekday Name, followed by the AM/PM marker, then a
comma, then the Full Month Name and the day of month.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
unfindable on google? Certainly nothing on the first two pages of
google results for 'python codeblocks' jumps out at me as a python
module of that name.
Perhaps you would have better luck if you either post the actual code
you want people to critique, or posted a link to that code.
--
J
from http://www.gpg4win.org/download.html
>
> why ?
Probably because you opened the file in text mode, instead of binary
mode. Try opening the file this way:
f=open('c:\gpg4win-2.1.0.exe','rb')
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
h are not cheap applications.
X Servers for windows aren't expensive pieces of software anymore.
XMing is quite good, and free. Cygwin also has an X server, but
Cygwin always seems like too much of a hassle to me.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
the firefox window to pop up on the ssh server
machine if you allow it to interact with the desktop, assuming that's
what you're trying to do.
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
o another pages...etc)
>
> Did you look at Selenium?
> http://seleniumhq.org/
You might also be interested in Sikuli (http://sikuli.org/), which
uses Jython to write scripts to automate other programs using
screenshots. It's pretty neat if you need to automate a GUI that is
otherwise
magination. What would you do with such a thing?
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, Feb 23, 2012 at 2:34 PM, HoneyMonster wrote:
> On Thu, 23 Feb 2012 14:24:23 -0500, Jerry Hill wrote:
>> It's not two files, it's a hardlink. You can confirm by running ls -li
>> python* and comparing the inode numbers.
>
> You are spot on. Thank you, and s
hon2.7
> Files python and python2.7 are identical
> $
>
> I'm just curious: Why two identical files rather than a symlink?
It's not two files, it's a hardlink. You can confirm by running ls
-li python* and comparing the inode numbers.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
By the way, i like 1.exe, can i have it?
在 2012年2月18日 上午6:01,Jugurtha Hadjar 写道:
> On 16/02/2012 01:34, Jugurtha Hadjar wrote:
>
>> Hello gentlemen,
>>
>> I'm writing these words to give you a heads up. My computer has recently
>> been infected with "1.exe", and I am doing what I can to contain i
now what particular behavior a
subclass might need to override, so a lot of times people don't bother to
write their classes to check for subclasses being passed in, etc.
Since you haven't actually shown us any code, that's about all I can tell
you.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
ef, obj.myname)
If you're creating lots of instances of A and deleting them, it would
probably be worth removing the old weakrefs from the _instances set instead
of just ignoring them when calling update().
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
icrosoft.com/en-us/library/dd900818.aspx )
You could, in theory, make requests to Google just like a web browser
and parse the resulting HTML, but that tends to be fragile and prone
to break. I believe it also violates Google's Terms of Service.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
quot; you could end up
with three different answers: "H:\", "\\server\share\userdirectory",
or "C:\Documents and Settings\username" all seem like valid candidates
to me. Just going by HOMEPATH isn't going to be helpful if I were to
run your code though.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 472 matches
Mail list logo