Re: The Joys Of Data-Driven Programming

2016-08-31 Thread Cem Karan
uild.org/)? I personally like it because of how simple it is, and the fact that it doesn't use leading tabs the way that make does. It is intended to be the assembler for higher-level build systems which are more like compilers. I personally use it as a make replacement because it does what I tell it to do, and nothing else. It may fit what you're after. Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: The Joys Of Data-Driven Programming

2016-08-31 Thread Cem Karan
On Aug 31, 2016, at 9:02 AM, Paul Moore wrote: > On 31 August 2016 at 13:49, Cem Karan wrote: >>> Has anyone else found this to be the case? Is there any "make replacement" >>> out there that focuses more on named sets of actions (maybe with >>> prere

Re: Abusive Italian Spam

2016-09-30 Thread Cem Karan
Honestly, I'm impressed by how little spam ever makes it onto the list. Considering the absolute flood of email the lists get, it's impressive work. Thank you for all the hard work you guys do for all the rest of us! Thanks, Cem Karan On Sep 29, 2016, at 11:30 AM, Tim Golden wro

Byte code descriptions somewhere?

2016-10-01 Thread Cem Karan
tions work, etc.)? Basically, I want a manual similar to what Intel or AMD might put out for their chips so that all executables behave nicely with one another. Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: Byte code descriptions somewhere?

2016-10-01 Thread Cem Karan
x27;, I mean writing my own byte array with bytes that CPython can directly interpret. Thanks, Cem Karan On Oct 1, 2016, at 7:02 PM, Ben Finney wrote: > Cem Karan writes: > >> Hi all, I've all of a sudden gotten interested in the CPython >> interpreter, and started t

Re: Byte code descriptions somewhere?

