[linked lists] Newbie - chapter 19 in "How to think like a CS in python"

2005-07-14 Thread Philip
Hi, I'm reading "How to think like a computer scientist in python". So far, it's been smooth sailing, but the final exercise in chapter 19 really has me stumped. Is it just me, or did this book get very difficult, very quickly? It says: "As an exercise, write an implementation of the Priority Queu

Re: fcntl and siginfo_t in python

2009-04-30 Thread Philip
> > Any ideas? Try "SIGRTMIN+1", per http://souptonuts.sourceforge.net/code/dnotify.c.html Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: fcntl and siginfo_t in python

2009-05-06 Thread Philip
ight now I just use the fd, into a > dictionary and pass it to the python callback handler function? Maybe > there might be some more suggestions to what data structures to use, > so I'm open right now to any of them. Could we have a look at your working prototype? Philip J.

Re: Shared memory python between two separate shell-launched processes

2011-02-11 Thread Philip
. "/my_shared_memory". Note that there's a module called sysv_ipc which is a close cousin of posix_ipc. I'm the author of both. IMO POSIX is easier to use. Cheers Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Unit testing multiprocessing code on Windows

2011-02-17 Thread philip
Quoting Matt Chaput : Does anyone know the "right" way to write a unit test for code that uses multiprocessing on Windows? The problem is that with both "python setup.py tests" and "nosetests", when they get to testing any code that starts Processes they spawn multiple copies of the testi

Re: pycopg2 build problems

2009-09-23 Thread philip
ig fails from the same command line in which you're running setup.py, then Wolodja is absolutely correct. You need to get pg_config on your path somewhere, or there might be an environment variable you can set to tell setup where to find it if you don't want it in your path.

PyPy3 2.1 beta 1 released

2013-07-30 Thread Philip Jenvey
PyPy3 2.1 beta 1 We're pleased to announce the first beta of the upcoming 2.1 release of PyPy3. This is the first release of PyPy which targets Python 3 (3.2.3) compatibility. We would like to thank all of the people who donated_ to the `py3k proposal`_ for suppo

Re: Validating string for FDQN

2011-06-06 Thread Philip Semanchuk
> and doesn't contain the defined domain. The ones here served me very well: http://pyxml.cvs.sourceforge.net/viewvc/pyxml/xml/xml/Uri.py?revision=1.1&view=markup bye Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: dummy, underscore and unused local variables

2011-06-13 Thread Philip Semanchuk
on bool object: class bool(int) | bool(x) -> bool In your case when you asked for help(_), the last object you used must have been a bool. > > :) I expect to be edified is so many ways, some > of them unexpected. That's the nice thing about this list! Hope this helps Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: search through this list's email archives

2011-06-23 Thread Philip Semanchuk
On Jun 23, 2011, at 12:11 PM, Cathy James wrote: > Dear All, > > I looked through this forum's archives, but I can't find a way to > search for a topic through the archive. Am I missing something? http://www.google.com/search?q=site%3Amail.python.org%2Fpipermail%2Fpython-list%2F+++banana -- h

Re: unzip problem

2011-06-24 Thread Philip Semanchuk
ell which file is failing. 2) You can't tell whether you're getting an error on the write or the read because you've got two statements combined into one line. Change this -- outfile.write(z.read(name)) to this -- data = z.read(name) outfile.write(data) Good luck Phil

Re: wx MenuItem - icon is missing

2011-07-05 Thread Philip Semanchuk
complete example that demonstrates the problem so that we don't have to dummy up a wx app ourselves to try your code. 2. Ask on the wxPython mailing list. Good luck Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: wx MenuItem - icon is missing

2011-07-05 Thread Philip Semanchuk
-mac-unicode/wx/_core.py", line 11481, in __init__ _core_.MenuItem_swiginit(self,_core_.new_MenuItem(*args, **kwargs)) wx._core.PyAssertionError: C++ assertion "parentMenu != NULL" failed at /BUILD/wxPython-src-2.8.12.0/src/common/menucmn.cpp(389) in wxMenuItemBase(): menuitem should ha

