ts, you should be all set.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
're right. I completely missed that bit when I was looking at
the documentation.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
to look at this bug:
http://bugs.python.org/issue1230540. It describes a problem with
replacing sys.excepthook when using the threading module, along with
some workarounds.
There's a simple example of replacing excepthook here:
http://code.activestate.com/recipes/65287/
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
oing it?
Strings have a split method, which splits the string into a list based
on a delimiter, like this:
>>> x = "red;blue;green;yellow"
>>> color_list = x.split(";")
>>> print color_list
['red', 'blue', 'green', 'yellow']
That's how I'd do it.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
s/send-files-to-trash-on-all-platforms.htm)
The source code looks pretty straightforward, but I don't think
there's anything in the standard library that does that.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
and value.__len__() != 19:
>
>
This should use an "or" test, not "and". And is probably better written as:
if not isinstance(value, list) or len(value) != 19:
That would allow for subclasses of list, assuming that would be okay.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
the best performance in most common
situations, so they end up being the default, but if you want to use
something different, it's usually not hard to do.
--
Jerry
--
http://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()
>>&
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
ure language at this point, I don't expect that
it will ever change.
--
Jerry
--
https://mail.python.org/mailman/listinfo/python-list
- "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
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
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
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 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
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
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
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
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
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
split that chunk into lines and now output the last 3
or however many you need.
If the read fails to hold enough lines, seek back a bit further and do
same but you'll have to be prepared to concat the second and Nth last
chunks together.
Have fun
--
----
I'm a little curious, why does most scripting
languges(i.e. python and ruby) use Tcl/Tk rather than
wx or Fox as its standard GUI? Although I did notice
that the Vpython IDE that uses Tkinker starts up a lot
faster than the DrPython IDE that uses wxpython. But
that makes no sense, Tk is based on Tc
Hi,
Is it possible to create a function that you can use
without parenthesizing the arguments? for example, for
def examine(str):
.
.
Is there some way to define it so that I can call it
like
examine "string"
instead of examine("string")?
thank
, and much less Tcl_Append, what
does this have to do with Tcl?
Any help or suggestions on this would be
appreciated...
-Jerry
example_wrap.o:example_wrap.c:(.text+0x1cb3):
undefined reference to `strlen'
example_wrap.o:example_wrap.c:(.text+0x1ccf):
undefined reference
>From Jerry He:
>For the third one however
>ld -shared example.o example_wrap.o -o
_example.so
>It gave me a long list of errors listed at the end of
>this email.
Ok, I managed to get rid of the weird Tcl_Append, and
strlen error messages, but right now I'm left with
und
n('example', \ ['example.c',
'example_wrap.c'])] )
I put it in the same directory as the extension files
and I ran from the command line
python setup.py install,
and nothing happened...
Someone help me!!
-Jerry
_
y
useless module.
Can you tell me how to completely remove that module?
thanks in advance,
-Jerry
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--
http://mail.python.org/mailman
;example.py" and the "build" folder?
(note: I didn't do "python setup install", I did
"python setup build", so all I have is the above two
things in the sourcefile folder. )
--
Jerry
Sta
Hi,
suppose I have the following string
cmdstr = "b = lambda s: s*s"
Is there a way to execute this string other than
copying it onto a file and then importing it?
thanks in advance,
Jerry
__
Do You Yahoo!?
Tired of spam? Yahoo
: The .NET Framework SDK needs to be installed
before building extensions for Python." (I also did
try restarting my computer)
Does anyone know how to make the .NET Framework SDK
visible to Python?
thanks in advance,
-Jerry
__
Do You Yahoo!
fun;
while True:
file('/tmp/foo')
I bet this runs forever and you don't run out of open file descriptors
:-)
[+]
>
> Thanks,
> Henrik Holm
--
---
Jerry Sievers 305 854-3001 (home) WWW ECommerce Consultant
305 321-1144 (mobilehttp://www.JerrySievers.com/
--
http://mail.python.org/mailman/listinfo/python-list
for a shared lib r-x is typical.
HTH
>
> Bob
>
> --
> Bob Parnes
> [EMAIL PROTECTED]
--
---
Jerry Sievers 305 854-3001 (home) WWW ECommerce Consultant
305 321-1144 (mobilehttp://www.JerrySievers.com/
--
http://mail.python.org/mailman/listinfo/python-list
on how this is used and/or pointer to more reading is
greatly appreciated.
Thanks
--
---
Jerry Sievers 305 854-3001 (home) WWW ECommerce Consultant
305 321-1144 (mobilehttp
o object of mapping types
Thank you
--
---
Jerry Sievers 305 854-3001 (home) WWW ECommerce Consultant
305 321-1144 (mobil
from os import listdir
from os.path import isdir
dir = '/tmp/'
onlyDirs = filter(lambda entry: isdir(dir + entry), listdir(dir))
HTH
--
-------
Jerry Sievers 305 854-3001 (home) WWW ECommerce Consultant
d I get;
def foo():
HTH
--
-------
Jerry Sievers 305 854-3001 (home) WWW ECommerce Consultant
305 321-1144 (mobilehttp://www.JerrySievers.com/
--
http://mail.python.org/mailman/listinfo/python-list
config file?
--
---
Jerry Sievers 305 854-3001 (home) WWW ECommerce Consultant
305 321-1144 (mobilehttp://www.JerrySievers.com/
--
http://mail.python.org/mailman/listinfo/python-list
to make it look like done by a stressed out student.
HTH
--
-------
Jerry Sievers 305 854-3001 (home) WWW ECommerce Consultant
305 321-1144 (mobilehttp://www.JerrySievers.com/
--
http://mail.python.org/mailman/listinfo/python-list
hough complex they are general purpose and very
useful.
I am trying to avoid having to do the lexer/parser part in C if
possible.
Thanks.
--
---
Jerry Sievers 305 854-3001 (home) WWW ECommerce Consultant
ls(), locals())
foo()
--
Now all else that we need to make this pretty would be macros, a la
cpp m4 or similar
define(`VARS', `multiDict(locals(), globals())')
print "..." % VARS
You get the idea.
--
---
I need some help on a project. I've never used python, and basically what I want to do is have a program where I can bang small wav or mp3 files together end to end. I want to be able to select say 10 files and have the program come up with all the possible combinations of those ten to be saved on
a string so it outputs an error
> because of not taking enum as a parameter
>
> How can I change string to enum in c++?
The most obvious way would be to use an std::map of strings and the
enum that's equivalent to each.
--
Later,
Jerry.
The universe is a figment of i
, 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
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
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
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
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
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
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
;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
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
[email protected]
--
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
nting nam[num].encode('utf-8') perhaps I
have to convert it first ?
Can someone please help.
Thanks
--
Jerry Rocteur
[email protected]
--
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
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
an/listinfo/python-ideas) before opening
an issue on the bug tracker.
--
Jerry
--
https://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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
-
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.
--
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
in trouble.
Drag and drop layout tools exist for all of your proposed systems.
--
Jerry
--
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
equirement?
Thanks!
Best Regards
Jerry
--
Rejoice,I Desire!
--
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
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
n accepted, my impression is that it's still a work in progress).
--
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
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():
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 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
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 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
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
'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
on you're
using.
--
Jerry
--
https://mail.python.org/mailman/listinfo/python-list
o be able to delegate the special attribute
access from the class to the instance somehow, but I couldn't figure
out how to do it in a few minutes of fiddling at the interpreter.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
Greetings:
As you know, there are several kinds of relationships between classes in
the UML -- dependency, association, aggregation, composition.
Q1. Is there any article or code example on its implementation in python?
Q2. For example, in composition model, the container object may be
responsible
/10 Chris Angelico
> On Fri, Nov 11, 2011 at 12:15 AM, Jerry Zhang
> wrote:
> > For example, in composition model, the container object may be
> responsible
> > for the handling of embedded objects' lifecycle. What is the python
> pattern
> > of such implementatio
2011/11/10 Chris Angelico
> On Fri, Nov 11, 2011 at 12:58 AM, Jerry Zhang
> wrote:
> > Cls_a:
> > def __init__(self):
> > self.at1 = 1
> > Cls_b:
> > def __init__(self):
> > self.com1 = Cls_a()
> > def __del__(se
2011/11/10 Jerry Zhang
>
>
> 2011/11/10 Chris Angelico
>
>> On Fri, Nov 11, 2011 at 12:58 AM, Jerry Zhang
>> wrote:
>> > Cls_a:
>> > def __init__(self):
>> > self.at1 = 1
>> > Cls_b:
>> > def __ini
2011/11/10 Virgil Stokes
> Python seems like a good language to use for agent-based modeling.
> However, before starting to work on a Python package for this, I would be
> very interested in knowing about any existing Python code for agent-based
> modeling.
>
I am assuming you are talking about
2011/11/11 Tim Wintle
> On Thu, 2011-11-10 at 22:25 +0800, Jerry Zhang wrote:
> >
> >
> > 2011/11/10 Chris Angelico
> > On Fri, Nov 11, 2011 at 12:58 AM, Jerry Zhang
> > wrote:
> > > Cls_a:
> > > def
2011/11/11 Christian Heimes
> Am 10.11.2011 17:09, schrieb Tim Wintle:
> >> Meanwhile, I have a ZODB running, which stores all the living
> >> objects.
> >
> > The ZODB is append only and stores all objects. Deleting references to
> > an object (which would causes deletion of standard python obje
2011/11/11 Benjamin Kaplan
> On Thu, Nov 10, 2011 at 1:06 PM, Jerry Zhang
> wrote:
> >
> >
> > I just did an example code to describe what i am looking for.
> >
> /*--
2011/11/11 Terry Reedy
> On 11/10/2011 9:31 AM, Jerry Zhang wrote:
>
> Unfortunately there is a difference between composition and
>>aggregation in my real word, and my application really care this
>>since it is trying to simulate this real world model, so m
2011/11/11 Chris Angelico
> On Fri, Nov 11, 2011 at 10:14 AM, Chris Kaynor
> wrote:
> > Continuing this OT discussion, would it be a brain transplant, or a
> > full body transplant?
>
> It's just a rebinding. You don't move the body, you just bind your
> name to a new body. It's perfectly legal
2011/11/11 [email protected]
> We are in the process of trying to decide between Python 2.7 and 3.2
> with a view to making a 5-10 year commitment to the right platform,
> and would appreciate some guidance on how best to connect to SQL
> databases in 3.2. ceODBC 2.01 provides an ODBC driver for
d code.
What i am looking for is the Code_one example, i thought many OOP
application designer may have met this issue, so a good Code_one reference
is the best choice to start this project.
2011/11/11 Jerry Zhang
>
>
> 2011/11/11 Chris Angelico
>
>> On Fri, Nov 11, 2011 at 10:14
n32
>>> import shlex
>>> s = "This is an 'example string'"
>>> shlex.split(s)
['This', 'is', 'an', 'example string']
>>>
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
e,
and asking if they accept patches directly, since there will be no further
maintenance from the core python developers. I have no idea how difficult
it would be to do that, or if there's any interest in accepting patches
against python 2.5 at google.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
alog box asking the user to enter a
value for that variable? That isn't going to happen in python. That's a
function of the database IDE you use. You'll need to use python to ask the
user for the privilege level, then substitute it into the sql yourself.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, Dec 8, 2011 at 3:16 PM, Eric wrote:
> I'm running Python 2.7 on WinXP (ActiveState community version) and
> when I try to do this:
>
> if __name__ == '__main__':
>root = Tkinter.Tk()
>root.withdraw()
>fileNames = tkFileDialog.askopenfilenames()
>root.destroy()
>print f
ther than numpy arrays or classes.
>
No, there is not. You would need to use a mutable data type, and float is
not mutable (neither are ints or strings).
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
in a branch but it needs finishing."
That's the most recent news item on the home page, and it's dated July
16, 2010, about a year and a half ago.
I don't think psyco supports python 2.7.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
ction (
http://docs.python.org/library/functions.html#type ). Particularly,
instead of inspecting reo.__class__ in your example above, you can
print out type(reo).
At a guess, those objects are missing the __class__ attribute,
possibly because they are old style classes.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
#x27;t exactly where it wants them. Since
> "setuptools" is non-standard, it has to be installed before
> installing other things.
>
Please don't use any projects that are built with "setuptools" or "easy"
installation systems. Problem solved.
--
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
101 - 200 of 472 matches
Mail list logo