2016-10-02 Thread Cem Karan
I kind of got the feeling that was so from reading the docs in the source code. Too bad! :( Cem On Oct 1, 2016, at 7:53 PM, Paul Rubin wrote: > Cem Karan writes: >> how do I create a stream of byte codes that can be interpreted by >> CPython directly? > > Basical

Re: Byte code descriptions somewhere?

2016-10-02 Thread Cem Karan
On Oct 1, 2016, at 7:56 PM, Chris Angelico wrote: > On Sun, Oct 2, 2016 at 10:47 AM, Cem Karan wrote: >> Cool, thank you! Quick experimentation suggests that I don't need to worry >> about marking anything for garbage collection, correct? The next question >> is, h

Re: Byte code descriptions somewhere?

2016-10-02 Thread Cem Karan
On Oct 1, 2016, at 8:30 PM, Ned Batchelder wrote: > On Saturday, October 1, 2016 at 7:48:09 PM UTC-4, Cem Karan wrote: >> Cool, thank you! Quick experimentation suggests that I don't need to worry >> about marking anything for garbage collection, correct? The next quest

Re: Byte code descriptions somewhere?

2016-10-02 Thread Cem Karan
On Oct 1, 2016, at 7:34 PM, breamore...@gmail.com wrote: > On Saturday, October 1, 2016 at 11:57:17 PM UTC+1, Cem Karan wrote: >> Hi all, I've all of a sudden gotten interested in the CPython interpreter, >> and started trying to understand how it ingests and runs

Who owns the memory in ctypes?

2016-11-14 Thread Cem Karan
owns it and attempt to dispose of it when it goes out of scope? Ideally, the memory is owned by the side that created it, with the other side simply referencing it, but I want to be sure before I invest a lot of time interfacing the two sides together. Thanks, Cem Karan -- https://mail.pytho

Re: Quote of the day

2016-05-17 Thread Cem Karan
t tests, which all passed. When I started using it, I kept getting odd errors. Digging into it, I discovered they had commented out the bodies of some of the unit tests... glad it was open source, at least I *could* dig into the code and figure out what was going on :/ Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: How can I count word frequency in a web site?

2015-11-29 Thread Cem Karan
You might want to look into Beautiful Soup (https://pypi.python.org/pypi/beautifulsoup4), which is an HTML screen-scraping tool. I've never used it, but I've heard good things about it. Good luck, Cem Karan On Nov 29, 2015, at 7:49 PM, ryguy7272 wrote: > I'm trying to

Re: How to remove item from heap efficiently?

2016-01-11 Thread Cem Karan
well. I haven't tested its asymptotic performance though, so you might want to check into that. Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: How to remove item from heap efficiently?

2016-01-13 Thread Cem Karan
On Jan 12, 2016, at 11:18 AM, "Sven R. Kunze" wrote: > On 12.01.2016 03:48, Cem Karan wrote: >> >> Jumping in late, but... >> >> If you want something that 'just works', you can use HeapDict: >> >> http://stutzbachenterprises.com/ &

Re: How to remove item from heap efficiently?

2016-01-14 Thread Cem Karan
On Jan 13, 2016, at 2:08 PM, Sven R. Kunze wrote: > On 13.01.2016 12:20, Cem Karan wrote: >> On Jan 12, 2016, at 11:18 AM, "Sven R. Kunze" wrote: >> >>> Thanks for replying here. I've come across these types of >>> wrappers/re-implementati

Re: me, my arm, my availability ...

2016-01-14 Thread Cem Karan
they did wonders for my knee a few years back. With luck, it'll be more or less outpatient surgery. Good luck, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: A sets algorithm

2016-02-07 Thread Cem Karan
ire file at once. The main purpose of these suggestions is to reduce the amount of reading you're doing. Storage tends to be slow, and any tricks that reduce the number of bytes you need to read in will be helpful to you. Good luck! Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: Heap Implementation

2016-02-07 Thread Cem Karan
a row. The priority is the moment in the future when the object will be called. As a result, items don't have unique priorities. I know that there are methods of handling this from the client-side (tuples with unique counters come to mind), but if your library can handle it direct

Re: Heap Implementation

2016-02-08 Thread Cem Karan
On Feb 7, 2016, at 10:15 PM, srinivas devaki wrote: > On Feb 8, 2016 7:07 AM, "Cem Karan" wrote: > > I know that there are methods of handling this from the client-side (tuples > > with unique counters come to mind), but if your library can handle it > > directl

Re: Heap Implementation

2016-02-08 Thread Cem Karan
On Feb 8, 2016, at 10:12 PM, srinivas devaki wrote: > > On Feb 8, 2016 5:17 PM, "Cem Karan" wrote: > > > > On Feb 7, 2016, at 10:15 PM, srinivas devaki > > wrote: > > > On Feb 8, 2016 7:07 AM, "Cem Karan" wrote: > > > > I

Re: Heap Implementation

2016-02-09 Thread Cem Karan
On Feb 9, 2016, at 4:40 AM, Mark Lawrence wrote: > On 09/02/2016 04:25, Cem Karan wrote: >> >> No problem, that's what I thought happened. And you're right, I'm looking >> for a priority queue (not the only reason to use a heap, but a pretty >> imp

Re: Heap Implementation

2016-02-09 Thread Cem Karan
On Feb 9, 2016, at 9:27 AM, Mark Lawrence wrote: > On 09/02/2016 11:44, Cem Karan wrote: >> >> On Feb 9, 2016, at 4:40 AM, Mark Lawrence wrote: >> >>> On 09/02/2016 04:25, Cem Karan wrote: >>>> >>>> No problem, that's what I t

Re: Heap Implementation

2016-02-09 Thread Cem Karan
On Feb 9, 2016, at 8:27 PM, srinivas devaki wrote: > > > On Feb 10, 2016 6:11 AM, "Cem Karan" wrote: > > > > Eh, its not too bad once you figure out how to do it. It's easier in C > > though; you can use pointer tricks that let you find the eleme

Re: Heap Implementation

2016-02-11 Thread Cem Karan
On Feb 10, 2016, at 1:23 PM, "Sven R. Kunze" wrote: > Hi Cem, > > On 08.02.2016 02:37, Cem Karan wrote: >> My apologies for not writing sooner, but work has been quite busy lately >> (and likely will be for some time to come). > > no problem here. :) >

Re: Guido on python3 for beginners

2016-02-18 Thread Cem Karan
u're suddenly surprised by Py2 starting up when you've been using a Py3 interactive interpreter. For me, I'd probably give my students a block of code that they are asked to copy at the start of their files to test for Py2 or Py3, and to raise an exception on Py2. After that, I just wouldn't worry about it. Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Bug? Feature? setattr(foo, '3', 4) works!

2014-12-19 Thread Cem Karan
7;, '__str__', '__subclasshook__', '__weakref__'] >>> getattr(bar, '3') 4 >>> hasattr(foo, '3') True >>> hasattr(bar, '3') True However, the following doesn't work: >>> foo.3 File "", line