Re: wx MenuItem - icon is missing

2011-07-06 Thread Philip Semanchuk
in very little platform-specific code. To be fair, we've had to rewrite some code after we found that it worked on one platform but not another, but generally we're able to find code that works on all platforms. We have only a couple of places where we were forced to resort to this kind o

Re: Question- Getting Windows 64bits information Python 32bits

2011-07-07 Thread Philip Reynolds
On Thu, 07 Jul 2011, Andrew Berg wrote: > On 2011.07.07 10:21 AM, António Rocha wrote: > > I'm running Python (32b) in Windows7 (at 64bits) and I would like to > > know how can I check if my machine is a 32b or 64b in Python. Is it > > possible? I saw a few examples (like platform) but they only p

Re: how to get Python to insert special characters in an xml file?

2011-07-15 Thread Philip Semanchuk
kant, You don't need to do anything special to insert metacharacters like & and < and > into XML using ElementTree. Just treat them as normal text and ElementTree will change them to entity references (&, etc.) when it writes your file to disk. If you're having a specific

Re: Deeply nested dictionaries - should I look into a database or am I just doing it wrong?

2011-07-31 Thread Philip Semanchuk
's no standard way to specify the encoding, and, as would be critical to the OP who is nesting dicts inside of dicts, not all INI file libraries accept nested sections. To the OP -- if you're looking to write this to disk, I recommend XML or SQLite. JMHO, Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Table Driven GUI Definition?

2011-08-05 Thread Philip Semanchuk
ctually be a better model >>> because then I only have to worry about a single presentation >>> environment. >>> >>> Ideas anyone? Hi Tim This looks pretty straightforward to me; maybe I'm missing something. It doesn't look trivial, but the steps seem pre

Re: Table Driven GUI Definition?

2011-08-05 Thread Philip Semanchuk
On Aug 5, 2011, at 6:20 PM, Tim Daneliuk wrote: > On 8/5/2011 3:42 PM, Philip Semanchuk wrote: >> >> On Aug 5, 2011, at 4:10 PM, Tim Daneliuk wrote: >> >>> On 8/5/2011 2:05 PM, Irmen de Jong said this: >>>> On 05-08-11 19:53, Tim Daneliuk wrote:

Re: WxPython and TK

2011-08-08 Thread Philip Semanchuk
don't use Python. The "best Python GUI library" conversation is repeated on this list at least once every few months. If the subject really interests you, I recommend that you read the archives and see some of the arguments for and against various GUI toolkits. Cheers Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: multiprocessing timing issue

2011-08-10 Thread Philip Semanchuk
ueue is empty? It sounds like you figured out already that get_data() sometimes takes longer than your timeout. So either increase your timeout or learn to live with the fact that the queue is sometimes empty. I don't mean to be rude, I just don't understand the problem. Cheers Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Help needed with using SWIG wrapped code in Python

2011-08-15 Thread Philip Semanchuk
On Aug 15, 2011, at 4:08 AM, Vipul Raheja wrote: > Hi, > > I have wrapped a library from C++ to Python using SWIG. But I am facing > problems while importing and using it in Python. Hi Vipul, Did you try asking about this on the SWIG mailing list? bye Philip -- http://mai

Re: Why no warnings when re-assigning builtin names?

2011-08-15 Thread Philip Semanchuk
could break existing code. I could see a use for "from __future__ import squawk_if_i_reassign_a_builtin" or something like that, but the current default behavior has to remain as it is. JMO, Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Why no warnings when re-assigning builtin names?

2011-08-15 Thread Philip Semanchuk
gly by newcomers to the language who have no idea that they've done anything out of the ordinary or potentially confusing. If a language feature is most often invoked accidentally without knowledge of or regard for its potential negative consequences, then it might be worth making it easier to avoid those accidents. bye, Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Why no warnings when re-assigning builtin names?

2011-08-16 Thread Philip Semanchuk
On Aug 16, 2011, at 1:15 AM, Steven D'Aprano wrote: > On Tue, 16 Aug 2011 01:23 pm Philip Semanchuk wrote: > >> >> On Aug 15, 2011, at 9:32 PM, Steven D'Aprano wrote: >> >>> On Tue, 16 Aug 2011 08:15 am Chris Angelico wrote: >>> >>&g

