variable declaration

2005-01-30 Thread Alexander Zatvornitskiy
+epsilon epselon=epsilon+1 print S It will print zero, and it is not easy to find such a bug! Even Visual Basic have 'Option Explicit' keyword! May be, python also have such a feature, I just don't know about it? Alexander, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

dict indexed by lists - ?

2005-02-03 Thread Alexander Zatvornitskiy
th touple: CPT={ ('b0','c0'):1, ('b0','c1'):0, ...and so on. But, where is one problem: indexes (or, more precisely, keys) are generated dynamically, like code below! I can't do it with touples. key=[] for up in uplinks: key.append(up.sta

dict indexed by lists - ?

2005-02-04 Thread Alexander Zatvornitskiy
Привет All! 04 февраля 2005 в 02:47, Alexander Zatvornitskiy в своем письме к All писал: AZ> I'am trying to make something like this: AZ> CPT={ ['b0','c0']:1, ['b0','c1']:0, ['b1','c0']:3, ['b1','c1']:

variable declaration

2005-02-05 Thread Alexander Zatvornitskiy
Hi Paddy! 03 Feb 2005 at 21:58, Paddy McCarthy wrote: >> Explicit' keyword! May be, python also have such a feature, I just >> don't know about it? Alexander, [EMAIL PROTECTED] PM> Advocates always say Type Checking, but so often it seems like Type PM> Constrictio

variable declaration

2005-02-05 Thread Alexander Zatvornitskiy
of classes: MyClass.epsElon=MyClass.epsilon+1 but it is solvable, I think. What do you think, is it a good idea? Alexander, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

variable declaration

2005-02-05 Thread Alexander Zatvornitskiy
variables, then, AM> unless you're specifically studying a new language just for personal AM> growth purposes, I think you might well be better off with a language AM> that DOES, at least until and unless your brain changes by other AM> means. Thank you for explanation of your opinion. Alexander, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

variable declaration

2005-02-05 Thread Alexander Zatvornitskiy
bute AM> to the development of Python's C-coded infrastructure, now could I?), AM> and as it happens I have a decent command (a bit rusty for lack of AM> recent use) of dozens of other languages, including several Basic AM> dialects and Visual Basic in particular. AM> It should take you about 20 seconds with Google to find this out AM> about me, you know? OK, 30 seconds if you're on a slow dialup modem AM> line. Ok, your are really cool guy. Also, I appreciate your contribution to Python's C infrastructure. I'am not as cool as you, but Python is not my first language too:) Alexander, [EMAIL PROTECTED] ---url: alex-zatv.narod.ru -- http://mail.python.org/mailman/listinfo/python-list

Howto access a enumeration in a COM TypeLib

2005-06-21 Thread Alexander Eisenhuth
w how to access the enum in Python. Any help and hints are very welcome. Regards Alexander PS.: I use the actual version of ActivePython 2.4. -- http://mail.python.org/mailman/listinfo/python-list

Re: Howto access a enumeration in a COM TypeLib

2005-06-21 Thread Alexander Eisenhuth
Thanks, thats it. Konstantin Veretennicov schrieb: import myserver print myserver.constants. P_OK > 0 > > Maybe you can access constants without makepy, I don't know. > > - kv -- http://mail.python.org/mailman/listinfo/python-list

COM makepy problem

2005-08-03 Thread Alexander Eisenhuth
--- [...] LCID = 0x0 IDssInterface_vtables_dispatch_ = 1 IDssInterface_vtables_ = [ [...] and everything works fine !!! Does anybody have a suggestion/idea/hint on that ??? Regards Alexander -- http://mail.python.org/mailman/listinfo/python-list

Re: COM makepy problem

2005-08-04 Thread Alexander Eisenhuth
James Kew schrieb: > "Alexander Eisenhuth" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >>ActivePython 2.4.1 >>Windows XP >> >>I write a COM Server in VC++ 6.0 using ATL. So far so good. While I >>develop I got sometimes s

Jargons of Info Tech industry

2005-08-25 Thread Alexander Zatvornitskiy
Привет Xah! 11 aug 2005 at 18:23, Xah Lee wrote: XL> Jargons of Info Tech industry XL> (A Love of Jargons) XL> Xah Lee, 2002 Feb XL> People in the computing field like to spur the use of spurious ...skipped... Look at this site for some info: http://lleo.aha.ru/na/en Alexa

variable declaration

2005-02-07 Thread Alexander Zatvornitskiy
this AM> newsgroup over the years, which _IS_ saying something. Oh, you're not AM> the only one, for sure -- there must have been a dozen before you, at AM> least. Fortunately, even though almost each and every one of them has AM> wasted more of everybody's time with such ideas, than even their AM> scare-tactics claim of ``wastes of time'' due to lack of declarations AM> could account for, Python is still intact. A few of the stubborn AM> lovers of declarations tried doing without, and, to their AM> astonishment, found out that everybody else, with years of Python AM> experience, was right, and they, without ANY such experience, were AM> wrong (just incredible, eh?!); others have gone away to find their AM> bliss in Perl, PHP, or whatever -- good riddance, and don't let the AM> door slam behind you as you go, please. Don't be so ... I don't find the equivalent english word. Smth like: Take it more easy. Alexander, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

variable declaration

2005-02-07 Thread Alexander Zatvornitskiy
y be smth like this: `S=0 ~S=0 S~=0 S`=0 and so on. But, I think, your idea look more preaty than my previous (with var keyword) Alexander, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

variable declaration

2005-02-08 Thread Alexander Zatvornitskiy
a. PO> On the other hand, taking all names used in a function and looking PO> for similar ones, e. g. by calculating the Levenshtein distance, PO> might be worthwhile... Hmm, what is the Levenshtein distance between 'x1' and 'x2'? Or between kappa_i and kappa_j? :) Alexander, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