Re: resource based job queue manager

2014-12-20 Thread Cem Karan
tablished > scheduler which can run the jobs from different servers too. Try SCOOP: https://code.google.com/p/scoop/ Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: Bug? Feature? setattr(foo, '3', 4) works!

2014-12-20 Thread Cem Karan
On Dec 19, 2014, at 10:33 AM, random...@fastmail.us wrote: > On Fri, Dec 19, 2014, at 07:23, Ben Finney wrote: >> Cem Karan writes: >>> I'd like to suggest that getattr(), setattr(), and hasattr() all be >>> modified so that syntactically invalid statements

Re: Searching through more than one file.

2014-12-29 Thread Cem Karan
easiest/computationally cheapest filtering first here. That means selecting the files that match your extensions first, and then filtering those files by their contents second. Finally, if you are planning on parsing command-line options, DON'T do it by hand! Use argparse (https://docs.python.org/3/library/argparse.html) instead. Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: ANN: unpyc3 - a python bytecode decompiler for Python3

2015-01-29 Thread Cem Karan
push/pull from. Whenever you're done with it, you can merge the changes back into whatever you & your group see as the real branch. That is the model I use at work, and it works fairly well, and its saved me once already when the laptop I was working on decided to die on me. Th

Design thought for callbacks

2015-02-20 Thread Cem Karan
, and if they are no longer alive, they are automatically removed from the WeakSet, preventing me from accidentally calling them when they are dead. My question is simple; is this a good design? If not, why not? Are there any potential 'gotchas' I should be worried about

Re: Design thought for callbacks

2015-02-21 Thread Cem Karan
On Feb 21, 2015, at 12:42 AM, Chris Angelico wrote: > On Sat, Feb 21, 2015 at 1:44 PM, Cem Karan wrote: >> In order to inform users that certain bits of state have changed, I require >> them to register a callback with my code. The problem is that when I store >>

Re: Design thought for callbacks

2015-02-21 Thread Cem Karan
On Feb 21, 2015, at 12:41 AM, Frank Millman wrote: > > "Cem Karan" wrote in message > news:33677ae8-b2fa-49f9-9304-c8d937842...@gmail.com... >> Hi all, I'm working on a project that will involve the use of callbacks, >> and I want to bounce an idea I had

Re: Design thought for callbacks

2015-02-21 Thread Cem Karan
On Feb 21, 2015, at 8:15 AM, Chris Angelico wrote: > On Sun, Feb 22, 2015 at 12:13 AM, Cem Karan wrote: >> OK, so it would violate the principle of least surprise for you. >> Interesting. Is this a general pattern in python? That is, callbacks are >> owned by what the

Re: Design thought for callbacks

2015-02-21 Thread Cem Karan
On Feb 21, 2015, at 8:37 AM, Mark Lawrence wrote: > On 21/02/2015 05:41, Frank Millman wrote: >> >> "Cem Karan" wrote in message >> news:33677ae8-b2fa-49f9-9304-c8d937842...@gmail.com... >>> Hi all, I'm working on a project that will involve the

Re: Design thought for callbacks