Re: Why no warnings when re-assigning builtin names?

2011-08-16 Thread Philip Semanchuk
On Aug 16, 2011, at 11:12 AM, Chris Angelico wrote: > On Tue, Aug 16, 2011 at 3:13 PM, Philip Semanchuk > wrote: > >> One need look no further than the standard library to see a strong >> counterexample. grep through the Python source for " file =". I see

Re: Why no warnings when re-assigning builtin names?

2011-08-16 Thread Philip Semanchuk
On Aug 16, 2011, at 11:41 AM, Ethan Furman wrote: > Philip Semanchuk wrote: >> On Aug 16, 2011, at 1:15 AM, Steven D'Aprano wrote: >>> Protecting n00bs from their own errors is an admirable aim, but have you >>> considered that warnings for something which may be

Re: Why no warnings when re-assigning builtin names?

2011-08-16 Thread Philip Semanchuk
On Aug 16, 2011, at 12:19 PM, Ethan Furman wrote: > Philip Semanchuk wrote: >> On Aug 16, 2011, at 11:41 AM, Ethan Furman wrote: >>> Philip Semanchuk wrote: >>>> If we are to eschew warnings in >>>> cases where they might be highlighting something harmle

Re: Why no warnings when re-assigning builtin names?

2011-08-16 Thread Philip Semanchuk
arators for mutually exclusive groups open = r'[\[(]' close = r'[\])]' text = _re.sub(r'(%s) ' % open, r'\1', text) text = _re.sub(r' (%s)' % close, r'\1', text) text = _re.sub(r'%s *%s' % (open, close), r'', text) text = _re.sub(r'\(([^|]*)\)', r'\1', text) text = text.strip() Thanks Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Why no warnings when re-assigning builtin names?

2011-08-16 Thread Philip Semanchuk
uiltins would be an expansion of scope. bye, Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Why no warnings when re-assigning builtin names?

2011-08-16 Thread Philip Semanchuk
On Aug 16, 2011, at 10:15 PM, Terry Reedy wrote: > On 8/16/2011 8:18 PM, Philip Semanchuk wrote: > >> Hi Terry, >> To generalize from your example, are you saying that there's a mild >> admonition > > against shadowing builtins with unrelated variable name

Re: List spam

2011-08-18 Thread Philip Semanchuk
"http://groups.google.com";, you won't see much spam anymore. In my experience, you'll also miss a number of legitimate postings. HTH Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: List spam

