Re: Segmentation fault (core dumped) while using Cplex Python API

2014-06-01 Thread Gary Herron
CPLEX not in Python, and I've never seen CPLEX mention mentioned in this Python newsgroup. None of which means you won't get an answer here, but I think a CPLEX specific forum would be a better bet. Gary Herron -- https://mail.python.org/mailman/listinfo/python-list

Re: can someone explain the concept of "strings (or whatever) being immutable"

2014-06-02 Thread Gary Herron
a different location. my question is what happens to the original string?? Is it still in memory somewhere, nameless? Thanks in advance, Yes, possibly, for a short while it will be nameless in memory somewhere. If nothing else is pointing to it, it will eventually be garbage coll

Re: Newbie: static typing?

2013-08-05 Thread Gary Herron
mic%20language%20and%20also%20a%20strongly%20typed%20language Gary Herron -- http://mail.python.org/mailman/listinfo/python-list

Re: How Do I get my Python script to attach multiple files and send as a single email

2013-08-08 Thread Gary Herron
tation examples). It's far, FAR, easier than rolling your message, especially when attachments are needed. Gary Herron -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Basic Doubt

2013-08-10 Thread Gary Herron
are important. Mostly, using "is" is inappropriate and will get you into compassions that depend on implementation details. For instance don't use "is" until you understand this: q:~> python3 Python 3.3.1 (default, Apr 17 2013, 22:32:14) [GCC 4.7.3] on linux Type &

Re: Python Basic Doubt

2013-08-10 Thread Gary Herron
On 08/10/2013 03:09 PM, Chris Angelico wrote: On Sat, Aug 10, 2013 at 10:48 PM, Gary Herron wrote: This is an oversimplification, but generally useful for all beginner (and most advanced) programmers: Don't use "is" for comparisons. Use "==". It 20 years of

Re: Python Basic Doubt

2013-08-10 Thread Gary Herron
On 08/10/2013 08:09 PM, Krishnan Shankar wrote: Thanks Tim, This takes me to one more question. 'is' operator is used to compare objects and it should not be used to compare data. So can it be compared with 'False'. i.e. Is this code possible if a is False: print 'Yes' if b is False:

Re: Python Basic Doubt