2015-02-21 Thread Cem Karan
On Feb 21, 2015, at 9:36 AM, Chris Angelico wrote: > On Sun, Feb 22, 2015 at 1:07 AM, Cem Karan wrote: >> I agree about closures; its the only way they could work. When I was >> originally thinking about the library, I was trying to include all types of >> callbacks, i

Re: Design thought for callbacks

2015-02-22 Thread Cem Karan
On Feb 21, 2015, at 10:55 AM, Chris Angelico wrote: > On Sun, Feb 22, 2015 at 2:45 AM, Cem Karan wrote: >> OK, so if I'm reading your code correctly, you're breaking the cycle in your >> object graph by making the GUI the owner of the callback, correct? No othe

Re: Design thought for callbacks

2015-02-22 Thread Cem Karan
On Feb 21, 2015, at 11:03 AM, Marko Rauhamaa wrote: > Chris Angelico : > >> On Sat, Feb 21, 2015 at 1:44 PM, Cem Karan wrote: > >>> In order to inform users that certain bits of state have changed, I >>> require them to register a callback with my code. The

Re: Design thought for callbacks

2015-02-22 Thread Cem Karan
ism slightly less surprising by allowing the user to track them, releasing them when they aren't needed without having to figure out where the callbacks were registered. However, it appears I'm making things more surprising rather than less. Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: Design thought for callbacks

2015-02-22 Thread Cem Karan
On Feb 21, 2015, at 12:27 PM, Steven D'Aprano wrote: > Cem Karan wrote: > >> >> On Feb 21, 2015, at 8:15 AM, Chris Angelico wrote: >> >>> On Sun, Feb 22, 2015 at 12:13 AM, Cem Karan wrote: >>>> OK, so it would violate the principle of lea

Re: Design thought for callbacks

2015-02-22 Thread Cem Karan
On Feb 21, 2015, at 3:57 PM, Grant Edwards wrote: > On 2015-02-21, Cem Karan wrote: >> >> On Feb 21, 2015, at 12:42 AM, Chris Angelico wrote: >> >>> On Sat, Feb 21, 2015 at 1:44 PM, Cem Karan wrote: >>>> In order to inform users that certain bits o

Re: Design thought for callbacks

2015-02-22 Thread Cem Karan
On Feb 22, 2015, at 7:12 AM, Marko Rauhamaa wrote: > Cem Karan : > >> On Feb 21, 2015, at 11:03 AM, Marko Rauhamaa wrote: >>> I use callbacks all the time but haven't had any problems with strong >>> references. >>> >>> I am careful to mo

Re: Design thought for callbacks