2011-08-18 Thread Philip Semanchuk
On Aug 18, 2011, at 1:10 PM, Peter Pearson wrote: > On Thu, 18 Aug 2011 12:15:59 -0400, gene heskett wrote: > [snip] >> What is wrong with the mailing list only approach? > > In the mailing-list approach, how do I search for prior discussions > on a subject? (I'm not particularly opposed to th

Re: Hot Girls are Looking for Sex

2011-08-19 Thread Philip Semanchuk
On Aug 19, 2011, at 4:17 PM, Matty Sarro wrote: > That's great - but do they program in python? Please don't repost URLs sent by a spammer. Only Google truly knows how its algorithm works, but the general consensus is that the more times Google sees a link repeated, the more credibility the l

Re: Immediate Requirement for a Data Warehouse Developer

2011-08-25 Thread Philip Semanchuk
On Aug 25, 2011, at 9:24 AM, Sirisha wrote: > Position Profile – Senior Data Warehouse Developer As was mentioned on the list less than 24 hours ago, please don't post job listings to this mailing list. Use the Python jobs board instead: http://www.python.org/community/jobs/ -- http://mail.p

Re: Understanding .pth in site-packages

2011-08-27 Thread Philip Semanchuk
his topic in the documentation, but haven't come across it yet. > Is there a better way to redirect import statements without messing with the > system path or the PYTHONPATH variable? Personally I have never used PYTHONPATH. Hope this helps Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Understanding .pth in site-packages

2011-08-27 Thread Philip Semanchuk
On Aug 27, 2011, at 1:57 PM, Josh English wrote: > Philip, > > Yes, the proper path should be c:\dev\XmlDB, which has the setup.py, xmldb > subfolder, the docs subfolder, and example subfolder, and the other text > files proscribed by the package development folder. > >

Re: Understanding .pth in site-packages

2011-08-27 Thread Philip Semanchuk
On Aug 27, 2011, at 4:14 PM, Terry Reedy wrote: > On 8/27/2011 2:07 PM, Philip Semanchuk wrote: >> >> On Aug 27, 2011, at 1:57 PM, Josh English wrote: >> >>> Philip, >>> >>> Yes, the proper path should be c:\dev\XmlDB, which has the >&g

Re: Understanding .pth in site-packages

2011-08-27 Thread Philip Semanchuk
27;re developing a habit around what is essentially an implementation quirk. Cheers Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Button Label change on EVT_BUTTON in wxpython!!!

2011-08-28 Thread Philip Semanchuk
l('Install') > > When I try doing this, it doesn't set the label to "Installing" while > the task is being performed. Any suggestions how do I achieve this? Suggestion #1: After you set the label to "Installing...", try adding self.run_button.Re

Re: Help parsing a text file

2011-08-29 Thread Philip Semanchuk
rstand the underlying fundamentals. If the syntax really is close to XML, would it be all that difficult to convert it to proper XML? Then you have nice libraries like ElementTree to use for parsing. Cheers Philip -- http://mail.python.org/mailman/listinfo/python-list

Python Tools for Visual Studio - anyone using it?

2011-08-30 Thread Philip Semanchuk
s the URL for those who haven't heard of it before: http://pytools.codeplex.com/ Thanks Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Checking against NULL will be eliminated?

2011-03-02 Thread Philip Semanchuk
On Mar 2, 2011, at 9:21 AM, Stefan Behnel wrote: > Claudiu Popa, 02.03.2011 14:51: >> Hello Python-list, >> >> >> I don't know how to call it, but the following Python 3.2 code seems to >> raise a >> FutureWarning. >> >> def func(root=None): >> nonlocal arg >> if root: >>arg

Re: questions about multiprocessing

2011-03-04 Thread Philip Semanchuk
ks' is not defined When I change the name of "otasks" to "tasks", I get the nonnumeric port error that you reported. Me, I would debug it by adding a print statement to f(): def f(url): print url return urllib2.urlopen(url).read() Your problem isn't relat

Re: multiprocessing module in async db query

2011-03-08 Thread Philip Semanchuk
epare receiving the data > before async_func actually returns? Hi Sheng, Have you looked at multiprocessing.Queue objects? HTH Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: multiprocessing module in async db query

2011-03-09 Thread Philip Semanchuk
On Mar 9, 2011, at 10:22 AM, Sheng wrote: > Hi Philip, > > multiprocessing.Queue is used to transfer data between processes, how > it could be helpful for solving my problem? Thanks! I misunderstood -- I thought transferring data between processes *was* your problem. If both of yo

Re: Do you monitor your Python packages in inux distributions?

2011-03-12 Thread Philip Semanchuk
to me. I hope that continues to be the case because I don't have a good solution to the problems you mentioned. Cheers Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there any python library that parse c++ source code statically

2011-03-13 Thread Philip Semanchuk
On Mar 13, 2011, at 11:46 AM, Stefan Behnel wrote: > Francesco Bochicchio, 13.03.2011 10:37: >> On 13 Mar, 10:14, kuangye wrote: >>> Hi, all. I need to generate other programming language source code >>> from C++ source code for a project. To achieve this, the first step is >>> to "understand" t

Re: calling 64 bit routines from 32 bit matlab on Mac OS X

2011-03-15 Thread Philip Semanchuk
all 64-bit Python alongside the 32-bit version, call with the 64-bit C DLL from 64-bit Python using ctypes, and then communicate between the 32- and 64-bit Pythons via pickled objects sent over an interprocess pipe. That solution has a Rube Goldberg-esque charm but not much else to recommend it.

Re: interrupted system call w/ Queue.get

2011-03-22 Thread Philip Winston
interrupted. I did see several EINTR issues in Python but none obviously about Queue exactly: http://bugs.python.org/issue1068268 http://bugs.python.org/issue1628205 http://bugs.python.org/issue10956 -Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiprocessing, shared memory vs. pickled copies

2011-04-04 Thread Philip Semanchuk
at multi-core CPU's are apparently here to stay, > should it be so difficult to make use of them? My answers to these questions: 1) Depends 2) In Python, almost never unless you're using a nice wrapper like shmarray.py 3) I don't think it's non-trivial =) 4) No, defi

