Angelina Joli Paris Hilton MARISA MILLER

2007-04-24 Thread M M
Angelina Joli Paris HiltonMARISA MILLER www.alphasearch.gr -- http://mail.python.org/mailman/listinfo/python-list

Angelina Joli Paris Hilton MARISA MILLER

2007-04-24 Thread M M
Angelina Joli Paris Hilton MARISA MILLER www.alphasearch.gr -- http://mail.python.org/mailman/listinfo/python-list

Re: Let's talk about debuggers!

2017-10-25 Thread m
explicit line of code telling the debugger to stop. +1 It's excellent piece of software. I started using it when debugging remote/server things, and ended with using eveywhere. It has two drawbacks: it doesn't remember your commandline, watches and sizes of panes, and h

Re: Spam levels.

2018-05-21 Thread m
ring NNTP server and do whack the mole game for myself? Maybe join forces and establish such server for public use? p. m. -- https://mail.python.org/mailman/listinfo/python-list

Re: "Data blocks" syntax specification draft

2018-05-21 Thread m
of your syntax requires images, then it's bad syntax. And re PDF - i opened that pdf with one click - hopefully I have configured my thunderbird to that. And what do I see? Completely unreadable code, because you used bizzare, non monospaced, font to code examples. p. m. -- https://mail.python.org/mailman/listinfo/python-list

Re: kivy [quick report]

2018-10-08 Thread m
W dniu 05.10.2018 o 18:43, Stefan Ram pisze: > BTW: For Android, there is a "Bulldozer" (or some such) that > can create an APK. I wonder what the best way to package one's > kivy program to distribute it to Windows users? I use wine + pyinstaller. regards m --

Re: Python versus Perl ?

2005-02-08 Thread m
Courageous wrote: If Python is better than Perl, I'm curious how really significant those advantages are ? speedwise, i think perl is faster than python and python performed the slowest as shown in http://www.flat222.org/mac/bench/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python versus Perl ?

2005-02-08 Thread m
Fredrik Lundh wrote: if you use Python mostly to write empty loops, your programming license should be revoked. the benchmark author seems to have realized that, as can be seen from the "it's dead" paragraph at the top of the page, which makes me wonder why you posted this link... i was trying t

Re: Python versus Perl ?

2005-02-08 Thread m
Irmen de Jong wrote: m wrote: Why do you care? Have you read http://www.python.org/moin/PythonSpeed ? --Irmen i had not read it. thanks for pointing it out! -- http://mail.python.org/mailman/listinfo/python-list

Re: Python versus Perl ?

2005-02-08 Thread m
You really will have to convince people here that execution speed is a real issue for your programming task (in order to continue this discussion). Otherwise the debate will go south real quick. Keep well Caleb On Tue, 08 Feb 2005 12:17:05 -0600, m <[EMAIL PROTECTED]> wrote: Courageous

Re: Newbie CGI problem

2005-02-18 Thread m
m wrote: gives just one hi for me. " Content-type: text/html hi " I get this -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie CGI problem

2005-02-18 Thread m
Rory Campbell-Lange wrote: #!/usr/bin/python import cgi print "Content-type: text/html\n\n" print "hi" Gives me the following in my browser: ''' hi Content-type: text/html hi ''' Why are there two 'hi's? Thanks, Rory gives just one hi for me. -- http://mail.python.org/mailman/listinfo/python-list

Re: We will be moving to GitHub

2016-01-04 Thread m
an > independent repository. > It sounds like CVS. How can you be sure that your code is consistent if each of your file has it's own, independent history? Use tags like in CVS? r. m. -- https://mail.python.org/mailman/listinfo/python-list

Re: GitHub's “pull request” is proprietary lock-in

2016-01-04 Thread m
vast majority will need/want to follow the changes and eg. will use Gitlabs propertiary binary. r. m. -- https://mail.python.org/mailman/listinfo/python-list

Re: GitHub's “pull request” is proprietary lock-in

2016-01-04 Thread m
ly. And I can do nothing with it, because nobody will want to cooperate with me - they will use github instead of git. Sad thing is that it's rather inevitable and not moving python repo to github or not won't stop the process. However - wise would be to have github-like software on own servers. p. m. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Worst Practices