2013-08-10 Thread Gary Herron
On 08/10/2013 06:00 PM, Chris Angelico wrote: On Sun, Aug 11, 2013 at 1:42 AM, Gary Herron wrote: On 08/10/2013 03:09 PM, Chris Angelico wrote: _notpassed = object() def frob(appendage, device=_notpassed): """Use some appendage to frob some device, or None to frob noth

Re: Python Basic Doubt

2013-08-10 Thread Gary Herron
On 08/10/2013 08:43 PM, Chris Angelico wrote: On Sun, Aug 11, 2013 at 4:21 AM, Gary Herron wrote: On 08/10/2013 06:00 PM, Chris Angelico wrote: Wrong. If you do equality comparisons, it's entirely possible for something to be passed in that compares equal to the RHS without actually bei

Re: .split() Qeustion

2013-08-13 Thread Gary Herron
and does save a few characters, I think the original list is clearer to a reader of your program. Gary Herron -- http://mail.python.org/mailman/listinfo/python-list

Re: Encapsulation unpythonic?

2013-08-17 Thread Gary Herron
ect, encapsulates some kind of behavior. However, *hiding* the members of a class is not considered Pythonic. There is no private/public as in C++, however, there are way to achieve that effect. Gary Herron -- http://mail.python.org/mailman/listinfo/python-list

Python and mysql 3 tier programming

2013-08-21 Thread Gary Roach
ing about the same thing. My problem is mostly with the basic architecture of the system. I think I will be able to figure out the code. Also, any comments on the use of the Django framework for this project. Thanks in advance Gary R. -- http://mail.python.org/mailman/listinfo/python-list

Re: Setting the value of True

2013-08-23 Thread Gary Herron
On 08/23/2013 04:38 PM, jeangaw...@gmail.com wrote: Python allows you set the value of True True = 1.3 Now this is consistent with the decision to let you set the value of various builtin names. But why is this case different: None = 1.3 File "", line 1 SyntaxError: cannot assign to Non

Re: Python and mysql 3 tier programming

2013-08-25 Thread Gary Roach
e of the Django framework for this project. Hello Gary, Is your primary goal to write code or is it to have available to you a document archiving solution? If the latter, you will probably save time by using an existing system (e.g., Google Docs). If the former, I have a few thoughts. One, you should pr

Re: semicolon at end of python's statements

2013-08-29 Thread Gary Herron
ther you follow that argument or not, I hope you come to like Python's indentation eventually. Many (most?) of the rest of here have. Gary Herron -- Dr. Gary Herron Department of Computer Science DigiPen Institute of Technology (425) 895-4418 -- http://mail.python.org/mailman/listinfo/python-list

Re: Encapsulation unpythonic?

2013-08-31 Thread Gary Herron
ng names. But this has *nothing* at all to do with objects and encapsulation. Please don't confuse: the binding of names to objects and the existence of objects and their encapsulated behavior They are very different things. -- Dr. Gary Herron Department of Computer Science Dig

MySQL data types vs Django/Python data types

2013-09-01 Thread Gary Roach
figure out how to fix it. Any help will be sincerely appreciated. Gary R. -- http://mail.python.org/mailman/listinfo/python-list

Re: Send alt key to subprocess.PIPE stdin

2013-09-11 Thread Gary Herron
e byte stream, and do whatever it wants in response. By calling it a _command_, you seem to expect some particular behavior out of the receiving process. Please tell us *what* that might be, and we'll see what we can do to help out. Gary Herron -- Dr. Gary Herron Department of Com

django admin.py error

2013-09-19 Thread Gary Roach
/admin/ Django Version: 1.5.2 Exception Type: ImportError Exception Value: cannot import name membership Exception Location: /home/gary/ProgramFiles/mysite/mysite/admin.py in , line 4

Re: django admin.py error (solved)

2013-09-19 Thread Gary Roach
On 09/19/2013 11:56 AM, John Gordon wrote: In Gary Roach writes: On 09/19/2013 11:15 AM, John Gordon wrote: Does /home/gary/ProgramFiles/mysite/mysite/models.py define an object named 'membership'? Yes. The following is the top part of the models.py file: q class

Re: django admin.py error

2013-09-19 Thread Gary Roach
On 09/19/2013 11:15 AM, John Gordon wrote: In Gary Roach writes: Installation of the django admin.py package worked fine. But. when I tried to add my database to the admin page I get the following error: ImportError at /admin/ Does /home/gary/ProgramFiles/mysite/mysite/models.py

Re: Help me with Python please (picture)

2013-09-27 Thread Gary Herron
What were you trying to achieve? Since you are asking volunteers to help, it would be polite to take the time to explain things carefully. Gary Herron -- https://mail.python.org/mailman/listinfo/python-list

Re: Barcode printing

2013-09-29 Thread Gary Herron
package might offer the remaining functionality easily. Thanks for any pointers! jlc For creating PDFs from Python, consider: ReportLab: Open Source Python Libraries for PDF creation at http://www.reportlab.com/software/opensource/ I've used it successfully. Gary Herron --

Re: Image manipulation

2013-10-04 Thread Gary Herron
vided. Try again with a full description of what you want, and we'll try to provide a useful answer. Gary Herron -- https://mail.python.org/mailman/listinfo/python-list

Re: basic maze problem with turtle

2013-10-13 Thread Gary Herron
ified aesthetically pure, and hence far superior to any solution more mundane coders might produce. That was uncalled for. There is already too much Nikos-bashing and Nikos-basher-bashing (and so on) in this newsgroup without dredging up even more in this completely unrelated request. Gary H

Re: Testing BlockHosts

2013-10-17 Thread Gary Herron
t ask the authors of the application about using the application. Actual Python questions are welcome here and will probably generate answers. Gary Herron -- Dr. Gary Herron Department of Computer Science DigiPen Institute of Technology (425) 895-4418 -- https://mail.python.org/mailman/lis

Removing python django projects

2013-10-26 Thread Gary Roach
do not have the apt-get, aptitude tools that Debian makes available. My goal is to end up with a clean system ready for re installation of a development environment. Any help will be sincerely appreciated. Gary R. -- https://mail.python.org/mailman/listinfo/python-list

Re: Function for the path of the script?

2013-10-26 Thread Gary Herron
ndy. I've got os.path.dirname aliased to dn, so its dn(_code_file()) that I find myself reaching for fairly often... Huh? In what kind of a workflow are you running a python file without knowing *what* file you are runnung? Or am I just misinterpreting what this code does? Confused bu

Re: Removing python django projects

2013-10-27 Thread Gary Roach
On 10/27/2013 04:38 AM, rusi wrote: On Sunday, October 27, 2013 6:44:35 AM UTC+5:30, Gary Roach wrote: Hi In the process of trying to learn python, django, mysql and virtualenvwrapper, I have created two projects and a mess. How can I strip everything from a Debian, Wheezy, linux system. The

Setting up for python django development with Debian Linux

2013-10-28 Thread Gary Roach
, git, python-django file structure and installation order. Any help with straightening out my brain in this area will be sincerely appreciated. Gary R. -- https://mail.python.org/mailman/listinfo/python-list

Re: Help - Exercise Decision

2013-11-10 Thread Gary Herron
examples please. Gary Herron -- https://mail.python.org/mailman/listinfo/python-list

Re: Help - Exercise Decision

2013-11-10 Thread Gary Herron
On 11/10/2013 04:48 PM, Kennedy Salvino wrote: Em domingo, 10 de novembro de 2013 21h34min39s UTC-3, Gary Herron escreveu: On 11/10/2013 02:56 PM, kennedysalvino...@gmail.com wrote: I'm trying to make a ranking of 3 numbers and say which the greatest and consider whether there is

Re: Regex Python Help

2015-03-24 Thread Gary Herron
ntax for prints. Python2: print line # This is a statement Python3 print(line) # This is a procedure call -- Dr. Gary Herron Department of Computer Science DigiPen Institute of Technology (425) 895-4418 -- https://mail.python.org/mailman/listinfo/python-list

Re: Daylight savings time question

2015-03-24 Thread Gary Herron
...but I want numerically 5 hours later, because of Daylight Savings Time') main() Thanks! The pyzt module (which you've imported) has lots to say about this. Look at its procedures "localize' and 'normalize' and all the rest of the pyzt documentation. -- Dr.

Re: Supply condition in function call

2015-03-25 Thread Gary Herron
dition: def cond1(i,j,a,b): return i+j>4 and do test1(..., cond1) and if condition(i,j,a,b): -- Dr. Gary Herron Department of Computer Science DigiPen Institute of Technology (425) 895-4418 -- https://mail.python.org/mailman/listinfo/python-list

Re: PIL(LOW) - What am I missing?

2015-03-25 Thread Gary Herron
img = Image.new('1', (1024, 1280), 1) >>> imagedata = list(img.getdata()) >>> print len(imagedata) 1310720 -- Dr. Gary Herron Department of Computer Science DigiPen Institute of Technology (425) 895-4418 -- https://mail.python.org/mailman/listinfo/python-list

Re: xlwt 1.0.0 released!

2015-04-15 Thread Gary Herron
On 04/15/2015 02:51 PM, Chris Withers wrote: Hi All, I'm pleased to announce the release of xlwt 1.0.0. What a curiously incomplete announcement. Could you tell us what xlwt is? I see no hint here. Gary Herron This release contains the following: - Python 3 support. - An in

Re: Best GUI for Python

2015-04-26 Thread Gary Herron
rthy GUI programming libraries, and each of them is cross platform (as I required to develop on Linux, but deploy occasionally on Windows). -- Dr. Gary Herron Department of Computer Science DigiPen Institute of Technology (425) 895-4418 -- https://mail.python.org/mailman/listinfo/python-list

Re: Best GUI for Python

2015-04-26 Thread Gary Herron
On 04/26/2015 11:07 AM, Cecil Westerhof wrote: Op Sunday 26 Apr 2015 19:12 CEST schreef Gary Herron: On 04/26/2015 09:32 AM, Cecil Westerhof wrote: Op Sunday 26 Apr 2015 17:09 CEST schreef Steven D'Aprano: On Sun, 26 Apr 2015 11:02 pm, Cecil Westerhof wrote: I want to use a GUI for P

Re: l = range(int(1E9))

2015-04-30 Thread Gary Herron
9)) >>> l range(0, 100000) -- Dr. Gary Herron Department of Computer Science DigiPen Institute of Technology (425) 895-4418 -- https://mail.python.org/mailman/listinfo/python-list

Re: Try Except Specific Error Messages

2015-05-02 Thread Gary Herron
text = webpage.read().decode("utf8") except URLError as err: print("URLError: " + str(err)) How do I wrap urllib.request with try/except? -- Dr. Gary Herron Department of Computer Science DigiPen Institute of Technology (425) 895-4418 -- https://mail.python.org/mailman/listinfo/python-list

Re: anomaly

2015-05-10 Thread Gary Herron
t's still available as __builtins__.int (unless you've also overridden that). -- Dr. Gary Herron Department of Computer Science DigiPen Institute of Technology (425) 895-4418 -- https://mail.python.org/mailman/listinfo/python-list

Re: anomaly

2015-05-10 Thread Gary Herron
ing to define a concept called "keywords", I don't think you should allow them to be shadowed by a class definition. Mark Huh? Python has plenty of keywords, and indeed, none of them can be redefined or shadowed.But you would gain nothing (and lose a bit or dynamic-language

Re: anomaly

2015-05-12 Thread Gary Herron
quot; argument should drive *all* decisions is foolish. And disingenuous. -- Dr. Gary Herron Department of Computer Science DigiPen Institute of Technology (425) 895-4418 -- https://mail.python.org/mailman/listinfo/python-list

Re: use of subprocess module inside generator

2015-05-13 Thread Gary Herron
ith your workaround, since the assignment to stdout is preserved when done outside the function. I hope that helps. Gary Herron if opath is None: for line in stdout.splitlines(): yield line.strip() else: with open(opath) as f: for line in f:

Re: Rule of order for dot operators?

2015-05-16 Thread Gary Herron
m the dot operators from left to right or according to a rule of order (i.e., multiplication/division before add/subtract)? Yes, that's correct. Gary Herron Thank you, Chris Reimer -- Dr. Gary Herron Department of Computer Science DigiPen Institute of Technology (425) 895-4418 -- https://mail.python.org/mailman/listinfo/python-list

Re: I do not have access to the right _hierarchy.py source file

2015-05-17 Thread Gary Herron
re likely that that file is correct, and you are somehow misinterpreting its contents, but we can't even begin to guess until you show us its current content. Gary -- Dr. Gary Herron Department of Computer Science DigiPen Institute of Technology (425) 895-4418 -- https://mail.python.org/mailman/listinfo/python-list

Re: a more precise distance algorithm

2015-05-25 Thread Gary Herron
on? This is a statement about floating point numeric calculations on a computer,. As such, it does apply to Python which uses the underlying hardware for floating point calculations. Validity is another matter. Where did you find the quote? Gary Herron Any other thoughts? :D My imagini

Re: a more precise distance algorithm

2015-05-25 Thread Gary Herron
ll, but gives an exact zero instead. 0.0 The squaring of the two values in x*x+y*y just makes the addition even more error prone since the squares make large values even larger and small values even smaller. Gary Herron. -- Dr. Gary Herron Department of Computer Science DigiPen Institute of Tec

Re: Array of Functions

2015-05-26 Thread Gary Herron
On 05/26/2015 05:43 PM, richard_riehle wrote: I realized that I mentioned earlier that I found a solution to my original question, but that I never posted an example of the solution. So, here is a simplified example for anyone who is interested. def fArray(fselect, fparm = 1): def A

Re: Returning a custom file object (Python 3)

2015-05-27 Thread Gary Herron
gt;>> __builtins__.open = "whatever" >>> Python3: >>> import builtins >>> builtins.open = "whatever" >>> Of course doing so is like shooting yourself in the foot: Any subsequent pain is your own fault and probably well deserved. G

Re: Where is 'palindrome' defined?

2015-05-31 Thread Gary Herron
o line you have above). Then it will be defined, and calling parlindrome('...') will produce a result rather than an error. Gary Herron a '1234_' parlindrome(a) Traceback (most recent call last): File "", line 1, in parlindrome(a) NameError: nam

Re: Please help on this sorted function

2015-06-03 Thread Gary Herron
>>> sorted(d.values()) [123, 456] or the key/value tuples (called items) >>> sorted(d.items()) [('a', 123), ('b', 456)] but each of those attempts to sort could fail on a general dictionary if the individual keys or values are not sortable. Ther

Re: Keypress Input

2015-06-03 Thread Gary Herron
se (Tkinter and the curses module) are distributed with Python, so you should already have them installed. Gary Herron Other suggestions seemed to be overkill and confused me to due to my beginner level knowledge and the fact these suggestions have other, more complicated elements to them.

Re: Keypress Input

2015-06-03 Thread Gary Herron
se (Tkinter and the curses module) are distributed with Python, so you should already have them installed. Gary Herron Other suggestions seemed to be overkill and confused me to due to my beginner level knowledge and the fact these suggestions have other, more complicated elements to them.

Re: Multiple thread program problem

2015-06-04 Thread Gary Herron
- Traceback (most recent call last): File "./readfile1.py", line 19, in t=thread.start_new_thread(proc(f),()) TypeError: first arg must be callable You should probably also consider using the higher-level threading module rather than the lower level thread module. (Also consider us

Re: How to inverse a particle emitter

2015-06-04 Thread Gary Herron
I have no idea what "inverse" has to do with anything), but I won't waste my time doing so. If you take the time to carefully explain what you want, then I'm sure you will find plenty of people here who will take the time to answer you. Gary Herron -- https://mail.python.org/mailman/listinfo/python-list

Re: So what's happening here?

2015-06-05 Thread Gary Herron
ort numpy >>> a = numpy.array([1,2,3]) >>> id(a[1]) 28392768 >>> id(a[1]) 28409872 This produces two different view of the same underlying object. Gary Herron -- https://mail.python.org/mailman/listinfo/python-list

Re: So what's happening here?

2015-06-05 Thread Gary Herron
On 06/05/2015 06:39 AM, Todd wrote: On Fri, Jun 5, 2015 at 3:23 PM, Gary Herron <mailto:gary.her...@islandtraining.com>> wrote: On 06/05/2015 06:11 AM, Paul Appleby wrote: On Fri, 05 Jun 2015 14:55:11 +0200, Todd wrote: Numpy arrays are not lists, they

Re: Why this list of dictionaries doesn't work?

2015-06-18 Thread Gary Herron
person['name'] = 'jose' person['age'] = 12 people.append(person) Here's where you need to create the second one. person['name'] = 'kacey' person['age'] = 18 people.append(person) for person in people: print( person[&#

Re: Can anybody explain the '-' in a 2-D creation code?

2015-06-26 Thread Gary Herron
t same name: >>> _ = 123 >>> print(_) 123 >>> Gary Herron -- https://mail.python.org/mailman/listinfo/python-list

password authentication failed

2015-07-15 Thread Gary Roach
a postgres account in postgres or is Django supposed to do this with the migrate command. I feel like I am at a critical point where I can really screw things up and need some expert advise. This is my first time working with python / Django and am really shaky. I do have another learning project (rango) using SQLite that works fine. Gary R -- https://mail.python.org/mailman/listinfo/python-list

Re: password authentication failed

2015-07-16 Thread Gary Roach
On 07/15/2015 11:25 AM, Chris Angelico wrote: On Thu, Jul 16, 2015 at 3:13 AM, Gary Roach wrote: Every time I try to do a python manage.py migrate I get: django.db.utils.OperationalError: FATAL: password authentication failed for user "postgres" FATAL: password authentication faile

Re: Should non-security 2.7 bugs be fixed?

2015-07-18 Thread Gary Herron
On 07/18/2015 04:36 PM, Terry Reedy wrote: I would like more viewpoints from 2.7 users. I read that (incorrectly of course) and just had to ask: How do you intend to extract a viewpoint from that last 7/10 of a user? With apologies, Gary Herron -- Dr. Gary Herron Department of

Re: password authentication failed

2015-07-22 Thread Gary Roach
On 07/16/2015 04:53 PM, Chris Angelico wrote: On Fri, Jul 17, 2015 at 9:34 AM, Gary Roach wrote: On 07/15/2015 11:25 AM, Chris Angelico wrote: You should then be able to create a regular user, and grant appropriate permissions: postgres=# create user archives password 'traded-

Re: password authentication failed

2015-07-23 Thread Gary Roach
On 07/16/2015 04:53 PM, Chris Angelico wrote: On Fri, Jul 17, 2015 at 9:34 AM, Gary Roach wrote: On 07/15/2015 11:25 AM, Chris Angelico wrote: You should then be able to create a regular user, and grant appropriate permissions: postgres=# create user archives password 'traded-

Re: password authentication failed (SOLVED)

2015-07-24 Thread Gary Roach
On 07/22/2015 04:44 PM, Chris Angelico wrote: On Thu, Jul 23, 2015 at 9:35 AM, Gary Roach wrote: At this point, I'm confused about a few things. Does the postgresql server and my archivedb reside globally or are they inside my archivedb virtual environment. I think globally. Your vi

Improper Django Project error

2015-07-30 Thread Gary Roach
ex.html (Django 1.7) and home.html (Django 1.8) is the name changes. I have inserted print statements in the url tree to try debugging this but all the path information returned seems reasonable. Is this a bug in Ninja-IDE, Django 1.8 or is it something else. If you need more information, pl

Re: Improper Django Project error (solved)

2015-07-31 Thread Gary Roach
On 07/30/2015 11:15 PM, dieter wrote: Gary Roach writes: Being new to Django and Python, I have two projects setup side by side, each in it's own virtualenv wrapper. The twr_project is running Django 1.7, python 2.7 and is set up to duplicate the 'Tango With Rango' tutorial

Re: Improper Django Project error (solved)

2015-08-01 Thread Gary Roach
On 07/30/2015 11:15 PM, dieter wrote: Gary Roach writes: Being new to Django and Python, I have two projects setup side by side, each in it's own virtualenv wrapper. The twr_project is running Django 1.7, python 2.7 and is set up to duplicate the 'Tango With Rango' tutorial

Re: Is Django the way to go for a newbie?

2015-08-09 Thread Gary Roach
use to be a whiz at fortran, C and Xbase but haven't done anything since I retired. Good luck Gary R -- https://mail.python.org/mailman/listinfo/python-list

Lesson 39 of Learning Python the Hard Way hangs

2015-09-09 Thread Gary Roach
): """Deletes the given key from the Map.""" bucket = get_bucket(aMap, key) for i in xrange(len(bucket)): k, v = bucket[i] if key == k: del bucket[i] break def list(aMap): """Prints out what's in the Map.""" for bucket in aMap: if bucket: for k, v in bucket: print k, v Very frustrating and probably a stupid error. Any help will be sincerely appreciated. Gary R. -- https://mail.python.org/mailman/listinfo/python-list