graph visualisation

2005-02-08 Thread Alexander Zatvornitskiy
: draw_graph(bnet.dag); === Are there any packages with such ability? Also I need in drawing plots of functions. Alexander, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

variable declaration

2005-02-09 Thread Alexander Zatvornitskiy
gram) tested separately and in whole. But tests are not a silver bullet. static checking is also very usefull. What's why I feel variable declaration (or explicit variable definition) may help. Alexander, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

variable declaration

2005-02-09 Thread Alexander Zatvornitskiy
> established a reputation with his consistent long-term contribution to SH> Python and this newsgroup. Instead, ask yourself why your remarks SH> engender such a response from a pillar of the Python community. What SH> are your credentials? Well, for python community - 0. Now, you can only read my messages and think about them. After all, idiot who made contribution is still idiot, isn't it? (it's not about A.M., of course) Alexander, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Python, Matlab and AI question

2005-02-18 Thread Alexander Schmolck
Robert Kern <[EMAIL PROTECTED]> writes: > dataangel wrote: >> I'm a student who's considering doing a project for a Machine Learning class >> on pathing (bots learning to run through a maze). The language primarily >> used by the class has been Matlab. I would prefer to do the bulk of the >> proje

Re: Python, Matlab and AI question

2005-02-18 Thread Alexander Schmolck
Robert Kern <[EMAIL PROTECTED]> writes: > Alexander Schmolck wrote: > >> Actually, I've written a highlevel matlab-python bridge (based on bugfixed >> and >> slightly extended version of the original pymat) which is quite up-to-date; >> by >> and

[ANN] mlabwrap v0.9b3

2005-02-19 Thread Alexander Schmolck
I have recently uploaded mlabwrap v0.9b3, a high-level python to matlab(tm) bridge, you can get it from It should work with recent python >=2.3 and matlab(tm) >=6.0; I've used it extensively myself but this is the first announcement to a wider public -- so I'd v

Re: [ANN] mlabwrap v0.9b3

2005-02-19 Thread Alexander Schmolck
Alexander Schmolck <[EMAIL PROTECTED]> writes: > I'd very much like to hear some feedback (even if it's just "works fine"). Sorry to anyone who got a bounce -- obviously just on the day I write this my email account gets "temporarily deactivated" -- till I

Re: unicode encoding usablilty problem

2005-02-19 Thread Alexander Schremmer
an't even call functions ;-) > >>>> def f(**kw): > ... pass > ... >>>> f(**{"a": 0}) > Traceback (most recent call last): > File "", line 1, in ? > TypeError: f() keywords must be strings That is possible: >>> f(**{chr(ord("a")): 0}) >>> WFM. SCNR, Alexander -- http://mail.python.org/mailman/listinfo/python-list

[ANN] mlabwrap v0.9 released

2005-02-28 Thread Alexander Schmolck
This release just adds OS X support to setup.py (thanks to Josh Marshall). I've also made some recent improvements to the website, based on user feedback. In the absence of any bug reports so far I'd tentatively consider mlabwrap as stable. Dowload from: What

problem with recursion

2005-03-03 Thread Alexander Zatvornitskiy
basename(ele)) return res print rec(dirpath) Alexander, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

win32 COM and data types / direction