2015-02-26 Thread m
W dniu 25.02.2015 21:45, Mark Lawrence pisze: http://www.slideshare.net/pydanny/python-worst-practices Any that should be added to this list? Any that be removed as not that bad? I disagree with slide 16. If I wanted to use long variable names, I would still code in Java. regards m

[OT]Re: what is wrong with d.clear()?

2015-03-05 Thread m
nd it to me?" I suspect that in most cases the senders do not know that that is what their mail program is sending, and do it to let them know that their mesdsage could not be read. I suspect that in most cases sender don't understand what do you mean saying "So why di

Re: bottle app "crashes"

2015-07-06 Thread m
s they run on my own teeny-tiny Linux VM (256MB > ram/5GB disk with 1 Xeon core). > > I simply log in and type "screen python3 myapp.py" and remember to exit > with ctrl-A D. I would suggest using supervisor. p. m. -- https://mail.python.org/mailman/listinfo/python-list

Re: Split on multiple delimiters, and also treat consecutive delimiters as a single delimiter?

2015-07-28 Thread m
W dniu 28.07.2015 o 15:55, Victor Hooi pisze: > I know the regex library also has a split, unfortunately, that does not > collapse consecutive whitespace: > > In [19]: re.split(' |', f) Try ' *\|' p. m. -- https://mail.python.org/mailman/listinfo/python-list

Re: Packaging and deployment of standalone Python applications?

2015-09-17 Thread m
sel/fpm/wiki - it's really nice tool, which converts python package into .deb, .rpm - so assuming that "everyone has some (2.x/3.x) python" is true, you can just ship .deb or .rpm files. reg m -- https://mail.python.org/mailman/listinfo/python-list

Re: Einstein's Riddle

2015-09-19 Thread m
his messages finally was processed after > years stuck in the queue. It's posted from @gmail account, and Gmail started near 2004 r. m. -- https://mail.python.org/mailman/listinfo/python-list

Re: Strong typing implementation for Python

2015-10-13 Thread m
must be a nightmare to work with. IMHO mainly because their naming convention. They just love typing long names. If they used named like in python, that "vast amount of noise added to code" would be just "a bit noise added to code" r. m. -- https://mail.python.org/mailman/listinfo/python-list

Monitor and compare two log files in real time

2008-08-06 Thread m
I have a script I would like to write but I am not sure of where to start / approach. Perhaps someone could help direct me in the right direction. Any advice is appreciated. I would like to write a python script that monitors two log files. If a certain string, lets say string1 shows up in logfile

Very odd output from subprocess