Re: Lesson 39 of Learning Python the Hard Way hangs (Fixed?)

2015-09-09 Thread Gary Roach
On 09/09/2015 01:45 PM, John Gordon wrote: In Gary Roach writes: Traceback (most recent call last): File "/root/mystuff/mystuff/ex39_test.py", line 6, in hashmap.set(states, 'Oregon', 'OR') File "/root/mystuff/mystuff/hashmap.py", line

Re: Lesson 39 of Learning Python the Hard Way hangs

2015-09-09 Thread Gary Roach
On 09/09/2015 01:45 PM, John Gordon wrote: In Gary Roach writes: Traceback (most recent call last): File "/root/mystuff/mystuff/ex39_test.py", line 6, in hashmap.set(states, 'Oregon', 'OR') File "/root/mystuff/mystuff/hashmap.py", line

Re: Lesson 39 of Learning Python the Hard Way hangs (Fixed?)

2015-09-09 Thread Gary Roach
On 09/09/2015 01:45 PM, John Gordon wrote: In Gary Roach writes: Traceback (most recent call last): File "/root/mystuff/mystuff/ex39_test.py", line 6, in hashmap.set(states, 'Oregon', 'OR') File "/root/mystuff/mystuff/hashmap.py", line

Errors installing xmiparser with Python 3.4 and windows - any help?

