Re: Embedding Python: estimate size of dict/list

2011-03-28 Thread Jerry Hill
ts, you should be all set. -- Jerry -- http://mail.python.org/mailman/listinfo/python-list

Re: Embedding Python: estimate size of dict/list

2011-03-28 Thread Jerry Hill
're right. I completely missed that bit when I was looking at the documentation. -- Jerry -- http://mail.python.org/mailman/listinfo/python-list

Re: Python program termination and exception catching

2011-04-10 Thread Jerry Hill
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

Re: How best to convert a string "list" to a python list

2011-05-13 Thread Jerry Hill
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

Re: Deleting a file?

2011-05-16 Thread Jerry Hill
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

Re: if statement on lenght of a list

2011-05-17 Thread Jerry Hill
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

Re: float("nan") in set or as key

2011-06-01 Thread Jerry Hill
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

Re: [Tutor] beginning to code

2017-09-20 Thread Jerry Hill
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() >>&

Re: Finding keyword arguments in the documentation

2017-09-26 Thread Jerry Hill
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

Re: replacing `else` with `then` in `for` and `try`

2017-11-02 Thread Jerry Hill
ure language at this point, I don't expect that it will ever change. -- Jerry -- https://mail.python.org/mailman/listinfo/python-list

Re: Can't Uninstall !

2018-02-13 Thread Jerry Hill
- "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

python: server is not receiving input from client flask

2021-06-28 Thread Jerry Thefilmmaker
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

Re: python: server is not receiving input from client flask

2021-06-28 Thread Jerry Thefilmmaker
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

Re: python: server is not receiving input from client flask

2021-06-29 Thread Jerry Thefilmmaker
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

Re: python: server is not receiving input from client flask

2021-06-29 Thread Jerry Thefilmmaker
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

Re: Why don't we call the for loop what it really is, a foreach loop?

2016-09-13 Thread Jerry Hill
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

Re: how to evaluate a ast tree and change Add to Multiply ?

2016-10-19 Thread Jerry Hill
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

Re: Missing python36.dll

2018-03-19 Thread Jerry Hill
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

Re: Python Console Menu

2018-07-31 Thread Jerry Hill
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

Re: Problem using pip

2020-01-14 Thread Jerry Hill
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

Re: efficient 'tail' implementation

2005-12-08 Thread Jerry Sievers
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 -- ----

Why Tcl/Tk?

2005-07-27 Thread Jerry He
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

functions without parentheses

2005-07-28 Thread Jerry He
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

installing SWIG for python

2005-08-06 Thread Jerry He
, 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

Installing/Using SWIG for python again

2005-08-06 Thread Jerry He
>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

SWIG again

2005-08-06 Thread Jerry He
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 _

re:SWIG again

2005-08-06 Thread Jerry He
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

Re: SWIG again

2005-08-07 Thread Jerry He
;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

Is there a way of executing a command in a string?

2005-08-09 Thread Jerry He
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

distutils on Win32 using .NET Framework SDK

2005-08-14 Thread Jerry He
: 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!

Re: Closing files

2004-11-28 Thread Jerry Sievers
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

Re: PyQt on a Server

2004-11-29 Thread Jerry Sievers
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

slicing, mapping types, ellipsis etc.

2004-11-29 Thread Jerry Sievers
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

Re: slicing, mapping types, ellipsis etc.

2004-11-29 Thread Jerry Sievers
o object of mapping types Thank you -- --- Jerry Sievers 305 854-3001 (home) WWW ECommerce Consultant 305 321-1144 (mobil

Re: using os

2004-11-29 Thread Jerry Sievers
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

Re: comment out more than 1 line at once?

2004-11-30 Thread Jerry Sievers
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

Re: PyQt on a Server

2004-12-03 Thread Jerry Sievers
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

Re: Need help on program!!!

2004-12-03 Thread Jerry Sievers
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

flex/bison like module in Python?

2004-12-15 Thread Jerry Sievers
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

Re: Easy "here documents" ??

2004-12-19 Thread Jerry Sievers
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. -- ---

project

2004-12-30 Thread jerry wise
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

Re: Python to c++ conversion problem

2005-03-23 Thread Jerry Coffin
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

Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?

2013-12-04 Thread Jerry Hill
, 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

Re: Copy a file like unix cp -a --reflink

2013-12-18 Thread Jerry Hill
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

Re: how to develop code using a mix of an existing python-program and console-commands

2013-12-18 Thread Jerry Hill
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

Re: How to make a tkinter GUI work on top of a CUI program?

2014-01-03 Thread Jerry Hill
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

Re: [OT] Usage of U+00B6 PILCROW SIGN (was: generator slides review and Python doc (+/- text bug))

2014-02-04 Thread Jerry Hill
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

Re: Text input with keyboard, via input methods

2016-03-10 Thread Jerry Hill
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

help with program

2016-03-26 Thread Jerry Martens
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

Re: html page mail link to webmail program

2014-11-12 Thread Jerry Hill
;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

Suds Python 2.4.3 Proxy

2014-11-29 Thread Jerry Rocteur
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

Trying to parse matchup.io (lxml, SGMLParser, urlparse)

2015-01-18 Thread Jerry Rocteur
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

Formatting string with accented characters for printing

2015-01-18 Thread Jerry Rocteur
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

Re: Simple Object assignment giving me errors

2014-02-12 Thread Jerry Hill
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

Re: Win32 Write RAW Physical Disk Python 3.3.2

2014-02-21 Thread Jerry Hill
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

Re: posting code snippets

2014-02-27 Thread Jerry Hill
an/listinfo/python-ideas) before opening an issue on the bug tracker. -- Jerry -- https://mail.python.org/mailman/listinfo/python-list