2010-06-30 Thread m
chine. If I add the line: for l in line: print ord(l),'\t',l after the first readline, I get the following: 27  91 [ 48 0 48 0 109 m 27  91 [ 51 3 55 7 109 m before the codes begin for the string as it appears if I just print it.

Re: Very odd output from subprocess

2010-07-05 Thread m
On Jul 1, 12:42 am, Nobody wrote: > On Wed, 30 Jun 2010 21:12:12 -0700, m wrote: > > If I add the line: > >      for l in line: print ord(l),'\t',l > > after the first readline, I get the following: > > > 27           > > 91         [ > > 4

Defining features in a list

2012-09-07 Thread M Whitman
Good Morning, I have been recently trying to define all of the features in a list but have been running into errors. I would like to define the features similar to the following print statement. Any advice would be appreciated. I'm trying to transition my output from a text file to excel and

Re: Defining features in a list

2012-09-07 Thread M Whitman
Dave- By features I was refering to items in the list. For background the arcpy module is used for geoprocessing of geographic information. I'm using my script to get totals for features in a dataset that I receive on a regular basis- for example total number of hydrants, total number of hydra

Re: Importing Classes from child folders.

2013-01-17 Thread Tobias M.
On an import python looks for the module in the directories specified in sys.path. The documentation on sys.path says: "As initialized upon program startup, the first item of this list is the directory containing the script that was used to invoke the Python interpreter." [1] So it`s importa

Else statement executing when it shouldnt

2013-01-20 Thread eli m
an else statement is running when it shouldnt be. It is on the last line. Whenever i am in the math or game function, when i type in main, it goes back to the start of the program, but it also says not a valid function. I am stumped! Here is my code: #Cmd #Created By Eli M. #import modules

Re: Else statement executing when it shouldnt

2013-01-20 Thread eli m
On Sunday, January 20, 2013 8:54:13 PM UTC-8, René Klačan wrote: > You have to break while loop not to execute else branch > > > Rene > > > Can you explain in more detail please. -- http://mail.python.org/mailman/listinfo/python-list

Re: Else statement executing when it shouldnt

2013-01-20 Thread eli m
> > > > Your else is lined up with while, not with if. > > > > -m > > > > > > -- > > Lark's Tongue Guide to Python: http://lightbird.net/larks/ > > > > When a friend succeeds, I die a little. Gore Vidal It

Re: Else statement executing when it shouldnt

2013-01-20 Thread eli m
On Sunday, January 20, 2013 8:40:47 PM UTC-8, eli m wrote: hint: Use the comments in the code to find out where my error is. > > Here is my code: > > #Cmd > > #Created By Eli M. > > #import modules > > import random > > import math > > gtn = 0 &

Re: Else statement executing when it shouldnt

2013-01-20 Thread eli m
On Sunday, January 20, 2013 8:52:12 PM UTC-8, Chris Angelico wrote: > On Mon, Jan 21, 2013 at 3:40 PM, eli m wrote: > > > an else statement is running when it shouldnt be. It is on the last line. > > Whenever i am in the math or game function, when i type in main, it goes >

Re: Else statement executing when it shouldnt

2013-01-21 Thread eli m
On Sunday, January 20, 2013 9:56:59 PM UTC-8, alex23 wrote: > On Jan 21, 2:40 pm, eli m wrote: > > > an else statement is running when it shouldnt be. It is > > > on the last line. Whenever i am in the math or game > > > function, when i type in main, it goes b

Re: Importing class from another file

2013-01-23 Thread Tobias M.
Hi, Kevin Holleran wrote: Traceback (most recent call last): File "testing.py", line 1, in from Sub_Dir.My_Class import * ImportError: No module named Sub_Dir.My_Class Make sure, the script you execute by passing it to the python interpreter is in the parent directory of Sub_Dir. A

Re: using split for a string : error

2013-01-24 Thread Tobias M.
Hi, do a "print sp" after the split and you might see that the strings don't look as you expected. There might be leading or trailing whitespaces in the splitted strings and in sp[10] there probably is a line break "\n" at the end. To remove those unwanted characters you could use the strip()

Re: using split for a string : error

2013-01-24 Thread Tobias M.
Chris Angelico wrote: The other thing you may want to consider, if the values are supposed to be integers, is to convert them to Python integers before comparing. Currently, you're working with strings. Replace this: if sp[9] == sp[10]: with this: if int(sp[9]) == int(sp[10]): I thought of t

Re: using split for a string : error

2013-01-24 Thread Tobias M.
Chris Angelico wrote: I'd not consider the performance, but the correctness. If you're expecting them to be integers, just cast them, and specifically _don't_ catch ValueError. Any non-integer value will then noisily abort the script. (It may be worth checking for blank first, though, depending o

Re: using split for a string : error

2013-01-24 Thread Tobias M.
Am 24.01.2013 13:02, schrieb Chris Angelico: On Thu, Jan 24, 2013 at 10:58 PM, Tobias M. wrote: Chris Angelico wrote: I'd not consider the performance, but the correctness. If you're expecting them to be integers, just cast them, and specifically _don't_ catch ValueError.

Re: python: HTTP connections through a proxy server requiring authentication

2013-01-28 Thread Saju M
Hi , Thanks barry, I solved that issue. I reconfigured squid3 with ncsa_auth, now its working same python code. Earlier I used digest_pw_auth. Actually I am trying to fix an issue related to python boto API. Please check this post https://groups.google.com/forum/#!topic/boto-users/1qk6d7v2HpQ

Re: Http post and http get

2012-02-06 Thread n3d!m
Cookies work because I am able to login on website and GET other pages. -- http://mail.python.org/mailman/listinfo/python-list

Re: log and figure out what bits are slow and optimize them.

2012-02-10 Thread Saju M
Hi, Yes i saw profile module, I think i have to do function call via cProfile.run('foo()') I know, we can debug this way. But i need a fixed logging system .. On Fri, Feb 10, 2012 at 6:08 PM, Arnaud Delobelle wrote: > On 10 February 2012 12:30, sajuptpm wrote: > > Hi, > > > > I want to lo

Re: log and figure out what bits are slow and optimize them.

2012-02-10 Thread Saju M
On Fri, Feb 10, 2012 at 6:12 PM, Saju M wrote: > Hi, > > Yes i saw profile module, > I think i have to do function call via > > cProfile.run('foo()') > > I know, we can debug this way. > > But i need a fixed logging system .. > > > > On

Re: log and figure out what bits are slow and optimize them.

2012-02-10 Thread Saju M
will cause any performance issue ?? On Fri, Feb 10, 2012 at 6:18 PM, Saju M wrote: > > > On Fri, Feb 10, 2012 at 6:12 PM, Saju M wrote: > >> Hi, >> >> Yes i saw profile module, >> I think i have to do function call via >> >> cProfile.run(&#

Re: generate Windows exe on Linux

2012-02-22 Thread Waldek M.
On Wed, 22 Feb 2012 04:12:29 -0800 (PST), Plumo wrote: > I have a python script using only the standard libraries. > Currently I use a Windows VM to generate exe's, which is cumbersome. And what exactly *is* this exe about? > Has anyone had success generating exe's from within Linux? That doesn'

Re: generate Windows exe on Linux

2012-02-23 Thread Waldek M.
On Wed, 22 Feb 2012 18:42:11 +0100, Jérôme wrote: >>> Has anyone had success generating exe's from within Linux? >> >> That doesn't seem to have anything to do with Python, >> but you might want to google for cross-compiling. > > I think his question is totally python related. > > As I understa

Re: New learner of Python--any suggestion on studying it?

2012-03-19 Thread Wim M
Hi, this might be of interest to you: http://www.udacity.com/overview/Course/cs101 All the best Wimm On 2012-03-19, yan xianming wrote: > Hello all, > > I'm a new learning of Python. > > > > Can someone give me some suggestion about it? > > thanks > xianming -- Wim. -- http://mail.python.org

Re: python 3 constant

2011-06-22 Thread Waldek M.
Dnia Wed, 22 Jun 2011 22:17:49 +0100, Noah Hall napisał(a): > On Wed, Jun 22, 2011 at 7:54 PM, sidRo wrote: >> How to declare a constant in python 3? > > There aren't true constants in Python, but instead we use a standard > defined by PEP 8, which states constants are in all caps, for example,

Re: python 3 constant

2011-06-23 Thread Waldek M.
Dnia Thu, 23 Jun 2011 17:22:37 +1000, Ben Finney napisał(a): > If you mean creating a binding which can't be re-bound: −1. Perhaps. Or perhaps that could be done in some other fashion; I admit that I usually stick to more strict languages and while Python's flexibility is great... I'm really missi

Re: python 3 constant

2011-06-23 Thread Waldek M.
Dnia Fri, 24 Jun 2011 01:29:38 +1000, Chris Angelico napisał(a): > You can have them in Python. Just run your code through cpp (the C > preprocessor) first. Voila! > > It's handy for other things too. Don't like Python's lack of "then" > and "end if"? [...] Yup, got the sarcasm, that's for sure. B

Re: python 3 constant

2011-06-25 Thread Waldek M.
Dnia Thu, 23 Jun 2011 23:04:37 +1000, Ben Finney napisał(a): >>> The ability to re-bind any attribute, even ones which the author >>> thought should be constant, makes writing unit tests much easier. I >>> don't see that putative benefits of constant bindings would be >>> anywhere near as valuable.

Re: python 3 constant

2011-06-25 Thread Waldek M.
Dnia Thu, 23 Jun 2011 20:04:43 -0700 (PDT), alex23 napisał(a): >> But your point was...? > > That it's easier for you to find ways to achieve what you want than it > is require Python to change to accommodate your need. And when exactly did I write that I require anyone to change anything? I'd li

Re: python 3 constant

2011-06-25 Thread Waldek M.
Dnia Fri, 24 Jun 2011 08:00:06 +1000, Chris Angelico napisał(a): >> Yup, got the sarcasm, that's for sure. >> But your point was...? > > That if you want something, there's usually a way to get it. > Sometimes, giving someone what they want - or showing them how to get > it - makes it obvious to t

Re: python 3 constant

2011-06-25 Thread Waldek M.
Dnia Sat, 25 Jun 2011 20:59:17 +1000, Chris Angelico napisał(a): > In all seriousness, sometimes adding features to one language is best > done by dropping to another. This is probably not as useful in > interpreted languages like Python, but I have on multiple occasions > run code through the C pr

Re: ANN: pyparsing 1.5.6 released!

2011-07-01 Thread Waldek M.
Dnia Thu, 30 Jun 2011 23:09:18 -0700 (PDT), Paul McGuire napisał(a): > After about 10 months, there is a new release of pyparsing, version > 1.5.6. This release contains some small enhancements, some bugfixes, > and some new examples. Thanks! That is great news. I'm not using pyparsing right now

Re: Testing if a global is defined in a module

2011-07-05 Thread Waldek M.
Dnia Tue, 5 Jul 2011 14:11:56 + (UTC), Grant Edwards napisał(a): > Because those specially-formatted comments are wrong. ... because? Not in sarcasm mode; just curious why you don't like them. Br. Waldek -- http://mail.python.org/mailman/listinfo/python-list

Re: Testing if a global is defined in a module

2011-07-05 Thread Waldek M.
Dnia Wed, 06 Jul 2011 03:36:24 +1000, Steven D'Aprano napisał(a): > Because unless you are extremely disciplined, code and the comments > describing them get out of sync. [...] True, but that gets far worse with external docs. Do you have in mind any better replacement? Br. Waldek -- http://mail.

Re: Implicit initialization is EVIL!

2011-07-06 Thread Waldek M.
t; > Wow nice corner case. Can you come up with at least five of them > though? You and I both know that the vast majority of GUI's require > visible windows. - 90% of MS DOS games; should I list them here? ;-) - M$ Windows taskbar-only applications - Linux apps using framebuffer

Re: How to get or set the text of a textfield?

2011-07-10 Thread Waldek M.
Dnia Sun, 10 Jul 2011 21:14:10 -0500, Anthony Papillion napisał(a): > > So I've built a UI with Glade and have loaded it using the standard > Python code. In my UI, I have a textfield called txtUsername. How do I > get and set the text in this field from my Python code? http://developer.gnome.org

Re: Python ++ Operator?

2011-07-16 Thread Waldek M.
Dnia Fri, 15 Jul 2011 23:09:02 +0200, Stefan Behnel napisał(a): [...] >> array[count++]=value; >> >> or the more direct pointer management: >> *ptr++=value; > > More direct, sure. But readable? Well, only when you know what this > specific pattern does. If you have to think about it, it may end u

Re: Python threading/multiprocessing issue.

2011-07-16 Thread Waldek M.
Dnia Fri, 15 Jul 2011 22:15:15 -0700, Dennis Lee Bieber napisał(a): > And (so far as I understand it) each process can claim its own CPU > core, whereas threads share the active core. I do not think so. AFAIK, threads may be distributed over differrent CPUs (just like in any other programmin

Re: Tabs -vs- Spaces: Tabs should have won.

2011-07-17 Thread Waldek M.
>> I'm still looking for the perfect programming font. Suggestions >> welcomed. > > When you find it Dotan, let me know, I've been looking since the later > '70's. For me, it's Terminus* (from sourceforge). Br. Waldek [*] As long as you don't need anything but iso8859-1. -- http://mail.python.

Re: AUTO: Craig Churchill is out of the office (returning 27/07/2011)

2011-07-18 Thread Waldek M.
> I am out of the office until 27/07/2011. > > I will respond to your message when I return. > If you require assitance in relation to the SPEAR Integration project > please contact Terry Mandalios. Why, thank you Craig. I will definitely contact Terry ;-) Br. Waldek PS. Sorry, couldn't stop mys

Re: PyWart: os.path needs immediate attention!

2011-07-29 Thread Waldek M.
Dnia Fri, 29 Jul 2011 14:41:22 -0500, harrismh777 napisał(a): > The backslash sep is an asinine CPM/80 | DOS disk based carry-over which > does not fit well with the modern forward direction. The disk based file > system carry-over is bad enough; but, propagating multiple ways of doing > simple

Re: Help parsing a text file

2011-08-30 Thread Waldek M.
On Mon, 29 Aug 2011 23:05:23 +0200, Thomas Jollans wrote: > A name that is often thrown around on this list for this kind of > question is pyparsing. Now, I don't know anything about it myself, but > it may be worth looking into. Definitely. I did use it and even though it's not perfect - it's ver

Re: mystery string code - help!

2011-04-20 Thread Dan M
> As a newbie Pythoner, I understand [] -1] but would some tell me how > '::' does its magic? > > Uncle Ben The -1 is the "stride" or "step" argument. It's described at http://docs.python.org/release/2.3.5/whatsnew/section-slices.html Dan -- http://mail.python.org/mailman/listinfo/python-list

PyQt: viewport vs window - how do you translate co-ordinates?

2017-09-23 Thread Veek M
pg 329, Rapid GUI Programming http://storage4.static.itmages.com/i/17/0923/h_1506165624_2588733_59fdfcd4cc.png In PyQt terminology the physical coordinate system is called the “viewport”, and confusingly, the logical coordinate system is called the “window”. In Figure 11.4, w

Re: PyQt: viewport vs window - how do you translate co-ordinates?

2017-09-24 Thread Veek M
On Saturday, September 23, 2017 at 8:44:25 PM UTC+5:30, Michael Torrie wrote: > On 09/23/2017 05:38 AM, Veek M wrote: > > I didn't understand any of that - could someone expand on that para? > > Is there a reading resource that explains the Viewport and translations? I > &

PyQt: Parenting a Widget

2017-09-25 Thread Veek M
Summary: Could someone explain widget and dialog parenting - the text book is not making sense. ## I'm trying to understand widget parenting, from the book: Rapid GUI Programming, pg 118, and thereabouts - he says: A. All PyQt classes that derive from QObjectand this includes

Re: PyQt: Parenting a Widget

2017-09-25 Thread Veek M
On Tuesday, September 26, 2017 at 11:18:54 AM UTC+5:30, Veek M wrote: > Summary: Could someone explain widget and dialog parenting - the text book is > not making sense. > ## > I'm trying to understand widget parenting, from the book: Rapid GUI > Prog

Re: PyQt: Parenting a Widget

2017-09-26 Thread Veek M
On Tuesday, September 26, 2017 at 2:23:22 PM UTC+5:30, Thomas Jollans wrote: > On 2017-09-26 08:16, Veek M wrote: > > On Tuesday, September 26, 2017 at 11:18:54 AM UTC+5:30, Veek M wrote: > >> Summary: Could someone explain widget and dialog parenting - the text book > &

Re: .0 in name

2022-05-28 Thread Ralf M.
can be used in several namespaces and as attributes. It's just a bit harder to use non-identifier names than identifiers. Whether it's a good idea to use them at all is a different question. I think the OP wondered about the .0 in the local namespace within list comprehensions. Unfortunately I cannot say much about that. Paul Ralf M. -- https://mail.python.org/mailman/listinfo/python-list

How to replace an instance method?

2022-09-16 Thread Ralf M.
or what sections of the documentation to read next. Any ideas / pointers? Ralf M. -- https://mail.python.org/mailman/listinfo/python-list

Re: How to replace an instance method?

2022-09-17 Thread Ralf M.
Am 16.09.2022 um 23:34 schrieb Eryk Sun: On 9/16/22, Ralf M. wrote: I would like to replace a method of an instance, but don't know how to do it properly. A function is a descriptor that binds to any object as a method. For example: >>> f = lambda self, x: self + x

Re: How to replace an instance method?

2022-09-17 Thread Ralf M.
Am 17.09.2022 um 00:35 schrieb Dan Stromberg: On Fri, Sep 16, 2022 at 2:06 PM Ralf M. <mailto:ral...@t-online.de>> wrote: I would like to replace a method of an instance, but don't know how to do it properly. You appear to have a good answer, but...  are you sure

Fwd: About the Python

2023-01-02 Thread Ramya M
-- Forwarded message - From: Ramya M Date: Mon, Jan 2, 2023, 9:58 AM Subject: About the Python To: This is from JNN College of Engineering, Shimoga. we are facing some problems while using python. Please can you resolve this issue. We are using python 3.11.1 (64 bit) for

Incomplete sys.path with embeddable python (Windows)!?

2023-04-21 Thread Ralf M.
ot;, 1)[0] if script_path not in sys.path: sys.path[0:0] = [script_path] import my_local_modul That works, but it's ugly, executing code between imports is frowned upon, and it needs to be added to every script. Does anybody have a better idea? Any help is appreciated. Ralf M. -- https://mail.python.org/mailman/listinfo/python-list

Re: Incomplete sys.path with embeddable python (Windows)!?

2023-04-22 Thread Ralf M.
Am 21.04.2023 um 17:31 schrieb Mats Wichmann: On 4/20/23 15:47, Ralf M. wrote: Hello, when I run a script with a "normally" installed python, the directory the script resides in is automatically added as first element to sys.path, so that "import my_local_module" finds m

Re: Incomplete sys.path with embeddable python (Windows)!?

2023-04-22 Thread Ralf M.
Am 22.04.2023 um 03:27 schrieb Greg Ewing via Python-list: How are you invoking your script? Presumably you have some code in your embedding application that takes a script path and runs it. Instead of putting the code to update sys.path into every script, the embedding application could do it be

Re: Incomplete sys.path with embeddable python (Windows)!?

2023-04-22 Thread Ralf M.
Am 21.04.2023 um 18:07 schrieb Thomas Passin: On 4/20/2023 5:47 PM, Ralf M. wrote: Hello, when I run a script with a "normally" installed python, the directory the script resides in is automatically added as first element to sys.path, so that "import my_local_module" find

Re: "py.ini" question

2021-04-25 Thread Ralf M.
Am 25.04.2021 um 16:30 schrieb Mats Wichmann: On 4/24/21 2:57 PM, Chris Angelico wrote: On Sun, Apr 25, 2021 at 5:57 AM Gisle Vanem wrote: With 'py -3.6' or 'py 3.8' I get the expected. But with 'py -3':     Python 3.8.9 (default, Apr 13 2021, 15:54:59)  [GCC 10.2.0 64 bit (AMD64)] on win32

Pandas: How does df.apply(lambda work to create a result

2021-05-26 Thread Veek M
t = pd.DataFrame([[4,9],]*3, columns=['a', 'b']) a b 0 4 9 1 4 9 2 4 9 t.apply(lambda x: [x]) gives a[[1, 2, 2]] b[[1, 2, 2]] How?? When you 't' within console the entire data frame is dumped but how are the individual elements passed into .apply()? I can't do lambda x,y: [x,y]

Re: Selenium script - stuck - could someone take a look?

2021-05-29 Thread Veek M
On 2021-05-29, Veek M wrote: fixed div './/' vs '//' -- https://mail.python.org/mailman/listinfo/python-list

Selenium script - stuck - could someone take a look?

2021-05-29 Thread Veek M
IREFOX; caps["pageLoadStrategy"] = 'eager' ignored_exceptions=(NoSuchElementException,StaleElementReferenceException,) fh = open('/tmp/log.html', 'w') fh.write(' parts\n\n') def convert(m): money = m.group() return str(round(fl

Re: Selenium script - stuck - could someone take a look?

2021-05-29 Thread Veek M
On 2021-05-29, Dennis Lee Bieber wrote: > On Sat, 29 May 2021 09:40:35 - (UTC), Veek M declaimed > the following: > ah, yeah - man that took me a while to do (save to local file and use file:///). It's working now, basically xpath mistake because I've forgotten stuff.

Tree library that allows conditions on nodes and will return the node

2021-06-14 Thread Veek M
LibreOffice has a huge class tree and I need to familiarize myself with it - trouble is, it won't fit on A4 because it has a flat hierarchy with loads of leaf nodes. I wanted to shove all the leaf nodes > x into a subgraph and style that differently using Graphviz. I tried treelib but while i can

Extend unicodedata with a name/pattern/regex search for character entity references?

2016-09-03 Thread Veek. M
https://mail.python.org/pipermail//python-ideas/2014-October/029630.htm Wanted to know if the above link idea, had been implemented and if there's a module that accepts a pattern like 'cap' and give you all the instances of unicode 'CAP' characters. ⋂ \bigcap ⊓ \sqcap ∩ \cap ♑ \capricornus

Re: Extend unicodedata with a name/pattern/regex search for character entity references?

2016-09-03 Thread Veek. M
Thomas 'PointedEars' Lahn wrote: > Veek. M wrote: > >> https://mail.python.org/pipermail//python-ideas/2014-October/029630.htm >> >> Wanted to know if the above link idea, > > … which is 404-compliant; the Internet Archive does not have it either >

Re: Extend unicodedata with a name/pattern/regex search for character entity references?

2016-09-04 Thread Veek. M
Steve D'Aprano wrote: > On Sun, 4 Sep 2016 06:53 pm, Thomas 'PointedEars' Lahn wrote: > >>> Regarding the name (From field), my name *is* Veek.M […] >> >> Liar. *plonk* > > You have crossed a line now Thomas. > > That is absolutely uncalled for. You have absolutely no legitimate > reason to b

Re: Extend unicodedata with a name/pattern/regex search for character entity references?

2016-09-05 Thread Veek. M
ne's posted identifier. > > In fact, I have recommended doing that several times to people who > only used their nickname in the “From” header field value. > >> So Veek should be able to appease P.E. by calling >> himself 'Veek "David Smith" M'. >

Pasting code into the cmdline interpreter

2016-09-21 Thread Veek M
I wanted to test this piece of code which is Kate (editor) on the cmd line python >>> prompt: tex_matches = re.findall(r'(\\\w+{.+?})|(\\\w+)', msg) for tex_word in tex_matches: repl = unicode_tex.tex_to_unicode_map.get(tex_word) if repl is None: repl = 'err' msg = re.sub(re.e

Re: Pasting code into the cmdline interpreter

2016-09-21 Thread Veek M
Ben Finney wrote: > Veek M writes: > >> 1. I had to turn on highlighting to catch mixed indent (which >> is a good thing anyways so this was resolved - not sure how tabs got >> in anyhow) > > The EditorConfig system is a growing consensus for configuring a code &

Re: Pasting code into the cmdline interpreter

2016-09-22 Thread Veek M
eryk sun wrote: > On Thu, Sep 22, 2016 at 5:12 AM, Veek M wrote: >> 2. Blank lines in my code within the editor are perfectly acceptable >> for readability but they act as a block termination on cmd line. > > You can write a simple paste() function. For example: > >

Re: Pasting code into the cmdline interpreter

2016-09-22 Thread Veek M
Ben Finney wrote: > Veek M writes: > >> Ben Finney wrote: >> >> > Since you are writing code into a module file, why not just run the >> > module from that file with the non-interactive Python interpreter? >> > >> It's part of a hexcha

h(re) for help, import re - on NameError

2016-09-22 Thread Veek M
Is there a way to use .pythonrc.py to provide a help function that autoloads whatever module name is passed like so: \>>> h(re) I tried inheriting site._Helper and overriding __init__ and __call__ but that didn't work, also I don't know how to deal/trap/catch the NameError (no quotes on h(re))

Re: Pasting code into the cmdline interpreter

2016-09-22 Thread Veek M
eryk sun wrote: > On Thu, Sep 22, 2016 at 12:40 PM, Gregory Ewing > wrote: >> eryk sun wrote: >>> >>> Actually in a Unix terminal the cursor can also be at >>> the end of a line, but a bug in Python requires pressing Ctrl+D >>> twice in that case. >> >> I wouldn't call that a bug, rather it's a c

Re: h(re) for help, import re - on NameError

2016-09-22 Thread Veek M
Chris Angelico wrote: > On Thu, Sep 22, 2016 at 8:10 PM, Veek M wrote: >> Is there a way to use .pythonrc.py to provide a help function that >> autoloads whatever module name is passed like so: >> \>>> h(re) >> >> I tried inheriting site._Helper and ov

Re: print to previous line in console

2016-10-03 Thread Adam M
On Monday, October 3, 2016 at 12:46:41 PM UTC-4, Skip Montanaro wrote: > On Mon, Oct 3, 2016 at 10:23 AM, udhay prakash pethakamsetty > > Hi skip, > > > > I am unable to even install that curses package > > > > > > C:\>pip install curses > > Collecting curses > > Could not find a version that sat

PyQT - Signals and Slots?

2016-10-10 Thread Veek M
I'm reading Rapid GUI Programming - Mark Summerfield with Python and QT pg 131. Basically the mechanism is an event table which maps a 'signal' to a 'function/slot' -correct? self.connect(dial, SIGNAL("valueChanged(int)"), spinbox.setValue) Here, dial.valueChanged -> spinbox.setValue s.conn

Re: PyQT - Signals and Slots?

2016-10-10 Thread Veek M
Mark Summerfield wrote: > > The ZeroSpinBox is a tiny example designed to show how the signal/slot > mechanism works. It is just a QSpinBox with the addition of > remembering how many times (all the) ZeroSpinBox(es) have had a 0 > value. > > Nowadays the connections would be made with a new impr

  1   2   3   4   5   6   7   8   9   10   >