2015-10-09 Thread Gary Hanyzewski
s the trick? if not any pointers on what I can do to get it to go. Are there any other xmi parsers or tools? Thanks Gary Error output below -- >python setup.py install running install running bdist_egg running egg_info writing entry points to xmiparser.egg-info\entry_points.txt

Re: Errors installing xmiparser with Python 3.4 and windows - any help?

2015-10-10 Thread Gary Hanyzewski
Laura, Thanks for the pointer to PyXB, I think this will work for my purposes and it appears to be Python 3.4 / Windows compatible. Thank you to all who helped. On Friday, October 9, 2015 at 1:14:32 PM UTC-5, Laura Creighton wrote: > In a message of Fri, 09 Oct 2015 10:24:34 -0700, G

Pyvenv use

2015-10-15 Thread Gary Roach
n.py loads the bin, include and lib directories into the project instead of the normal django setup. django 1.8 Debian 8 (jessie) OS python 3.4 Any help will be sincerely appreciated. Gary R. -- https://mail.python.org/mailman/listinfo/python-list

Re: Why won't this run?

2015-11-16 Thread Gary Herron
) lines to print(...) (without the colon) and try again. If there is further trouble, ask another question, but please cut and paste the actual and *exact* results into the email. Gary Herron -- Dr. Gary Herron Department of Computer Science DigiPen Institute of Technology (425) 895-4418 -- https://mail.python.org/mailman/listinfo/python-list