Re: Reference

2014-03-03 Thread Jerry Hill
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

Re: Reference

2014-03-04 Thread Jerry Hill
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

Re: Joining centos 6.5 member Domain Controller to an existing Windows Domain

2014-05-06 Thread Jerry Hill
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

Re: The “does Python have variables?” debate

2014-05-07 Thread Jerry Hill
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

Re: Error while calling round() from future.builtins

2014-05-10 Thread Jerry Hill
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 -

Re: PEPs should be included with the documentation download

2013-08-21 Thread Jerry Hill
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. --

Re: subprocess.Popen instance hangs

2013-08-30 Thread Jerry Hill
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

Re: Python GUI?

2013-09-12 Thread Jerry Hill
in trouble. Drag and drop layout tools exist for all of your proposed systems. -- Jerry -- https://mail.python.org/mailman/listinfo/python-list

Re: Automation of Windows app?

2015-03-20 Thread Jerry Hill
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

What is elegant way to do configuration on server app

2015-03-26 Thread Jerry OELoo
equirement? Thanks! Best Regards Jerry -- Rejoice,I Desire! -- https://mail.python.org/mailman/listinfo/python-list

Re: What is elegant way to do configuration on server app

2015-03-27 Thread Jerry OELoo
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

Re: Anyone used snap.py for drawing a graph?

2015-04-13 Thread Jerry Hill
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

Re: What means "->"?

2015-04-28 Thread Jerry Hill
n accepted, my impression is that it's still a work in progress). -- Jerry -- https://mail.python.org/mailman/listinfo/python-list

Re: Need Help w. Getting the Eclipse Python Add-On.

2015-07-17 Thread Jerry Hill
e looking for PyDev: http://www.pydev.org/ -- Jerry -- https://mail.python.org/mailman/listinfo/python-list

Confused with Functions and decorators

2014-07-19 Thread Jerry lu
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():

Re: Confused with Functions and decorators

2014-07-19 Thread Jerry lu
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

Re: Confused with Functions and decorators

2014-07-19 Thread Jerry lu
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

Re: Confused with Functions and decorators

2014-07-19 Thread Jerry lu
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

Re: Confused with Functions and decorators

2014-07-19 Thread Jerry lu
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

Re: Question about Pass-by-object-reference?

2014-07-22 Thread Jerry Hill
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

Re: .Net Like Gui Builder for Python?

2014-07-25 Thread Jerry Hill
'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

Re: NumPy, SciPy, & Python 3X Installation/compatibility issues

2014-09-23 Thread Jerry Hill
on you're using. -- Jerry -- https://mail.python.org/mailman/listinfo/python-list

Re: How to mix-in __getattr__ after the fact?

2011-10-28 Thread Jerry Hill
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

The python implementation of the "relationships between classes".

2011-11-10 Thread Jerry Zhang
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

Re: The python implementation of the "relationships between classes".

2011-11-10 Thread Jerry Zhang
/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

Re: The python implementation of the "relationships between classes".

2011-11-10 Thread 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 __init__(self): > > self.com1 = Cls_a() > > def __del__(se

Re: The python implementation of the "relationships between classes".

2011-11-10 Thread Jerry Zhang
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

Re: Agent-based modeling

2011-11-10 Thread Jerry Zhang
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

Re: The python implementation of the "relationships between classes".

2011-11-10 Thread Jerry Zhang
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

Re: The python implementation of the "relationships between classes".

2011-11-10 Thread Jerry Zhang
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

Re: The python implementation of the "relationships between classes".

2011-11-10 Thread Jerry Zhang
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. > > > /*--

Re: The python implementation of the "relationships between classes".

2011-11-10 Thread Jerry Zhang
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

Re: The python implementation of the "relationships between classes".

2011-11-10 Thread Jerry Zhang
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

Re: Working with databases (ODBC and ORMs) in Python 3.2

2011-11-10 Thread Jerry Zhang
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

Re: The python implementation of the "relationships between classes".

2011-11-10 Thread Jerry Zhang
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

Re: String splitting by spaces question

2011-11-23 Thread Jerry Hill
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

Re: Can I submit an issue with Python 2.5.6?

2011-11-29 Thread Jerry Hill
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

Re: Py and SQL

2011-11-30 Thread Jerry Hill
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

Re: Python horks on WinXP path names

2011-12-08 Thread Jerry Hill
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

Re: tracking variable value changes

2011-12-08 Thread Jerry Hill
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

Re: Upgraded Ubuntu -> 11.10, Python -> 2.7.2. Now psyco doesn't work?

2011-12-20 Thread Jerry Hill
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

Re: Type object returned by the re.compile function

2011-12-27 Thread Jerry Hill
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

Re: Please don't use "setuptools", the "rotten .egg" install system.

2012-01-18 Thread Jerry Hill
#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

Re: import in Python3.3

2013-03-26 Thread Jerry Hill
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

<    1   2   3   4   5   >