Re: PyThreadState_Swap crash

2011-04-04 Thread Philip Semanchuk
be around for quite a while longer but given the ominous-but-vague warning in issue10913's description, you might want to stay away from them. It's frustrating for me because I've got code I can't get to work without them. Good luck Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiprocessing, shared memory vs. pickled copies

2011-04-04 Thread Philip Semanchuk
On Apr 4, 2011, at 9:03 PM, Dan Stromberg wrote: > On Mon, Apr 4, 2011 at 4:34 PM, Philip Semanchuk wrote: > >> So if you're going to use multiprocessing, you're going to use pickle, and >> you need pickleable objects. >> > > http://docs.python.org/li

Re: Multiprocessing, shared memory vs. pickled copies

2011-04-05 Thread Philip Semanchuk
On Apr 5, 2011, at 12:58 PM, John Ladasky wrote: > Hi Philip, > > Thanks for the reply. > > On Apr 4, 4:34 pm, Philip Semanchuk wrote: >> So if you're going to use multiprocessing, you're going to use pickle, and >> you >> need pickleable objects

Re: Multiprocessing, shared memory vs. pickled copies

2011-04-07 Thread Philip Semanchuk
s there's an easier path somewhere else that I'm neglecting. But if pickling subclasses of numpy.ndarray objects is what you really feel you need to do, then yes, I think asking on the numpy list is the best idea. Good luck Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: multiprocessing