Re: Is this sort of a constraint implementable in Python?

2014-06-10 Thread Gary Herron
han a Python question. (Or rather a question about some Python/Cplex interface.) Do you have access to any kind of a CPLEX forum or a Cplex-via-Python forum? I think that's much more likely to get you an answer. Luck, Gary Herron -- https://mail.python.org/mailman/listinfo/python-list

Re: how to check if a value is a floating point or not

2014-06-18 Thread Gary Herron
string ... Gary Herron -- https://mail.python.org/mailman/listinfo/python-list

Re: python 3.44 float addition bug?

2014-06-20 Thread Gary Herron
lways been there. See https://docs.python.org/2/tutorial/floatingpoint.html for more details. Gary Herron fresh install of https://www.python.org/ftp/python/3.4.1/python-3.4.1.amd64.msi and a fresh install of https://www.python.org/ftp/python/2.7.7/python-2.7.7.amd64.msi to compare it to.

Re: python 3.44 float addition bug?

2014-06-20 Thread Gary Herron
On 06/20/2014 06:11 PM, FraserL wrote: Ok I've seen https://docs.python.org/2/tutorial/floatingpoint.html now thanks to Yhg1s on #python I bet you get this kind of thing a lot, sorry :-/ Yes, often, but it's not a problem. :-) FraserL wrote in news:XnsA35313E634BA0fraserlonggmailcom34@21