2005-03-04 Thread Alexander Eisenhuth
uot; import win32com.server.register win32com.server.register.UseCommandLine(PythonUtilities) -- Does anybody have experiences in this ? Any help/hints are very welcome. Alexander -- http://mail.python.org/mailman/listinfo/python-list

Re: Pre-PEP: Dictionary accumulator methods

2005-03-19 Thread Alexander Schmolck
"Raymond Hettinger" <[EMAIL PROTECTED]> writes: > The rationale is to replace the awkward and slow existing idioms for > dictionary > based accumulation: > > d[key] = d.get(key, 0) + qty > d.setdefault(key, []).extend(values) > > In simplest form, those two statements would now be coded m

Html or Pdf to Rtf (Linux) with Python

2004-12-14 Thread Alexander Straschil
Hello! I have to convert an HTML document to rtf with python, was just googling for an hour and did find nothing ;-( Has anybody an Idea how to convert (under Linux) an HTML or Pdf Document to Rtf? Thanks, AXEL -- http://mail.python.org/mailman/listinfo/python-list

Re: Pre-PEP: Dictionary accumulator methods

2005-03-20 Thread Alexander Schmolck
Beni Cherniavsky <[EMAIL PROTECTED]> writes: >> The relatively recent "improvement" of the dict constructor signature >> (``dict(foo=bar,...)``) obviously makes it impossible to just extend the >> constructor to ``dict(default=...)`` (or anything else for that matter) which >> would seem much less

Re: ntvdm problem on win2k

2005-04-09 Thread Alexander Schremmer
ks (as you said). Kind regards, Alexander -- http://mail.python.org/mailman/listinfo/python-list

Re: Array of Chars to String

2005-04-19 Thread Alexander Schmolck
James Stroud <[EMAIL PROTECTED]> writes: > But this seems ugly. I especially don't like "newstr += lttr" because it > makes > a new string every time. I am thinking that something like this has to be a > function somewhere already or that I can make it more efficient using a > built-in tool.

Re: How to "generalize" a function?

2005-04-24 Thread Alexander Schmolck
Thomas Köllmann <[EMAIL PROTECTED]> writes: > confFile.close You want ``confFile.close()`` -- the above won't do anything [1]. 'as Footnotes: [1] Best practice would be something like this (don't worry to much about it -- it just ensures the file is properly closed, even if somethin

Nice documentation Python / SWIG / C++

2005-04-25 Thread Alexander Eisenhuth
Hi alltogether, I found a nice and useful article for extenting python with C++ using SWIG. It describe from the scratch especially for Windows. Maybe this can be included somewhere on www.python.org. Here is the link: http://www.geocities.com/foetsch/python/extending_python.htm Alexander

Howto debug c++ (SWIG) extension under Windows

2005-04-26 Thread Alexander Eisenhuth
? Thank you in advance for your ideas, links, help, hints or whatever ... Regards Alexander -- http://mail.python.org/mailman/listinfo/python-list

Re: Howto debug c++ (SWIG) extension under Windows

2005-04-27 Thread Alexander Eisenhuth
Miki Tebeka schrieb: Hello Alexander, I can't figure out howto debug my c++ extension. If i compile it as release version, I've of course no chance to set a breakpoint. This is not true. You *can* set breakpoints in release mode, make sure to add debug information to your release build

Installing ibm_db package on Windows 7, 64-bit problem

2016-03-09 Thread Alexander Shmugliakov
Hello, has anybody successfully installed ibm_db package in the 32-bit Python 3.5.0 environment? This is the error messages I'm receiving: I know that the message about vcvarsall.bat is related to the Visual Studio configuration -- I don't have it on my computer. I have no 64-bit IBM Data Server

Re: Installing ibm_db package on Windows 7, 64-bit problem

2016-03-10 Thread Alexander Shmugliakov
On Thursday, March 10, 2016 at 10:09:26 AM UTC+2, Chris Angelico wrote: > On Thu, Mar 10, 2016 at 6:46 PM, Alexander Shmugliakov > wrote: > > Hello, has anybody successfully installed ibm_db package in the 32-bit > > Python 3.5.0 environment? This is the error messages I'

Re: set environmental variable from python

2014-11-01 Thread Alexander Blinne
Am 31.10.2014 um 02:22 schrieb Artur Bercik: > I have to set environmental variable in my windows PC as follows: > > variable name: GISBASE > > value: C:\GRASS-64 > > Is it possible to set it from python? > > import sys > > sys.path.append("C:\\GRASS-64") > > But how to give variable name? I

Re: Assigning a function to sys.excepthook doesn't work in WSGI

2015-02-18 Thread Alexander Sh
On Wednesday, February 18, 2015 at 7:52:19 PM UTC+3, Ian wrote: > > sys.excepthook is called just before the interpreter exits due to an > exception. In a mod_wsgi environment, having the interpreter exit just > because of an exception would be undesirable. I don't know exactly > what it's doing u

Re: Reference

2014-03-04 Thread Alexander Blinne
Am 03.03.2014 19:48, schrieb Terry Reedy: > The 'is' operator has three uses, two intended and one not. In > production code, 'is' tests that an object *is* a particular singular > object, such as None or a sentinel instance of class object. Just a bit of statistics on this one from a recent small

Re: Reference

2014-03-04 Thread Alexander Blinne
Am 04.03.2014 15:06, schrieb Chris Angelico: > https://github.com/Rosuav/ExceptExpr/blob/master/find_except_expr.py I have always found it quite nice that the python parser is so easy to use from within python itself. > Run across the Python stdlib, that tells me there are 4040 uses of > is/is no

Re: Kivy contest 2014

2014-03-19 Thread Alexander Taylor
The theme will be announced when the contest officially starts, the 15th April. On Wednesday, 19 March 2014 09:27:14 UTC, audiowerk wrote: > > Hi! > > Is there already a date when the theme will be announced? > > Am Sonntag, 16. März 2014 18:42:16 UTC+1 schrieb qua-non: >> >> Hi folks, >> >> Kivy

Re: Converting 5.223701009526849e-05 to 5e-05

2015-05-07 Thread Alexander Blinne
Am 03.05.2015 um 10:48 schrieb Ben Finney: > That's not as clear as it could be. Better is to be explicit about > choosing “exponential” format:: > > >>> foo = 5.223701009526849e-05 > >>> "{foo:5.0e}".format(foo=foo) > '5e-05' > Or even better the "general" format, which also works f

Re: [Datetime-SIG] Are there any "correct" implementations of tzinfo?

2015-09-12 Thread Alexander Belopolsky
On Sat, Sep 12, 2015 at 3:41 PM, Tim Peters wrote: > > If there are not, maybe the intended semantics should go > > by the wayside and be replaced by what pytz does. > > Changing anything about default arithmetic behavior is not a > possibility. This has been beaten to death multiple times on th

Re: [Datetime-SIG] Are there any "correct" implementations of tzinfo?

2015-09-12 Thread Alexander Belopolsky
On Sat, Sep 12, 2015 at 4:10 PM, Tim Peters wrote: > "A potential problem" with .astimezone()'s default is that it _does_ > create a fixed-offset zone. It's not at all obvious that it should do > so. First time I saw it, my initial _expectation_ was that it > "obviously" created a hybrid tzinfo

Re: [Datetime-SIG] Are there any "correct" implementations of tzinfo?

2015-09-13 Thread Alexander Belopolsky
On Sat, Sep 12, 2015 at 9:58 PM, Tim Peters wrote: > > That's why I believe PEP 495 followed by the implementation > > of fold-aware "as intended" tzinfos (either within stdlib or by third > > parties) is the right approach. > > Me too - except I think acceptance of 495 should be contingent upon

Re: [Datetime-SIG] Are there any "correct" implementations of tzinfo?

2015-09-13 Thread Alexander Belopolsky
On Sat, Sep 12, 2015 at 6:24 PM, Guido van Rossum wrote: > The repeated claims (by Alexander?) that astimezone() has the power of > pytz's localize() need to stop. Prove me wrong! :-) > Those pytz methods work for any (pytz) timezone -- astimezone() with a > default argume

Re: [Datetime-SIG] Are there any "correct" implementations of tzinfo?

2015-09-13 Thread Alexander Belopolsky
On Sat, Sep 12, 2015 at 10:25 PM, Tim Peters wrote: > > I will try to create a zoneinfo wrapping prototype as well, but I will > > probably "cheat" and build it on top of pytz. > > It would be crazy not to ;-) Note that Stuart got to punt on "the > hard part": .utcoffset(), since pytz only use

Re: [Datetime-SIG] Are there any "correct" implementations of tzinfo?

2015-09-14 Thread Alexander Belopolsky
On Sun, Sep 13, 2015 at 6:21 PM, Guido van Rossum wrote: > > Now, the question may remain how do people know what to set their timezone to. But neither pytz nor datetime can help with that -- it is up to the sysadmin. Note that this question is also out of the scope of "tzdist", IETF Time Zone D

Re: [Datetime-SIG] Are there any "correct" implementations of tzinfo?

2015-09-14 Thread Alexander Belopolsky
On Mon, Sep 14, 2015 at 3:30 PM, Tim Peters wrote: > > make it much cheaper to maintain global invariants like a sort order > > according to the UTC value > > It would be nice to have! .utcoffset() is an expensive operation > as-is, and being able to rely on tm_gmtoff would make that dirt-cheap

Re: [Datetime-SIG] Are there any "correct" implementations of tzinfo?

2015-09-14 Thread Alexander Belopolsky
On Mon, Sep 14, 2015 at 3:13 PM, Random832 wrote: > (No, I don't > *care* how that's not how it's defined, it is *in fact* true for the UTC > value that you will ever actually get from converting the values to UTC > *today*, and it's the only total ordering that actually makes any sense) > This

Re: [Datetime-SIG] Are there any "correct" implementations of tzinfo?

2015-09-14 Thread Alexander Belopolsky
On Mon, Sep 14, 2015 at 4:08 PM, Random832 wrote: > On Mon, Sep 14, 2015, at 15:48, Alexander Belopolsky wrote: > > On Mon, Sep 14, 2015 at 3:44 PM, Random832 > > wrote: > > > > > It is an > > > invariant that is true today, and therefore which you can&

Re: [Datetime-SIG] Are there any "correct" implementations of tzinfo?

2015-09-14 Thread Alexander Belopolsky
On Mon, Sep 14, 2015 at 3:44 PM, Random832 wrote: > It is an > invariant that is true today, and therefore which you can't rely on any > of the consumers of this 12 years old widely deployed code not to assume > will remain true. > Sorry, this sentence does not parse. You are missing a "not" so

Re: [Datetime-SIG] Are there any "correct" implementations of tzinfo?

2015-09-14 Thread Alexander Belopolsky
On Mon, Sep 14, 2015 at 4:22 PM, Tim Peters wrote: > > faster > > than CPython can look up the .utcoffset method. (At least for times > > within a few years around now.) A programmer who makes it slower should > > be fired. > > So any programmer who implements .utcoffset() in Python should be > f

Re: [Datetime-SIG] Are there any "correct" implementations of tzinfo?

2015-09-14 Thread Alexander Belopolsky
On Mon, Sep 14, 2015 at 3:49 PM, Tim Peters wrote: > It depends on how expensive .utcoffset() > is, which in turn depends on how the tzinfo author implements it. > No, it does not. In most time zones, UTC offset in seconds can be computed by C code as a 4-byte integer faster than CPython can lo

Adding PEP 495 support to dateutil

2015-09-16 Thread Alexander Belopolsky
On Sat, Sep 12, 2015 at 9:58 PM, Tim Peters wrote: > I think acceptance of 495 should be contingent upon > someone first completing a fully functional (if not releasable) > fold-aware zoneinfo wrapping. > After studying both pytz and dateutil offerings, I decided that it is easier to add "fold-a

Re: Adding PEP 495 support to dateutil

2015-09-19 Thread Alexander Belopolsky
[Tim Peters] > > I think acceptance of 495 should be contingent upon > someone first completing a fully functional (if not releasable) > fold-aware zoneinfo wrapping. [Alexander Belopolsky] > > I am making all development public early on and hope to see code reviews and

python-list@python.org

2014-08-03 Thread Alexander Williams
I want to break a PKCS7 signature that contains data + signature into separate: raw data & detached PKCS7 signature in python. I can get the data fro the signature because the verification routine returns it, but how can I get the detached signature ? def verify_pkcs7(data_bio, signature_bio, c

Re: Issue in printing top 20 dictionary items by dictionary value

2014-10-04 Thread Alexander Blinne
through the text. The get-method has a keyword argument for creating default values, which might be useful here. Another thing worth of mentioning is, that python has exactly this kind of machinery already built-in (collections.Counter), but you should try and implement a simple version of it yourself as exercise. Alexander -- https://mail.python.org/mailman/listinfo/python-list

Re: strange results

2011-09-17 Thread Alexander Kapps
On 17.09.2011 01:09, Fig wrote: I took out all of the color commands that were in the shape functions and all of the features to the 'draw_house' function showed showed up. I started putting the color commands back into the shape functions and have no problems with some of them but when I put the

Re: TK + MVC

2011-10-01 Thread Alexander Kapps
On 01.10.2011 14:41, Emeka wrote: Hello All, I need a basic example where MVC pattern is used with Python TK. I'm still not 100% sure if I really understand the MVC pattern. Some say the view and the model must not interact directly, some say the view must not access the controller (but the

Re: TK + MVC

2011-10-02 Thread Alexander Kapps
On 03.10.2011 00:15, Emeka wrote: Greg, Do you have an example where the Controller is connected? What do you mean? In my example, the Controller *is* connected (to both the View and the Model.) -- http://mail.python.org/mailman/listinfo/python-list

Re: TK + MVC

2011-10-02 Thread Alexander Kapps
On 02.10.2011 04:40, Gregory Ewing wrote: Alexander Kapps wrote: But I think a simple (and quick 'n' dirty) Tk MVC example can look like this: The Controller doesn't seem to add any value in that example. You might as well connect the Model and Views directly to each other.

Re: Usefulness of the "not in" operator

2011-10-08 Thread Alexander Kapps
On 09.10.2011 01:35, Tim Roberts wrote: Roy Smith wrote: In article<4e906108$0$27980$426a3...@news.free.fr>, candide wrote: After browsing source code, I realize that parenthesis are not necessary ("not" has higher precedence than "in"). Here's my take on parenthesis: If you need to look

Re: Usefulness of the "not in" operator

2011-10-10 Thread Alexander Kapps
On 08.10.2011 18:08, Steven D'Aprano wrote: Let's define the boolean values and operators using just two functions: [SNIP] Have you just explained Church booleans in an understandable language? Awesome. I still have to chew on this, but I think this is the first time where I might understan

Re: hi can someone help please key bind

2011-10-15 Thread Alexander Kapps
On 15.10.2011 19:30, Gary wrote: Hi im trying to use key bind on Tkinter to call this function def Start(): for i in range(60,-1,-1): ent['text'] = i time.sleep(1) root.update() ent['text'] = 'Time Out!' root.update() i know the function is ok as i have assigned a button and i calls the functio

Re: Loop through a dict changing keys

2011-10-15 Thread Alexander Kapps
On 15.10.2011 20:00, Gnarlodious wrote: What is the best way (Python 3) to loop through dict keys, examine the string, change them if needed, and save the changes to the same dict? So for input like this: {'Mobile': 'string', 'context': '', 'order': '7', 'time': 'True'} I want to booleanize 'Tr

Re: Usefulness of the "not in" operator

2011-10-15 Thread Alexander Kapps
On 10.10.2011 19:29, Nobody wrote: On Sun, 09 Oct 2011 02:25:27 +0200, Alexander Kapps wrote: Even if it's off-topic, could you add some similar explanations for Church numerals (maybe Lambda calculus it isn't too much?) The Church numeral for N is a function of two arguments whi

Re: What I do and do not know about installing Python on Win 7 with regard to IDLE.

2011-11-24 Thread Alexander Kapps
On 24.11.2011 22:22, W. eWatson wrote: Whoops, I thought I was replying to Matt Meyers just above you. Above who? As said by somebody already, most people use a mail-client (Thunderbird/Outlook) or a Usenet client to read this forum. Google Groups is (In My Opinion at least) just crap (and s

Re: What I do and do not know about installing Python on Win 7 with regard to IDLE.

2011-11-24 Thread Alexander Kapps
On 25.11.2011 00:18, Alexander Kapps wrote: Do you get an "Edit with IDLE" then? And even if not. Why are you so obsessive about IDLE? I mean, seriously, IDLE is just a bare-level if-nothing-else-is-available editor/IDE. It's better than notepad, OK. I really don't b

Re: What I do and do not know about installing Python on Win 7 with regard to IDLE.

2011-11-24 Thread Alexander Kapps
On 25.11.2011 01:04, Steven D'Aprano wrote: So by your reasoning, that's at least 20 ways to infect my Linux system. I never realised just how insecure Linux must be! Yes, there are 20+ ways to "infect" your (and mine) Linux system. You cannot trust *any* kind of 3rd party code. Period. Hav

Re: What I do and do not know about installing Python on Win 7 with regard to IDLE.

2011-11-25 Thread Alexander Kapps
On 25.11.2011 05:49, Dennis Lee Bieber wrote: On Fri, 25 Nov 2011 01:32:08 +0100, Alexander Kapps declaimed the following in gmane.comp.python.general: The main difference here is, that Linux makes it easy to seperate administrative accounts from end-user accounts, So does Win7

Re: Pragmatics of the standard is() function

2011-11-26 Thread Alexander Kapps
On 26.11.2011 22:20, candide wrote: You already got answers for the "is" vs. "==" difference. I'd like to add the following. In which cases should we use the is() function ? "is" is not a function, It's an operator, just like == or +. is() function makes comparaison of (abstract represent

Re: Help about Xlib Library in Python

2011-12-17 Thread Alexander Kapps
On 16.12.2011 05:55, 阮铮 wrote: Hi, A question about Xlib Library in Python troubled me for several days and I finally found this email list. I hope someone could answer my question. I think it is easy for experienced user. I would like to write a small script to response my mouse click in root

Re: Text Processing

2011-12-20 Thread Alexander Kapps
On 20.12.2011 22:04, Nick Dokos wrote: I have a text file containing such data ; ABC --- -2.0100e-018.000e-028.000e-05 -2.e-010.000e+00 4.800e-04 -1.9900e-014.000e-021.600e-04

Re: Python education survey

2011-12-31 Thread Alexander Kapps
On 31.12.2011 19:23, Roy Smith wrote: Why do I waste my time reading your pretentious self-important nonsense? http://xkcd.com/386/ ;) Why ROFLMAO when double-plus funny works just as well? xkcd/386 has been the excuse for replying to RR for ages and I still don't understand why he gets

Re: .format vs. %

2011-12-31 Thread Alexander Kapps
On 31.12.2011 19:44, davidfx wrote: Thanks for your response. I know the following code is not going to be correct but I want to show you what I was thinking. formatter = "%r %r %r %r" print formatter % (1, 2, 3, 4) What is the .format version of this concept? formatter = "{0} {1} {2} {3}

Re: python curses wrapper

2011-12-31 Thread Alexander Kapps
On 31.12.2011 20:24, Mag Gam wrote: Hello, I have been struggling reseting the terminal when I try to do KeyboardInterrupt exception therefore I read the documentation for curses.wrapper and it seems to take care of it for me, http://docs.python.org/library/curses.html#curses.wrapper. Can someo

Re: python curses wrapper

2011-12-31 Thread Alexander Kapps
On 31.12.2011 20:34, Alexander Kapps wrote: On 31.12.2011 20:24, Mag Gam wrote: Hello, I have been struggling reseting the terminal when I try to do KeyboardInterrupt exception therefore I read the documentation for curses.wrapper and it seems to take care of it for me, http://docs.python.org

Re: Python education survey

2011-12-31 Thread Alexander Kapps
On 01.01.2012 03:36, Grant Edwards wrote: On 2011-12-31, Alexander Kapps wrote: On 31.12.2011 19:23, Roy Smith wrote: Why do I waste my time reading your pretentious self-important nonsense? http://xkcd.com/386/ ;) Why ROFLMAO when double-plus funny works just as well? xkcd/386 has

Re: Spamming PyPI with stupid packages

2012-01-01 Thread Alexander Kapps
Uh oh, should I really send this? ... Yes. Yes, I should! Sorry, I cannot resists. allow everyone to do "import girlfriend" I'm betting on a joke, like antigravity only significantly less funny and more sexist. Absolutely not funny. I hope that someday people will understand that sexism i

Re: Python 3.3 vs. MSDOS Basic

2013-02-18 Thread Alexander Blinne
t n; int count; int num; while(m<=100) { m++; n = m; count = 0; while(n != 1) { count++; if(n % 2 == 0) { n = n / 2; } else { n = n*3 + 1; } } if(count > max) { max = count; num = m; } } printf(&quo

Re: Python 3.3 vs. MSDOS Basic

2013-02-19 Thread Alexander Blinne
unsigned int n; the program runs in 0.68 sec instead of 0.79, so there is some shortcut. If changed into signed int n; there is a veeery long, perhaps infinite loop. Greetings Alexander -- http://mail.python.org/mailman/listinfo/python-list

Re: iterating over a list as if it were a circular list

2013-03-07 Thread Alexander Blinne
Am 07.03.2013 10:27, schrieb Sven: > Now I would like to iterate over P and place one N at each point. > However if you run out of N I'd like to restart from N[0] and carry on > until all the points have been populated. > So far I've got (pseudo code) > > i = 0 > for point in points: > put N[i

Re: iterating over a list as if it were a circular list

2013-03-07 Thread Alexander Blinne
Am 08.03.2013 00:49, schrieb Alexander Blinne: > http://docs.python.org/3/library/itertools.html#itertools.repeat obviously I was aiming for http://docs.python.org/2/library/itertools.html#itertools.cycle here Greetings -- http://mail.python.org/mailman/listinfo/python-list

Re: Can I iterate over a dictionary outside a function ?

2013-04-11 Thread Alexander Blinne
Am 11.04.2013 11:48, schrieb inshu chauhan: > I have a prog in which a functions returns a dict but when I try to > iterate over the dict using iterkeys, It shows an error. 1) Show us your code in form of a minimal "working" example, "working" means that it should show us what you expect it to do

Re: Stackless Python

2006-01-14 Thread alexander . limi
in years - that we know of, at least. :) [1] http://www.zope.org/Members/4am/debugspinningzope -- Alexander Limi Plone Co-Founder http://plone.org -- http://mail.python.org/mailman/listinfo/python-list

Re: text editor suggestion?

2006-08-20 Thread Alexander Jakopin
John Salerno <[EMAIL PROTECTED]> wrote: > Ok, I know it's been asked a million times, but I have a more specific > question so hopefully this won't be just the same old post. I've tried a > few different editors, and I really like UltraEdit, but it's > Windows-only and I'm working more on Linux

Re: Tkinter: populating Mac Help menu?

2006-10-11 Thread Alexander Schliep
eforge.net/Download/ The menu code is at <http://svn.sourceforge.net/viewvc/gato/ trunk/Gato/Gato.py?revision=275&view=markup> Alexander -- Alexander Schliep [EMAIL PROTECTED] http://algorithmics.molgen.mpg.de -- http://mail.python.org/mailman/listinfo/python-list

dynamic creation of global Identifier

2006-10-11 Thread Alexander Eisenhuth
sent exec "global ... create a identifier in the global namespace. The next thing I want to do is to create a identifier in a packages namespace anyhow from where init() is called. How can I (or can I not) access from within a function the namespace of the "package" where it is defi

.doc to html and pdf conversion with python

2006-10-14 Thread Alexander Klingenstein
I need to take a bunch of .doc files (word 2000) which have a little text including some tables/layout and mostly pictures and comvert them to a pdf and extract the text and images separately too. If I have a pdf, I can do create the html with pdftohtml called from python with popen. However I n

Re: .doc to html and pdf conversion with python

2006-10-14 Thread Alexander Klingenstein
> Is there some reason you really want to convert to PDF first? You can > get much better HTML right from the Word doc. You'll lose a lot of info > going from PDF to HTML. Right now, two reasons: Printing to PDF allows me to create the PDF "for the web" which means it has a much smaller filesize n

Looking for assignement operator

2006-10-17 Thread Alexander Eisenhuth
Hello, is there a assignement operator, that i can overwrite? class MyInt: def __init__(self, val): assert(isinstance(val, int)) self._val = val a = MyInt(10) # Here i need to overwrite the assignement operator a = 12 Thanks Alexander -- http

Re: Looking for assignement operator

2006-10-17 Thread Alexander Eisenhuth
Wow, thanks a lot for your quick answers. That assignement is no operator, but a statemant is a pity, but indeed I came foward with overwritten methods for numeric types Regards Alexander -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter--does anyone use it for sophisticated GUI development?

2006-10-20 Thread Alexander Burger
Paul Rubin wrote: > There's a language called Picolisp in which this is the standard way > to do a gui. Picolisp includes a java applet that can do some stuff > that standard html widgets can't. These days I suppose it should use > AJAX. Yes, in fact it does. The curr

Heap cleanup in python extension

2006-11-15 Thread Alexander Eisenhuth
nt the ref counting for the containing list, int, ... PyObjects? 2) Do I need to Py_CLEAR( PyObject *o) for every created PyObject? Thanks a lot for every answer/hint. Regards Alexander -- http://mail.python.org/mailman/listinfo/python-list

Re: Very newbie programming

2006-06-10 Thread Alexander Schmolck
TheSaint <[EMAIL PROTECTED]> writes: > # Filling the c with the list of devices which are recorded to be mounted > > d = filter((lambda a: a[:2] =='/d'),mnt.readlines()) # non /dev-mounts are > off > d = map((lambda a: a.split()[:1]),d) # only the first info column is used Just focusing one one

Re: tkinter to mpeg

2006-10-04 Thread Alexander Schliep
a line for example. It would be trivial to wrap the Tkinter canvas in an object which records what function is called when. For the basic canvas items mapping this to SVG is quite straightforward. Alexander PS: There is some python code to output SVG, which I didn't use since I wanted t

py-ext: casting pointers to ints on 32bit and 64bit systems

2006-01-27 Thread Alexander Schmolck
what's the best approach to write C(++)-extension code that has to create a python int from a C pointer and vice versa so that it works smoothly on 32 bit and 64 platforms (on which sizeof(int) != sizeof(*void)) equally work (under unix,mac&windows and with gcc, vc and borland)? Currently the rele

Re: Python vs. Lisp -- please explain

2006-02-19 Thread Alexander Schmolck
"Terry Reedy" <[EMAIL PROTECTED]> writes: > <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > In learning Python I've read more about Lisp than when I was actually > > trying to learn it, and it seems that the two languages have lots of > > similarities: > > > > http://www.norvig.

<    1   2   3   4   5   6   >