2011-04-07 Thread Philip Semanchuk
On Apr 7, 2011, at 8:57 PM, Kerensa McElroy wrote: > > Hi, > > thanks for your response. > > I checked out multiprocessing.value, however from what I can make out, it > works with object of only a very limited type. Is there a way to do this for > more complex objects? (In reality, my object

Re: renaming files in OS X

2011-04-20 Thread Philip Semanchuk
r is written (badly) in Python; on my system it lives in /usr/bin/xattr-2.6 You might also find this helpful: http://jonsview.com/mac-os-x-resource-forks Hope this helps Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: De-tupleizing a list

2011-04-25 Thread Philip Semanchuk
his?: > > ['0A', '1B', '2C', '3D',... This works for me - result = [('0A',), ('1B',), ('2C',), ('3D',), ] result = [row[0] for row in result] Cheers Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Terrible FPU performance

2011-04-26 Thread Philip Semanchuk
On Apr 26, 2011, at 1:34 PM, Mihai Badoiu wrote: > Already did. They suggested the python list, because the asm generated code > is really correct and the problem might be with the python running on top. Does the same timing in consistency appear when you use pure Python? bye Philip &

Re: ElementTree XML parsing problem

2011-04-27 Thread Philip Semanchuk
laint offered up by the parser is > > Unexpected error opening simple_fail.xml: not well-formed (invalid token): > line 5, column 40 You've gotten a number of good observations & suggestions already. I would add that if you're saving your XML file from a text editor, make sure

Re: checking if a list is empty

2011-05-06 Thread Philip Semanchuk
else: for item in an_iterable: print item I find I use the the former style ("if not an_iterable") almost exclusively. bye Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie question about SQLite + Python and twitter

2011-05-25 Thread Philip Semanchuk
ncions. I just got to work when I stop select function. > > I would like to do my app works all the time. Hi Jayme, You need to provide a lot more information for us to be able to help you. Some suggestions -- http://www.istf.com.br/perguntas/#beprecise bye Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Asyncio tasks getting cancelled

2018-11-05 Thread philip . m
On Mon, Nov 05, 2018 at 01:57:56PM -0700, Ian Kelly wrote: > > Which is what I want in this case. Scheduling a new (long-running) task > > as a side effect, but returning early oneself. The new task can't be > > awaited right there, because the creating one should return already. > > If you want t

Help with Threading

2005-01-23 Thread Philip Smith
Hi I am fairly new to Python threading and my needs are simple(!) I want to establish a number of threads each of which work on the same computationally intensive problem in different ways. I am using the thread module rather than the threading module. My problem is I can't see how (when one t

Re: Help with Threading

2005-01-25 Thread Philip Smith
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I use threading.Thread as outlined in this recipe: > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65448 >Thanks -- http://mail.python.org/mailman/listinfo/python-list

Elliptic Code

2005-01-28 Thread Philip Smith
Hi Does anyone have/know of a python implementation of the elliptic curve factoring algorithm (lenstra) which is both: simply and cleanly coded functional I'm aware of William Stein's code (from elementary number theory book) but I don't understand his coding style and the algorithm doesn't se

Re: Elliptic Code

2005-01-28 Thread Philip Smith
it yet. Phil <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Philip Smith" <[EMAIL PROTECTED]> writes: >> Does anyone have/know of a python implementation of the elliptic curve >> factoring algorithm (lenstra) which is both: >> >> simply

Re: Elliptic Code

2005-01-28 Thread Philip Smith
Quite so - but thanks for your help in any case "Paul Rubin" wrote in message news:[EMAIL PROTECTED] > Nick Craig-Wood <[EMAIL PROTECTED]> writes: >> > I understand the algorithm quite well but how to code the >> > multiplication >> > stage most efficiently in python

Multiple constructors

2005-02-05 Thread Philip Smith
Call this a C++ programmers hang-up if you like. I don't seem to be able to define multiple versions of __init__ in my matrix class (ie to initialise either from a list of values or from 2 dimensions (rows/columns)). Even if Python couldn't resolve the __init__ to use on the basis of argument

Re: Multiple constructors

2005-02-06 Thread Philip Smith
Thanks to all of you Some useful ideas in there, even if some of them stretch my current knowledge of the language. C++ to Python is a steep 'unlearning' curve... Phil "Philip Smith" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Call this a C++ pr

Re: c/c++ extensions and help()

2005-07-31 Thread Philip Austin
Robert Kern <[EMAIL PROTECTED]> writes: > Lenny G. wrote: >> Is there a way to make a c/c++ extension have a useful method >> signature? Right now, help(myCFunc) shows up like: >> myCFunc(...) >> description of myCFunc >> I'd like to be able to see: >> myCFunc(myArg1, myArg2) >> description o

lambda and for that matter goto not forgetting sugar

2005-02-10 Thread Philip Smith
I've read with interest the continuing debate about 'lambda' and its place in Python. Just to say that personally I think its an elegant and useful construct for many types of programming task (particularly number theory/artificial intelligence/genetic algorithms) I can't think why anyone woul

Derived class and deepcopy

2005-02-16 Thread Philip Smith
Hi If I derive a class (eg Matrix) from list I presume this implies the classic OOP 'is a' relation between the derived and super class. I therefore presume I can use a derived class in any context that I can use the superclass. In the given example I want to apply deepcopy() to the Matrix ins

Beware complexity

2005-03-12 Thread Philip Smith
-- http://mail.python.org/mailman/listinfo/python-list

Beware complexity

2005-03-12 Thread Philip Smith
I wonder if anyone has any thoughts not on where Python should go but where it should stop? One of the faults with langauges like C++ was that so many new features/constructs were added that it became a nightmare right from the design stage of a piece of software deciding which of the almost in

Re: Python Scalability TCP Server + Background Game

2014-01-19 Thread Philip Werner
ogleGroupsPython Thanks for the link. I've, hopefully, solved the issue by switching to Pan instead of using google groups. :) Regards, Philip -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Scalability TCP Server + Background Game

2014-01-21 Thread Philip Werner
hrisA Thanks for the heads up. It is buggy to say the least. Any other program on linux you may suggest? Regards, Philip -- https://mail.python.org/mailman/listinfo/python-list

No overflow in variables?

2014-01-22 Thread Philip Red
Hi everyone. First of all sorry if my english is not good. I have a question about something in Python I can not explain: in every programming language I know (e.g. C#) if you exceed the max-value of a certain type (e.g. a long-integer) you get an overflow. Here is a simple example in C#:

Re: No overflow in variables?

2014-01-22 Thread Philip Red
Thank you for your answers! -- https://mail.python.org/mailman/listinfo/python-list

Re: No overflow in variables?

2014-01-22 Thread Philip Red
Thank you ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: Running a .py file iteratively at the terminal

2015-01-27 Thread Philip Keogh
On Mon, 26 Jan 2015, varun...@gmail.com wrote: > Thanks a lot Mark but that would be a bit trivial. How can I run the > same file multiple times? Or if I need to run two commands: > srva@hades:~$ python NFV_nw_eu_v3_14_1_15.py --output eu_v3_14_1_15 > --demand demands_v3_21_1_15.xml --xml nobel-eu.

Re: Download Visual Studio Express 2008 now

2013-08-29 Thread Philip Inglesant
Hi Martyn, Thanks for the good advice to download VS 2008 before M$ delete it from their download servers. Unfortunately they have already done this so many Python modules now can't be compiled correctly on Windows! Best regards, Philip -- http://mail.python.org/mailman/listinfo/p

Python Front-end to GCC

2013-10-20 Thread Philip Herron
Hey, I've been working on GCCPY since roughly november 2009 at least in its concept. It was announced as a Gsoc 2010 project and also a Gsoc 2011 project. I was mentored by Ian Taylor who has been an extremely big influence on my software development carrer. Gccpy is an Ahead of time implementati

Re: Python Front-end to GCC

2013-10-21 Thread Philip Herron
Hey all, Thanks, i've been working on this basically on my own 95% of the compiler is all my code, in my spare time. Its been fairly scary all of this for me. I personally find this as a real source of interest to really demystify compilers and really what Jit compilation really is under the ho

Re: Python Front-end to GCC

2013-10-21 Thread Philip Herron
On Monday, 21 October 2013 21:26:06 UTC+1, zipher wrote: > On Mon, Oct 21, 2013 at 4:08 AM, Philip Herron > > wrote: > > > Thanks, i've been working on this basically on my own 95% of the compiler > > is all my code, in my spare time. Its been fairly sca

Re: Python Front-end to GCC

2013-10-22 Thread Philip Herron
On Tuesday, 22 October 2013 09:55:15 UTC+1, Antoine Pitrou wrote: > Philip Herron googlemail.com> writes: > > > > > > Its interesting a few things come up what about: > > > > > > exec and eval. I didn't really have a good answer for this at

Re: Python Front-end to GCC

2013-10-22 Thread Philip Herron
On Tuesday, 22 October 2013 10:14:16 UTC+1, Oscar Benjamin wrote: > On 22 October 2013 00:41, Steven D'Aprano > > >>> On the contrary, you have that backwards. An optimizing JIT compiler > > >>> can often produce much more efficient, heavily optimized code than a > > >>> static AOT compiler, an

Re: Python Front-end to GCC

2013-10-23 Thread Philip Herron
On Wednesday, 23 October 2013 07:48:41 UTC+1, John Nagle wrote: > On 10/20/2013 3:10 PM, victorgarcia...@gmail.com wrote: > > > On Sunday, October 20, 2013 3:56:46 PM UTC-2, Philip Herron wrote: > > >> I've been working on GCCPY since roughly november 2009 at lea

Re: try/except/finally

2014-06-09 Thread Philip Shaw
On 2014-06-08, Dave Angel wrote: > Frank B Wrote in message: >> Ok; this is a bit esoteric. >> >> So finally is executed regardless of whether an exception occurs, so states >> the docs. >> >> But, I thought, if I from my function first, that should take >> precedence. >> >> au contraire >>

Re: How to use SQLite (sqlite3) more efficiently

2014-06-09 Thread Philip Shaw
On 2014-06-06, Mark Lawrence wrote: > On 06/06/2014 22:58, Dave Angel wrote: >> Chris Angelico Wrote in message: >>> On Sat, Jun 7, 2014 at 4:15 AM, R Johnson >>> wrote: > The subject line isn't as important as a header, carried invisibly > through, that says that you were replying to an

Re: Not Responding When Dealing with Large Data

2014-06-18 Thread Philip Dexter
On Wed, Jun 18, 2014 at 1:20 PM, cutey Love wrote: > I'm trying to read in 10 lines of text, use some functions to edit them > and then return a new list. > > The problem is my program always goes not responding when the amount of lines > are a high number. > > I don't care how long the prog

PyPy3 2.3.1 released

2014-06-20 Thread Philip Jenvey
ypy documentation`: http://doc.pypy.org/en/latest/getting-started.html#installing-using-virtualenv .. _`virtualenv`: http://www.virtualenv.org/en/latest/ .. _`installation schemes`: http://doc.pypy.org/en/latest/getting-started.html#installing-pypy Cheers, the PyPy team -- Philip Jenvey --

Re: Get named groups from a regular expression

2014-07-03 Thread Philip Shaw
On 2014-07-01, Florian Lindner wrote: > > Is there a way I can extract the named groups from a regular > expression? e.g. given "(?P\d)" I want to get something > like ["testgrp"]. The match object has an attribute called "groupdict", so you can get the found named groups using match.groupdict.k

PyPy3 2.4.0 released

2014-10-21 Thread Philip Jenvey
= PyPy3 2.4 - Snow White = We're pleased to announce PyPy3 2.4, which contains significant performance enhancements and bug fixes. You can download the PyPy3 2.4.0 release here: http://pypy.org/do

Re: Numpy.array with dtype works on list of tuples not on list of lists?

2011-09-18 Thread Philip Semanchuk
t;> arr > array([(1.0, 2.0, 3.0), (4.0, 5.0, 6.0)], dtype=[('a', ' ' > The only difference that the object is a list of tuples now? I don't know why you're seeing what you're seeing, but if you don't get answer here you could try asking on the numpy list. Good luck Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Need help with file encoding-decoding

2011-09-23 Thread Philip Semanchuk
008.html You can also do some straightforward debugging. Save the raw bytes you get from each site, and when you encounter a decode error, check the raw bytes. Are they really in the encoding specified? Webmasters make all kinds of mistakes. Hope this helps Philip > this -> content.

Re: void * C array to a Numpy array using Swig

2006-01-12 Thread Philip Austin
"Travis E. Oliphant" <[EMAIL PROTECTED]> writes: > Krish wrote: > Yes, you are right that you need to use typemaps. It's been awhile > since I did this kind of thing, but here are some pointers. Also, there's http://geosci.uchicago.edu/csc/numptr -- http://mail.python.org/mailman/listinfo/p

Multiple Polynomial Quadratic Sieve

2006-05-30 Thread Philip Smith
Just to announce that I have posted an experimental version of MPQS which I am hoping those of a mathematical turn of mind would care to test, comment on and maybe contribute to. There is work to do but it performs very well. The package is available via FTP at http://www.pythonstuff.pwp.bluey

Re: Multiple Polynomial Quadratic Sieve

2006-05-30 Thread Philip Smith
Whoops Should have been http://www.python.pwp.blueyonder.co.uk/ Thanks Phil "Philip Smith" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Just to announce that I have posted an experimental version of MPQS which > I am hoping those of a mathematical turn

Pyrex newbie question

2006-06-04 Thread Philip Smith
Just starting to use pyrex on windows. Using pyrex version 0.9.3.1.win32 Using Activestate Python 2.4.3.12 Using Mingw compiler When I try to run the pyrex demo it fails with a message: "undefined reference to '_imp__Py_NoneStruct' " Anyone know why? -- http://mail.python.org/mailman/list

  1   2   3   4   5   >