Re: Multiprocessing question

2014-07-13 Thread Gary Herron
. So you have to ask yourself: What do you gain from using Python if you eliminate all the tools Python provides? Gary Herron - Paul S. LaFollette, Jr CIS Department Temple University +1 215 204 6822 paul.lafolle...@temple.edu <mailto:paul.lafolle...@tem

Re: ISO8583

2014-07-15 Thread Gary Herron
583 module. Do you know how to contact the developers of the ISO8583 package? Gary Herron If I send it incorrect parameter, the server will reply but if I send it correctly, the server didn't response. The original client is in java using ISOMUX, I have been trying to use the pyMux

Re: Distributing python applications as a zip file

2014-07-22 Thread Gary Herron
n!!! It's not quite self-contained, as you still need to have Python installed, but otherwise it's a good way to distribute a Python application as a single file that users can just copy and run. Really! 20 years of Pythoning, and I'd never seen this! When was this introduced?

Re: What meaning of this ""hello %s you are %s years old" % x"

2014-07-27 Thread Gary Herron
ou are just learning Python, you should probably use the *newer* formatting operations. See https://docs.python.org/3.3/library/string.html#formatspec for details of that. Gary Herron -- https://mail.python.org/mailman/listinfo/python-list

Re: reading text files with indentation

2014-07-28 Thread Gary Herron
for line in lines: line = re.sub("#.*", "", line) line = line.strip() The *strip* method on strings removes all whitespace from both ends. There goes your indentation. policy_lines.append(line) print line Cheers Example: >&g