2015-02-22 Thread Cem Karan
On Feb 22, 2015, at 7:24 AM, Chris Angelico wrote: > On Sun, Feb 22, 2015 at 11:07 PM, Cem Karan wrote: >>> Correct. The GUI engine ultimately owns everything. Of course, this is >>> a very simple case (imagine a little notification popup; you don't >>> ca

Re: Design thought for callbacks

2015-02-22 Thread Cem Karan
On Feb 22, 2015, at 7:52 AM, Laura Creighton wrote: > In a message of Sun, 22 Feb 2015 07:16:14 -0500, Cem Karan writes: > >> This was PRECISELY the situation I was thinking about. My hope was >> to make the callback mechanism slightly less surprising by allowing >>

Re: Design thought for callbacks

2015-02-22 Thread Cem Karan
On Feb 22, 2015, at 7:46 AM, Marko Rauhamaa wrote: > Cem Karan : > >> On Feb 21, 2015, at 12:08 PM, Marko Rauhamaa wrote: >>> Maybe the logic of the receiving object isn't prepared for the callback >>> anymore after an intervening event. >>> >

Re: Design thought for callbacks

2015-02-22 Thread Cem Karan
you're saying, but I don't think it gains us too much. If I store an object and an unbound method of the object, or if I store the bound method directly, I suspect it will yield approximately the same results. Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: Design thought for callbacks

2015-02-22 Thread Cem Karan
On Feb 22, 2015, at 4:02 PM, Ethan Furman wrote: > On 02/22/2015 05:13 AM, Cem Karan wrote: > >> Output: >> From Evil Zombie: Surprise! >> From Your Significant Other: Surprise! >> >> In this case, the user made an error (just as Marko said in his earlier

Re: Design thought for callbacks

2015-02-22 Thread Cem Karan
On Feb 22, 2015, at 4:34 PM, Marko Rauhamaa wrote: > Cem Karan : > >> My goal is to make things as pythonic (whatever that means in this >> case) and obvious as possible. Ideally, a novice can more or less >> guess what will happen with my API without really having to r

Re: Design thought for callbacks

2015-02-23 Thread Cem Karan
On Feb 22, 2015, at 5:29 PM, Laura Creighton wrote: > In a message of Sun, 22 Feb 2015 17:09:01 -0500, Cem Karan writes: > >> Documentation is a given; it MUST be there. That said, documenting >> something, but still making it surprising, is a bad idea. For >> exam

Re: Design thought for callbacks

2015-02-24 Thread Cem Karan
On Feb 23, 2015, at 7:29 AM, "Frank Millman" wrote: > > "Cem Karan" wrote in message > news:a3c11a70-5846-4915-bb26-b23793b65...@gmail.com... >> >> >> Good questions! That was why I was asking about 'gotchas' with WeakSets >>

Re: Design thought for callbacks

2015-02-24 Thread Cem Karan
I'm combining two messages into one, On Feb 24, 2015, at 12:29 AM, random...@fastmail.us wrote: > On Tue, Feb 24, 2015, at 00:20, Gregory Ewing wrote: >> Cem Karan wrote: >>> I tend to structure my code as a tree or DAG of objects. The owner refers >>> to >

Re: Design thought for callbacks

2015-02-25 Thread Cem Karan
nced me to stick with strong references everywhere. I'm working out a possible API right now, once I have some code that I can use to illustrate what I'm thinking to everyone, I'll post it to the list. Thank you for showing me your code though, it is clever! Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: Design thought for callbacks

2015-02-25 Thread Cem Karan
problem? Note that I can force my users to use the latest stable version of python at all times, so WeakMethod IS available to me. Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: Design thought for callbacks

2015-02-26 Thread Cem Karan
On Feb 26, 2015, at 12:36 AM, Gregory Ewing wrote: > Cem Karan wrote: >> I think I see what you're talking about now. Does WeakMethod >> (https://docs.python.org/3/library/weakref.html#weakref.WeakMethod) solve >> this problem? > > Yes, that looks like it wo

Re: Design thought for callbacks

2015-03-02 Thread Cem Karan
er the OP was. Thank you Ethan, that was precisely my problem. Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: Design thought for callbacks

2015-03-02 Thread Cem Karan
On Feb 26, 2015, at 7:04 PM, Fabio Zadrozny wrote: > > On Wed, Feb 25, 2015 at 9:46 AM, Cem Karan wrote: > > On Feb 24, 2015, at 8:23 AM, Fabio Zadrozny wrote: > > > Hi Cem, > > > > I didn't read the whole long thread, but I thought I'd point you

Re: Design thought for callbacks

2015-03-02 Thread Cem Karan
On Feb 26, 2015, at 2:54 PM, Ian Kelly wrote: > On Feb 26, 2015 4:00 AM, "Cem Karan" wrote: > > > > > > On Feb 26, 2015, at 12:36 AM, Gregory Ewing > > wrote: > > > > > Cem Karan wrote: > > >> I think I see what you're

Re: Design thought for callbacks

2015-03-08 Thread Cem Karan
more sense. Thanks again to everyone for providing so many comments on my question, and I apologize again for taking so long to wrap things up. Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: Installed Python 3 on Mac OS X Yosemite but its still Python 2.7

2015-03-09 Thread Cem Karan
talled Python 3.4.3? You don't need to uninstall python 2.7, and you shouldn't try. I tried it as an experiment at one time, and my system had various mysterious failures after that. It may be that Yosemite fixes those failures, but I wouldn't bet on it. Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Good PDF parser/form filler?

2015-03-20 Thread Cem Karan
on OS X (only a real problem for extension classes, etc.) - Ideally pure python with few dependencies. - NOT shoveling data out to the internet! MUST be wholly contained on my machine! Thanks in advance for any help! Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Diff between object graphs?

2015-04-22 Thread Cem Karan
t. Anyone know of such a thing? Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: Diff between object graphs?

2015-04-22 Thread Cem Karan
On Apr 22, 2015, at 8:53 AM, Peter Otten <__pete...@web.de> wrote: > Cem Karan wrote: > >> Hi all, I need some help. I'm working on a simple event-based simulator >> for my dissertation research. The simulator has state information that I >> want to anal

Re: Diff between object graphs?

2015-04-22 Thread Cem Karan
On Apr 22, 2015, at 9:46 PM, Chris Angelico wrote: > On Thu, Apr 23, 2015 at 11:37 AM, Dave Angel wrote: >> On 04/22/2015 09:30 PM, Cem Karan wrote: >>> >>> >>> On Apr 22, 2015, at 8:53 AM, Peter Otten <__pete...@web.de> wrote: >>> >&g

Re: Diff between object graphs?

2015-04-22 Thread Cem Karan
On Apr 22, 2015, at 9:56 PM, Dave Angel wrote: > On 04/22/2015 09:46 PM, Chris Angelico wrote: >> On Thu, Apr 23, 2015 at 11:37 AM, Dave Angel wrote: >>> On 04/22/2015 09:30 PM, Cem Karan wrote: >>>> >>>> >>>> On Apr 22,

Re: Diff between object graphs?

2015-04-23 Thread Cem Karan
On Apr 23, 2015, at 1:59 AM, Steven D'Aprano wrote: > On Thursday 23 April 2015 11:53, Cem Karan wrote: > >> Precisely. In order to make my simulations more realistic, I use a lot of >> random numbers. I can fake things by keeping the seed to the generator, >>

Re: Diff between object graphs?

2015-04-24 Thread Cem Karan
On Apr 23, 2015, at 11:05 AM, Steve Smaldone wrote: > On Thu, Apr 23, 2015 at 6:34 AM, Cem Karan wrote: > > On Apr 23, 2015, at 1:59 AM, Steven D'Aprano > wrote: > > > On Thursday 23 April 2015 11:53, Cem Karan wrote: > > > >> Precisely. In order

Re: To pickle or not to pickle

2015-05-08 Thread Cem Karan
_Data_Format Thanks, Cem Karan On May 8, 2015, at 5:58 AM, Cecil Westerhof wrote: > I first used marshal in my filebasedMessages module. Then I read that > you should not use it, because it changes per Python version and it > was better to use pickle. So I did that and now I find: >

Re: Best approach to create humongous amount of files

2015-05-21 Thread Cem Karan
won't be in any particular order; they'll just be uniquely named. As a test, I ran the code above, but I killed the loop after about 10 minutes, at which point about 500,000 files were created. Note that my laptop is about 6 years old, so you might get better performance on your mach

Re: Fixing Python install on the Mac after running 'CleanMyMac'

2015-05-29 Thread Cem Karan
I hope she has a time machine backup. I've had to do recoveries a couple of times, and it can really save you. Good luck, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: Using Python instead of Bash

2015-05-31 Thread Cem Karan
les): base_files.sort() for f in base_files: output = f + ".png" subprocess.call(['lpr', '-o', 'fit-to-page', '-o', 'media=A4', output]) def driver(): base_files = _collect_filenames() # If you use

Re: Hello Group and how to practice?

2015-05-31 Thread Cem Karan
ings to do is figuring out what you CAN do with a computer; some things that look like they should be easy, are actually major research questions. Just keep trying, and it will get easier over time. Good luck! Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: Hello Group and how to practice?

2015-05-31 Thread Cem Karan
On May 31, 2015, at 10:51 AM, Anders Johansen wrote: > Den søndag den 31. maj 2015 kl. 16.22.10 UTC+2 skrev Cem Karan: >> On May 31, 2015, at 9:35 AM, Anders Johansen wrote: >> >>> Hi my name is Anders I am from Denmark, and I am new to programming and >>>

Re: sys path modification

2015-07-27 Thread Cem Karan
e docs (https://docs.python.org/3/library/sys.html#sys.path), the first element of sys.path is the path to the directory of the script itself. If you modify this, you **will** break third-party code at some point. Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: PTH files: Abs paths not working as expected. Symlinks needed?

2017-02-18 Thread Cem Karan
t; > > Hey Terry! > This needs to get into more public docs than a one-off post on a newsgroup/ML +1! This is the first I've heard of this, and it sounds INCREDIBLY useful! Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: Python replace multiple strings (m*n) combination

2017-02-25 Thread Cem Karan
ithin it. The main problem with this method is how you're doing the replacements. If your replacement text can create a new string that matches a different regex that occurs later on, then you really should use what INADA Naoki suggested. Thanks, Cem Karan On Feb 25, 2017, at 2:08 PM, I

Re: Battle of the garbage collectors, or ARGGHHHHHH!!!!

2017-04-24 Thread Cem Karan
anyone done anything like this before? > > I know that experiments have been done. > Have you tried searching 'Python bdwgc garbage collection' or similar? I did google around a bit, but the results I found weren't relevant. I was hoping someone else on the list had tried, and simply hadn't gotten around to posting about it anywhere yet. Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: Battle of the garbage collectors, or ARGGHHHHHH!!!!

2017-04-25 Thread Cem Karan
the machine that I could test it on right now, but I'll give it a shot tomorrow and see how it works. I'll let everyone know what I find out. Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: Battle of the garbage collectors, or ARGGHHHHHH!!!!

2017-04-26 Thread Cem Karan
C API) is probably not going to work. I got interrupted (again) so I didn't have a chance to try the next trick and register the ctypes objects as roots from which to scan in bdwgc, but I'm hoping that roots aren't removed. If that works, I'll post it to the list. Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: Survey: improving the Python std lib docs

2017-05-17 Thread Cem Karan
I'd like to see complete signatures in the docstrings, so when I use help() on something that has *args or **kwargs I can see what the arguments actually are. Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: pip list --outdated gives all packages

2017-05-27 Thread Cem Karan
x27; Could you check the output of 'pip3 --version'? When I tested pip3 on my machine, 'pip3 list --outdated' only yielded the outdated packages, not a list of everything out there. I'm asking about 'pip3 --version' because I found that my PATH as an ordinary

Re: pip list --outdated gives all packages

2017-05-28 Thread Cem Karan
On May 27, 2017, at 11:10 AM, Cecil Westerhof wrote: > On Saturday 27 May 2017 16:34 CEST, Cem Karan wrote: > >> >> On May 27, 2017, at 7:15 AM, Cecil Westerhof wrote: >> >>> On Saturday 27 May 2017 12:33 CEST, Cecil Westerhof wrote: >>> >>&

Re: pip list --outdated gives all packages

2017-05-30 Thread Cem Karan
here some problems. Looks like you can not do certain > things in VirtualBox. But that is for another time.) > Get the same result. So maybe I should put it on the Debian list. Yeah, I have no idea what to tell you. Good luck! Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: Progress on the Gilectomy

2017-06-19 Thread Cem Karan
ory allocated from python's garbage collected heap on the C-side. Lot fewer headaches. Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list

Re: Progress on the Gilectomy

2017-06-20 Thread Cem Karan
On Jun 20, 2017, at 1:19 AM, Paul Rubin wrote: > Cem Karan writes: >> Can you give examples of how it's not reliable? > > Basically there's a chance of it leaking memory by mistaking a data word > for a pointer. This is unlikely to happen by accident and usually