Easiest Way to Do Cross-Platform DB Access (Oracle)

2014-08-19 Thread Gary Furash
I need to be able to access Oracle from both Windows and *nix, however, it seems kind of tortuous getting everything working each time on each server. With Java I can just drop (usually the same) JDBC library files in a location and everything works. I'm sure there's some easier way of doing thi

Re: Challenge to convert a simple IDL code into Python

2014-08-24 Thread Gary Herron
e. Please cut and paste. Second, saying it doesn't work us useless. Please tell us what the code is supposed to do, and what it actually does, what you expected... If there is output, cut and paste it. If there is an error traceback, cut and paste it. While you are at it, tell u

Re: Convert 3d NumPy array into 2d

2014-08-27 Thread Gary Herron
1440) >>> a.shape = (480,1440) >>> a.shape (480, 1440) Gary Herron -- https://mail.python.org/mailman/listinfo/python-list

Re: face detection

2014-09-22 Thread Gary Herron
programming language). I'm not sure where you would find information about face detection, but I'm sure you could find a better forum with a little searching. Gary Herron -- Dr. Gary Herron Department of Computer Science DigiPen Institute of Technology (425) 895-4418 -- https://mail.

Re: how to parse standard algebraic notation

2014-09-30 Thread Gary Herron
ed: x**2 ? or perhaps x^2 ? or something else like some Unicode characters or HTML to get a small superscript 2 above an x. Once you give an example of what your input looks like, we can start hashing out how to read it. Gary Herron -- Dr. Gary Herron Department of Computer Science DigiP

Re: How to select every other line from a text file?

2014-10-13 Thread Gary Herron
you know how to test for evenness? (Use count%2 will be zero for even count values.) * Do you know how to write lines to an output file? Gary Herron -- https://mail.python.org/mailman/listinfo/python-list

Re: Creating a counter

2014-10-15 Thread Gary Herron
unter, '\r', # The ending comma means do NOT output the usual \n Python3: print(counter, end='\r') Gary Herron -- https://mail.python.org/mailman/listinfo/python-list

Re: How do I automate the removal of all non-ascii characters from my code?

2011-09-12 Thread Gary Herron
On 09/12/2011 12:49 AM, Alec Taylor wrote: Good evening, I have converted ODT to HTML using LibreOffice Writer, because I want to convert from HTML to Creole using python-creole. Unfortunately I get this error: "File "Convert to Creole.py", line 17 SyntaxError: Non-ASCII character '\xe2' in file

Re: how to make a nested list

2011-09-15 Thread Gary Herron
st an internal loop for filling an array) is probably more efficient, certainly less code, and arguably more Pythonic. A = [ [None,None] for i in range(1000) ] Gary Herron -- Gary Herron, PhD. Department of Computer Science DigiPen Institute of Technology (425) 895-4418 -- http://mail.python.org/mailman/listinfo/python-list

Re: help regarding extracting a smaller list from larger one

2011-09-15 Thread Gary Herron
t; a[3:6] array([3, 4, 5]) If you mean something else, please be more specific, and we'll try again. Gary Herron -- Gary Herron, PhD. Department of Computer Science DigiPen Institute of Technology (425) 895-4418 -- http://mail.python.org/mailman/listinfo/python-list

Re: help regarding extracting a smaller list from larger one

2011-09-15 Thread Gary Herron
On 09/15/2011 11:55 AM, neeru K wrote: Dear Gary, thank you for the reply. I will be more specific and take the same example that you have given and tell you what is my problem - array([0.0, 1.3, 2.45, 3.87, 4.54, 5.11, 6.90, 7.78, 8.23, 9.01]) from this array I want to a sub-list with lower

Re: way to calculate 2**1000 without expanding it?

2011-09-16 Thread Gary Herron
: sum(map(int,str(2**1000))) 1366 Here's another one-liner using a generator instead of map: sum(int(c) for c in str(2**1000)) Gary Herron -- Gary Herron, PhD. Department of Computer Science DigiPen Institute of Technology (425) 895-4418 -- http://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4   5   6   7   8   9   10   >