Re: recursively remove all the directories and files which begin with '.'

2010-05-14 Thread J
On Fri, May 14, 2010 at 10:53, albert kao wrote: > > C:\python>rmdir.py > C:\test\com.comp.hw.prod.proj.war\bin > ['.svn', 'com'] > d .svn > dotd C:\test\com.comp.hw.prod.proj.war\bin\.svn > Traceback (most recent call last): >  File "C:\python\rmdir.py", line 14, in >    rmtree(os.path.join(curd

Re: write a 20GB file

2010-05-14 Thread J
On Fri, May 14, 2010 at 15:23, Nobody wrote: > On Fri, 14 May 2010 10:50:49 -0400, J wrote: > >> someone smarter than me can correct me, but file.write() will write when >> it's buffer is filled, or close() or flush() are called. > > And, in all probability

Python way to printk?

2010-06-09 Thread J
Does anyone know of a way, or have a recipe, to do a linux printk equivalent in Python? I've been googling for a while and not finding anything useful. The nutshell version of this is that I need to write a routine for a test tool I'm working on that will time the amount of time used to take a sy

OptParse and Constant values

2010-08-12 Thread J
How do you use OptParse with constants? Example: usage = 'Usage: %prog [OPTIONS]' parser = OptionParser(usage) parser.add_option('-l','--level', action='store_const', default=LOG_INFO, help='Set the log level to inject into

Re: OptParse and Constant values

2010-08-12 Thread J
On Thu, Aug 12, 2010 at 12:41, Robert Kern wrote: > On 8/12/10 11:19 AM, J wrote: >> >> How do you use OptParse with constants? > http://docs.python.org/library/optparse#standard-option-actions > > 'store_const' means that the option is a flag without arguments

Very stupid question about a % symbol

2010-09-16 Thread J
OK, this is a very stupid question about a very simple topic, but Google is failing me this morning... I'm trying to print a string that looks like this: Reported memory amounts are within 10% tolerance and the print line looks (for now) like this: print "Reported memory amounts are within %s%s

Re: Very stupid question about a % symbol

2010-09-16 Thread J
On Thu, Sep 16, 2010 at 12:09, Grant Edwards wrote: > On 2010-09-16, J wrote: > >> Reported memory amounts are within 10% tolerance > >>>> "Reported memory amounts are within %d%% tolerance" % 10 > 'Reported memory amounts are within 10% tolerance&#

Can I change one line in a file without rewriting the whole thing?

2007-07-13 Thread J. J. Ramsey
In Perl, there is a module called "Tie::File". What it does is tie a list to each line of a file. Change the list, and the file is automatically changed, and on top of this, only the bits of the file that need to be changed are written to disk. At least, that's the general idea. I was wondering if

Re: Having a hard time to 'get' bing api search results

2013-06-13 Thread j...@studiosola.com
> Web?Query=%27xbox%20one%27& Plus do you really want to be sending in a %27 (which is a [ ) vs maybe a %20 (which is a space ) or even a %29 ( which is a ] ) Cross check your URL encoding is correct. -Kevin On Jun 13, 2013, at 2:09 PM, John Gordon wrote: > In "Yves

Re: PyGresql 4.1.1 for python2.7

2013-06-14 Thread j . mapping
installed? Or > some kind of dll incompatibility with 2.7 (maybe libpq.dll)? > > > > Thanks for the help Yes I'm having this problem also. Did you ever find a solution? J -- http://mail.python.org/mailman/listinfo/python-list

Re: New Science Discovery: Perl Idiots Remain Idiots After A Decade!New Science Discovery: Perl Idiots Remain Idiots Af

2012-02-29 Thread Seymour J.
You obviously don't have a clue as to what Mathematics means. Free hint: it doesn't mean Arithmetic. You're as bigoted as Xah Lee, -- Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel> Unsolicited bulk E-mail subject to legal action. I reserve the ri

Re: New Science Discovery: Perl Detracters Remain Idiots After A Decade!

2012-02-29 Thread Seymour J.
in Mathematical notation. >it makes sense to keep things as clear as possible. Often infix notation with well thought out precedence is the clearest way to go. RPN and the like have their place, but often are difficult for real people to read. -- Shmuel (Seymour J.) Metz, SysProg and JOAT

Re: New Science Discovery: Perl Idiots Remain Idiots After A Decade!New Science Discovery: Perl Idiots Remain Idiots Af

2012-03-01 Thread Seymour J.
, "Transgressing the Boundaries: Towards a >Transformative Hermeneutics of Quantum Gravity" A brilliant piece of work. I greatly enjoyed it and the reaction to its disclosure. -- Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel> Unsolicited bulk E-mail

Re: New Science Discovery: Perl Detracters Remain Idiots After A Decade!

2012-03-01 Thread Seymour J.
tly what you had in mind. The two goals conflict. >That's all I'm saying. No; you're saying to use redundant parentheses, which conflicts with other things you're saying. -- Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel> Unsolicited bulk

Re: New Science Discovery: Perl Idiots Remain Idiots After A Decade!New Science Discovery: Perl Idiots Remain Idiots Af

2012-03-02 Thread Seymour J.
In <87k4341j0l@sapphire.mobileactivedefense.com>, on 03/01/2012 at 02:40 PM, Rainer Weikusat said: >You obviously don't have any sense of humour. Certainly I do; I laugh at pretentious loons with delusions of adequacy. -- Shmuel (Seymour J.) Metz, SysProg and JOAT <h

Re: New Science Discovery: Perl Detractors Remain Idiots After A Decade!

2012-03-02 Thread Seymour J.
predictable. -- Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel> Unsolicited bulk E-mail subject to legal action. I reserve the right to publicly post or ridicule any abusive E-mail. Reply to domain Patriot dot net user shmuel+news to contact me. Do n

Re: New Science Discovery: Perl Detractors Remain Idiots After A Decade

2012-03-12 Thread Seymour J.
om mathematics. Don't confuse the google pest with facts. -- Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel> Unsolicited bulk E-mail subject to legal action. I reserve the right to publicly post or ridicule any abusive E-mail. Reply to domain Patriot dot net

Re: New Science Discovery: Perl Idiots Remain Idiots After A Decade!New Science Discovery: Perl Idiots Remain Idiots Af

2012-03-13 Thread Seymour J.
even the same from author to author, e.g., whether "field" implies Abelian. -- Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel> Unsolicited bulk E-mail subject to legal action. I reserve the right to publicly post or ridicule any abusive E-mail. Reply t

Message passing between python objects

2012-03-19 Thread J. Mwebaze
I am trying to learn about the interaction between python objects. One thing i have often read is that objects interact by sending messages to other objects to invoke corresponding methods. I am specifically interested in tracing these messages and also probably log the messages for further scrutin

CFG for python

2012-03-28 Thread J. Mwebaze
Anyone knows how to create control-flow-graph for python.. After searching around, i found this article, http://www.python.org/dev/peps/pep-0339/#ast-to-cfg-to-bytecode and also a reference to http://doc.pypy.org/en/latest/objspace.html#the-flow-model However, i stil cant figure out what how to

Re: Is Programing Art or Science?

2012-04-04 Thread Seymour J.
x27;s good enough for me. -- Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel> Unsolicited bulk E-mail subject to legal action. I reserve the right to publicly post or ridicule any abusive E-mail. Reply to domain Patriot dot net user shmuel+news to contact me. Do not reply

Re: f python?

2012-04-09 Thread Seymour J.
immeasurable savings over the years. Yeah, especially code that needs to deal with lengths and nulls. It's great for buffer overruns too. -- Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel> Unsolicited bulk E-mail subject to legal action. I reserve the right t

Re: f python?

2012-04-10 Thread Seymour J.
the allocated storage. More precisely, they require that attempts to store beyond the allocated length be detected. -- Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel> Unsolicited bulk E-mail subject to legal action. I reserve the right to publicly post or ridicule

Re: f python?

2012-04-10 Thread Seymour J.
ple who haven't differ greatly. You would be wrong. It is a case where the opinions of people who are oriented to a particular language and the opinions of people who have lost count of the languages they have used greatly differ. -- Shmuel (Seymour J.) Metz, SysProg and JOAT <htt

Re: f python?

2012-04-11 Thread Seymour J.
are similar to linked-lists in the sense that there's a 'special >termination value' instead of an explicit length) A syringe is similar to a sturgeon in the sense that they both start with S. LISP doesn't have arrays, and C doesn't allow you to insert into the m

Re: f python?

2012-04-15 Thread Seymour J.
In <87aa2iz3l1@kuiper.lan.informatimago.com>, on 04/11/2012 at 05:32 PM, "Pascal J. Bourguignon" said: >You're confused. C doesn't have arrays. Lisp has arrays. C only has >vectors Neither C nor any other programming language has vectors ;-) >That

class versions and object deserialization

2012-04-24 Thread J. Mwebaze
We have classes of this form classA version1, classA version2, classA version3 .. etc. This is same class that has been modified. Each "modification" creates a new version of a class. Each object has a version attribute which refers to the version of the class from which it was derived. egObjectA.v

algorithm does python use to compare two strings

2012-04-29 Thread J. Mwebaze
I am just wondering which specific algorithm does python use to compare two strings. Could it be the Longest common subsequence is the most u Regards -- *Mob UG: +256 (0) 70 1735800 | NL +31 (0) 6 852 841 38 | Gtalk: jmwebaze | skype: mwebazej | URL: www.astro.rug.nl/~jmwebaze /* Life runs on

Re: Code help for understand

2012-05-02 Thread J. Mwebaze
if you are referring to the line * * *if __name__ == '__main__':* * * Find a good explanation here * * http://stackoverflow.com/questions/419163/what-does-if-name-main-do On Wed, May 2, 2012 at 2:30 PM, viral shah wrote: > Hi > > in every .py file I found this same code line on the below side

try/except in a loop

2012-05-02 Thread J. Mwebaze
I have multiple objects, where any of them can serve my purpose.. However some objects might not have some dependencies. I can not tell before hand if the all the dependencies exsit. What i want to is begin processing from the 1st object, if no exception is raised, i am done.. if an exception is ra

Re: How to compute a delta: the difference between lists of strings

2012-05-05 Thread J. Mwebaze
thank Chris.. On Sat, May 5, 2012 at 2:39 PM, Chris Angelico wrote:k > On Sat, May 5, 2012 at 10:12 PM, J. Mwebaze wrote: > > This is out of curiosity, i know this can be done with python diffllib > > module, but been figuring out how to compute the delta, Consider two &g

sorting 1172026 entries

2012-05-06 Thread J. Mwebaze
I have several lists with approx 1172026 entries. I have been trying to sort the records, but have failed.. I tried lists.sort() i also trired sorted python's inbuilt method. This has been running for weeks. Any one knows of method that can handle such lists. cheers -- *Mob UG: +256 (0) 70 17

Re: sorting 1172026 entries

2012-05-06 Thread J. Mwebaze
On Sun, May 6, 2012 at 6:07 PM, Benjamin Schollnick wrote: > > On May 6, 2012, at 11:57 AM, J. Mwebaze wrote: > > I have several lists with approx 1172026 entries. I have been trying to > sort the records, but have failed.. I tried lists.sort() i also trired > sorted pytho

Re: sorting 1172026 entries

2012-05-06 Thread J. Mwebaze
On Sun, May 6, 2012 at 6:09 PM, Devin Jeanpierre wrote: > On Sun, May 6, 2012 at 11:57 AM, J. Mwebaze wrote: > > I have several lists with approx 1172026 entries. I have been trying to > sort > > the records, but have failed.. I tried lists.sort() i also trired sorted > >

Re: sorting 1172026 entries

2012-05-06 Thread J. Mwebaze
for line in f.readlines(): line = line.strip() line=line.split() temp.append((parser.parse(line[0]), float(line[1]))) temp=sorted(temp) with open(filename.strip('.txt')+ '.sorted', 'wb') as p: for i, j in temp: p.write(

Re: sorting 1172026 entries

2012-05-06 Thread J. Mwebaze
rted', 'wb') as p: for i, j in temp: p.write('%s %s\n' %(str(i),j)) On Sun, May 6, 2012 at 6:26 PM, J. Mwebaze wrote: > I have attached one of the files, try to sort and let me know the results. > Kindly sort by date. ooops - am told the fil

Re: sorting 1172026 entries

2012-05-06 Thread J. Mwebaze
I noticed the error in code please ignore this post.. On Sun, May 6, 2012 at 6:29 PM, J. Mwebaze wrote: > sorry see, corrected code > > > for filename in txtfiles: >temp=[] >f=open(filename) >for line in f.readlines(): > line = line.strip(

dynamically selecting a class to instantiate based on the object attributes.

2012-05-09 Thread J. Mwebaze
I have a bunch of objects of the same type. Each object has a version attribute and this refers to source code that was used to make the object. SouceCode is maintained in separate files. eg. myclass_01.py, myclass_02.py, myclass_03.py, myclass_04.py .. During object instantiaton, i would like to

Re: py3k: converting int to bytes

2011-02-26 Thread J. Gerlach
Am 24.02.2011 17:19, schrieb s...@uce.gov: > > Is there a better way to convert int to bytes then going through strings: > > x=5 > str(x).encode() > > > Thanks. > >>> bytes([8]) b'\x08' seems more straight forward... -- http://mail.python.org/mailman/listinfo/python-list

Re: py3k: converting int to bytes

2011-02-26 Thread J. Gerlach
Am 26.02.2011 12:26, schrieb J. Gerlach: > Am 24.02.2011 17:19, schrieb s...@uce.gov: >> >> Is there a better way to convert int to bytes then going through strings: >> >> x=5 >> str(x).encode() >> >> >> Thanks. >> > >>>

Abend with cls.__repr__ = cls.__str__ on Windows.

2011-03-17 Thread J Peyret
This gives a particularly nasty abend in Windows - "Python.exe has stopped working", rather than a regular exception stack error. I've fixed it, after I figured out the cause, which took a while, but maybe someone will benefit from this. Python 2.6.5 on Windows 7. class Foo(object): pass

Re: Abend with cls.__repr__ = cls.__str__ on Windows.

2011-03-17 Thread J Peyret
On Mar 17, 9:37 pm, Terry Reedy wrote: > On 3/17/2011 10:00 PM, Terry Reedy wrote: > > > On 3/17/2011 8:24 PM, J Peyret wrote: > >> This gives a particularly nasty abend in Windows - "Python.exe has > >> stopped working", rather than a regular exception

Re: PostgreSQL vs MySQL (was Re: How to handle sockets - easily?)

2011-03-17 Thread J Peyret
On Mar 16, 10:19 am, a...@pythoncraft.com (Aahz) wrote: > In article , > >always recommend people to use PostgreSQL, though; which is superior in > >almost every way, especially the C client library and the wire protocol.) > > Can you point at a reference for the latter?  I have been trying to > c

Re: Abend with cls.__repr__ = cls.__str__ on Windows.

2011-03-18 Thread J Peyret
On Mar 18, 2:15 pm, Carl Banks wrote: > Multiple people reproduce a Python hang/crash yet it looks like no one > bothered to submit a bug report > > I observed the same behavior (2.6 and 3.2 on Linux, hangs) and went > ahead and submitted a bug report. > > Carl Banks Speaking for myself, I'v

Re: Abend with cls.__repr__ = cls.__str__ on Windows.

2011-03-18 Thread J Peyret
On Mar 18, 6:55 pm, Carl Banks wrote: > On Mar 18, 5:31 pm, J Peyret wrote: > > > If I ever specifically work on an OSS project's codeline, I'll post > > bug reports, but frankly that FF example is a complete turn-off to > > contributing by reporting bugs. >

How to set/update value in a xml file using requests in python

2018-02-06 Thread Sum J
My xml file is located in local network : http://192.168.43.109/DevMgmt/NetAppsDyn.xml Below is a part content of above xml I want to update : off I want to set value for 'ResourceUI' and 'Port' field in above xml. I have used below code : data = { 'R

Re: [Python-Dev] How to set/update value in a xml file using requests in python

2018-02-12 Thread Sum J
t; You likely will want a PUT or a POST HTTP verb: > https://stackoverflow.com/questions/107390/whats-the- > difference-between-a-post-and-a-put-http-request > > HTH. > > On Thu, Feb 8, 2018 at 12:38 AM, Sum J wrote: > > My xml file is located in

Getting "ValueError: need more than 1 value to unpack" while trying to read a value from dictionary in python

2018-02-15 Thread Sum J
Below is my code. Here I want to read the "ip address" from s s= ''' Power On Enabled = On State: connected Radio Module: Unknown noise: -097 signalStrength: -046 ip address: 192.168.75.147 subnet mask: 255.255.255.0 IPv4 address configured by DHCP Mac Addr: a

Re: Getting "ValueError: need more than 1 value to unpack" while trying to read a value from dictionary in python

2018-02-15 Thread Sum J
Thanks Chris :) Its working now. Regards, Sumit On Thu, Feb 15, 2018 at 4:55 PM, Chris Warrick wrote: > On 15 February 2018 at 12:07, Sum J wrote: > > Below is my code. Here I want to read the "ip address" from s > > > > > > s= ''' &g

How to reset system proxy using pyhton code

2018-02-19 Thread Sum J
Hi, I am using below python code (Python 2.7) to reset the proxy of my Ubuntu (Cent OS 6) system, but I am unable to reset the proxy: Code : import os print "Unsetting http..." os.system("unset http_proxy") os.system("echo $http_proxy") print "http is reset" O

Re: Weak Type Ability for Python

2023-04-13 Thread J. Pic
print(f'{x}{y}') ? On Wed, Apr 12, 2023 at 7:06 PM Ali Mohseni Roodbari < ali.mohseniroodb...@gmail.com> wrote: > Hi all, > Please make this command for Python (if possible): > > >>> x=1 > >>> y='a' > >>> wprint (x+y) > >>> 1a > > In fact make a new type of print command which can print and show

Re: IDE tools to debug in Python?

2021-01-27 Thread J. Pic
Thonny, winpdb/winpdb-rebord, eric4, pudb, web-pdb, vy, mu, netbeans, eclipse, pdbpp... Also see: https://wiki.python.org/moin/PythonDebuggingTools "Changing a variable" -> that's basically evaluating code ? -> supported in all debuggers I suppose -- https://mail.python.org/mailman/listinfo/pyth

Re: IDE tools to debug in Python?

2021-01-27 Thread J. Pic
écrit : > > Thank you J. Pic. > > Out of everything today, > (and given my priority is Python/Flask debugging) > it looks like Wing IDE is something to dig into. > > Thanks > > > Sent with ProtonMail Secure Email. > > ‐‐‐ Original Message ‐‐‐ > On Wed

Re: How do you debug in Python? Coming from a Matlab and R user. I'm already aware of pdb.

2021-01-27 Thread J. Pic
Also - https://github.com/cool-RR/pysnooper - https://github.com/andy-landy/traceback_with_variables -- https://mail.python.org/mailman/listinfo/python-list

Re: Mutable defaults

2021-02-10 Thread J. Pic
> Most of us know of the perils of mutable default values. And those who don't pay the price. I wonder what would be the harm in removing them, or doing copy on call by default. -- https://mail.python.org/mailman/listinfo/python-list

Re: Mutable defaults

2021-02-10 Thread J. Pic
; late-bound solution. > > On Thu, 2021-02-11 at 10:29 +1100, Chris Angelico wrote: > > On Thu, Feb 11, 2021 at 10:17 AM J. Pic wrote: > > > > > > > Most of us know of the perils of mutable default values. > > > > > > And those who don'

Re: Mutable defaults

2021-02-10 Thread J. Pic
, Chris Angelico a écrit : > On Thu, Feb 11, 2021 at 12:56 PM J. Pic wrote: > > > > I just meant removing the whole "default value mutating" story, not > removing mutable variables. Really, I was wondering if there was a use case > where this actually turns to an advan

Re: Mutable defaults

2021-02-10 Thread J. Pic
Silly me, we don't even need copy but just execution @lazy(x=lambda: [], y=lamba x: len(x)) def foo(x=None, y=None): So only one operator is needed, the walrus is still fine: def foo(x:=[], y:=len(x)): Not copy, just evaluate. Le jeu. 11 févr. 2021 à 03:54, J. Pic a écrit : >

Re: Mutable defaults

2021-02-10 Thread J. Pic
. 2021 à 04:03, Chris Angelico a écrit : > On Thu, Feb 11, 2021 at 1:55 PM J. Pic wrote: > > > > Adding decorators with some inspect sauce could certainly work with the > syntax we already have: > > > > @default(x=lambda: copy([]), y=lambda x: len(x)) > > def foo(

Re: Mutable defaults

2021-02-11 Thread J. Pic
Thu, Feb 11, 2021 at 6:03 PM Ross Wilson wrote: > > > > On Thu, 11 Feb 2564 BE at 12:52 Grant Edwards > > > wrote: > > > > > On 2021-02-11, J. Pic wrote: > > > > > > > I just meant removing the whole "default value mutating"

Re: Python 2.7 and 3.9

2021-02-17 Thread J. Pic
The best would be to upgrade the scripts, did you try them with 2to3 ? It should do most of the work, if not all. https://docs.python.org/3/library/2to3.html -- https://mail.python.org/mailman/listinfo/python-list

Re: editor recommendations?

2021-02-26 Thread J. Pic
On Fri, Feb 26, 2021 at 5:24 PM Rich Shepard wrote: > Perhaps he didn't but he should know that by opening a shell within emacs > he > can run his python code there. > :term in vim -- ∞ -- https://mail.python.org/mailman/listinfo/python-list

Re: do ya still use python?

2021-04-23 Thread J. Pic
CPython powers Mars Ingenuity Helicopter: https://github.com/readme/nasa-ingenuity-helicopter All CPython contributors got a new GitHub badge to show off. -- https://mail.python.org/mailman/listinfo/python-list

Re: Ad-hoc SQL query builder for Python3?

2021-04-24 Thread J. Pic
Maybe search or ask dba stackexchange for more, meanwhile, here's a popular one: https://github.com/dbeaver/dbeaver -- https://mail.python.org/mailman/listinfo/python-list

Appending to a list, which is value of a dictionary

2016-10-15 Thread Uday J
Hi, Here is the code, which I would like to understand. >>> l=['a','b','c'] >>> bm=dict.fromkeys(l,['-1','-1']) >>> u={'a':['Q','P']} >>> bm.update(u) >>> bm {'a': ['Q', 'P'], 'c': ['-1', '-1'], 'b': ['-1', '-1']} >>> for k in bm.keys(): bm[k].append('DDD') >>> bm {'a': ['Q', 'P', 'DDD'], 'c': [

Begginers problem : tar: Error opening archive: Can't initialize filter; unable to run program "bzip2 -d

2018-12-29 Thread Rand .J
Hello everyone I'm completely new to python and I'm facing this problem : I'm trying to run this code from : https://github.com/pnnl/*safekit* ,using cmd on windows 10, I already installed python. when I type the command: tar -xjvf data_examples.tar.bz2 I keep getting the error: tar: Error openi

mouse position with basemap

2020-01-22 Thread J Conrado
Hi, I have a 3D netcdf file that a read an plot it. I would like to get the values o two points (latitude and longitude) to plot an arbitrary cross section of my 3D data between these two points. How can get these two points using mouse event. Thanks, Conrado -- https://mail.python.or

Python 3.8.1

2020-01-29 Thread J Conrado
Hi, I installed the Python3.8.1 in my computer. I have other versions 2.6 and  3.7. When I use 2.6 and 3.7 I didn't have problem with: python2 Python 2.6.6 (r266:84292, Jun 20 2019, 14:14:55) [GCC 4.4.7 20120313 (Red Hat 4.4.7-23)] on linux2 Type "help", "copyright", "credits" or "license"

Python3.8.1 basemap

2020-01-31 Thread J Conrado
Hi, I installed the Python3.8.1 and I run the example of basemap gallery: https://matplotlib.org/basemap/users/examples.html plotgreatcircle.py for Python3.8 plotgreatcircle.py I had: Traceback (most recent call last):   File "plotgreat

Pkg iter_module for different versions of python

2020-02-09 Thread J A
ks to getting iter_modules to return both python 3 and 2 installed modules? J -- https://mail.python.org/mailman/listinfo/python-list

Fwd: Pkg iter_module for different versions of python

2020-02-09 Thread J A
Might anyone know of a root place where python modules get saved to for both python2 and 3. I assume I'm looking for all of the places where "site-packages" can be written to. J -- Forwarded message ----- From: J A Date: Sun, 9 Feb 2020 at 17:56 Subject: Re: Pkg

Application setup like windows msi

2020-03-04 Thread J A
I was wondering g if there was a way to distribute an application that took advantage of user input like a windows .msi does. On linux of course. -- https://mail.python.org/mailman/listinfo/python-list

Python error

2020-04-02 Thread J Conrado
Hi, I have the version of python installed: Python 3.7.6 and Python 3.8.1 If I type: python Python 3.7.6 (default, Jan  8 2020, 19:59:22) [GCC 7.3.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or "license" for more information. >>> import numpy it is Ok, no error, but if I di

kill a window

2020-04-07 Thread J Conrado
Hi, I have a script that read a netcdf data. I enter with keiboard two values for latitude initial an final and same for longitude and I plot a map. I use the command plt.close(1) to kill the window. But, my window is not closed. This is a small par o my script: m = Basemap(llcrnrlon=loni

Get a region from a larger data

2020-04-18 Thread J Conrado
Hi, I have GOES16 full disk data with the dimensions (5424, 5424) and my latitude and longitude arrays have the same dimension. How can I seletct a small  region of this data, using  this limits for lat=[-30,10] and lon = [-90,-30] for my sector. I try to select my region using this limit

Install GDAL

2020-04-22 Thread J Conrado
Hi, I'm trying to install GDAL. I used conda and PIP and I didn't have sucess. I used for pip to insatal GDAL3.0.4: pip install GDAL Collecting GDAL   Using cached GDAL-3.0.4.tar.gz (577 kB) Building wheels for collected packages: GDAL   Building wheel for GDAL (setup.py) ... error   ERR

Install GDAL

2020-04-22 Thread J Conrado
Hi, in my question how to install GDAl, I forgot to write that I want to install GDAL on Linux. Thanks, Conrado -- https://mail.python.org/mailman/listinfo/python-list

python Netcdf and ncdump

2020-04-30 Thread J Conrado
Hi, I read my netcdf data and I did: print(f) print("f.variables[SST] ",f.variables["SST"]) and I had: f.variables[SST]  int16 SST(y, x)     _FillValue: -1     long_name: ABI L2+ Sea Surface (Skin) Temperature     standard_name: sea_surface_skin_temperature     _Unsigned: true     valid

naN values

2020-05-04 Thread J Conrado
Hi, I have a 2d array and I would  how can I replace NaN values for example with - value or other value. Thank, Conrado -- https://mail.python.org/mailman/listinfo/python-list

Cartopy error

2020-05-12 Thread J Conrado
Hi, Please, what can I do to solve this error: import cartopy, cartopy.crs as ccrs  # Plot maps   File "/home/conrado/anaconda3/envs/myenv/lib/python3.8/site-packages/cartopy/__init__.py", line 96, in     import cartopy.crs   File "/home/conrado/anaconda3/envs/myenv/lib/python3.8/site-p

Multiple event loops within the same thread ?

2020-06-14 Thread J. Pic
Hi all, It's possible to create several event loops in the same thread by calling asyncio.new_event_loop() Question: is there any use case where that could be useful ? Thank you in advance -- ∞ -- https://mail.python.org/mailman/listinfo/python-list

Re: I need to study Python

2020-06-26 Thread J. Pic
What happens when people want to start a music instrument and start with pure theory, scales and modes, it's that the instrument ends up in a forgotten corner of the room because they are not having real fun with it. I would like to suggest that you start with a pet project, you can even start wit

Re: Bulletproof json.dump?

2020-07-06 Thread J. Pic
Well I made a suggestion on python-ideas and a PyPi lib came out of it, but since you can't patch a lot of internal types it's not so useful. Feel free to try it out: https://yourlabs.io/oss/jsonlight/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Bulletproof json.dump?

2020-07-06 Thread J. Pic
You can achieve round-tripping by maintaining a type mapping in code, for a single datatype it would look like: newloads(datetime, newdumps(datetime.now()) If those would rely on __dump__ and __load__ functions in the fashion of pickle then nested data structures would also be easy: @dataclass c

Re: Bulletproof json.dump?

2020-07-07 Thread J. Pic
Try jsonlight.dumps it'll just work. Le mar. 7 juil. 2020 à 12:53, Adam Funk a écrit : > On 2020-07-06, Adam Funk wrote: > > > On 2020-07-06, Chris Angelico wrote: > >> On Mon, Jul 6, 2020 at 10:11 PM Jon Ribbens via Python-list > >> wrote: > > >>> While I agree entirely with your point, there i

Python pandas Excel

2020-07-17 Thread J Conrado
HI, I have an excel file with several columns, the first day/month,/year and hour: Data 01/11/2017 00:00 01/11/2017 03:00 01/11/2017 06:00 01/11/2017 09:00 01/11/2017 12:00 01/11/2017 15:00 01/11/2017 18:00 01/11/2017 21:00 02/11/2017 00:00 02/11/2017 03:00 02/11/2017 06:00 02/11/

Re: An I connected here?

2020-07-17 Thread J. Pic
And Hollidays ;) Le ven. 17 juil. 2020 à 21:03, Rhodri James a écrit : > On 17/07/2020 19:33, Steve wrote: > > Sorry folks, I really messed that one up. I tried to doctor up a reply > to > > get the address correct but failed to delete enough to own the message... > > Yeah, don't do that. Just

Re: Dowloading package dependencies from locked down machine

2020-07-28 Thread J. Pic
Ideas for solutions: - use pip install --user at home, copy over ~/.local/lib/python3.8/site-packages - same, but with ~/.cache/pip -- https://mail.python.org/mailman/listinfo/python-list

Re: Final statement from Steering Council on politically-charged commit messages

2020-08-18 Thread J. Pic
I think this commit message is not enough: we should take it further and demand that Elwyn Brooks White choose change their last name to something less supremacist. Also: I've been waiting long enough to see this drama hit the chess world by itself so I'm explicitly making the suggestion here. --

Re: Final statement from Steering Council on politically-charged commit messages

2020-08-18 Thread J. Pic
I'm sorry Igor, I didn't mean to ruin your "conspiracy theories just hit the commit log day" -- https://mail.python.org/mailman/listinfo/python-list

Re: Final statement from Steering Council on politically-charged commit messages

2020-08-19 Thread J. Pic
My origins are Jewish Algerian which is just hated by just all parties you could think off, but can not be considered as white. Nonetheless, I'm not angry in any way, rather amused, but still, I don't understand how this sentence (changed by the patch): > When writing English, follow Strunk and W

Re: Final statement from Steering Council on politically-charged commit messages

2020-08-19 Thread J. Pic
On Wed, Aug 19, 2020 at 3:33 AM Tim Daneliuk wrote: > > I would also like to help you become educated. Be sure to check > out these literary treasures - they are the foundation of the > worldview you are espousing: > > > The_Origin of the Family, Private Property, and the State - Engels > > Das K

Re: Final statement from Steering Council on politically-charged commit messages

2020-08-19 Thread J. Pic
On Wed, Aug 19, 2020 at 4:06 PM Ethan Furman wrote: > The purported issue is that Strunk and White itself is doing the upholding. Still trying to find some actual evidence. -- ∞ -- https://mail.python.org/mailman/listinfo/python-list

Python Pandas split Date in day month year and hour

2020-08-19 Thread J Conrado
Hi, I'm satarting using Pandas to read excel. I have a meteorological synoptic data and I have for date: 0   2017-11-01 00:00:00 1   2017-11-01 03:00:00 2   2017-11-01 06:00:00 3   2017-11-01 09:00:00 4   2017-11-01 12:00:00 ..  ... 229 2017-11-30 09:00:00 230 2017-11-30 12

Re: Final statement from Steering Council on politically-charged commit messages

2020-08-19 Thread J. Pic
Tim, don't you also think that statements should be backed by evidence, even more if they are particularly accusatory ? We'll be lucky if S&W's editor doesn't sue the PSF for slandering for publishing that S&W "upholds white supremacy". -- https://mail.python.org/mailman/listinfo/python-list

Re: Final statement from Steering Council on politically-charged commit messages

2020-08-19 Thread J. Pic
On Wed, Aug 19, 2020 at 3:33 AM Tim Daneliuk wrote: > On 8/18/20 6:34 PM, rmli...@riseup.net wrote: > > I would kindly recommend that folks just educate themselves on what > > ... > > Resources: > > The Invention of the White Race: Volume II: > http://ouleft.org/wp-content/uploads/Invention-White

Python Pandas

2020-08-21 Thread J Conrado
HI, I'm using Pandas to read my .xls file and I used the command to read it: df = pd.read_excel(filexcel, parse_dates=[0], dayfirst=True) and I had the day, month, year and hour correctly But, if I  run the same script inside a virtual environment, I had this error message:   File "xlst

Re: Debugging technique

2020-10-05 Thread J. Pic
Another nice debugger feature is to step up with "u", this will take you to the parent frame where you can again inspect the variables. I use this when I want to reverse engineer how the interpreter got to a specific line. Maybe worth mentioning that Werkzeug provides in-browser interactive debug

Getting rid of virtual environments with a better dependency system

2020-11-11 Thread j c
Hello all, I don't know if this suggestion is missing some point, or it's part of something already proposed before. In a professional environment, we've came to a point in which most people use virtual environments or code environments to avoid "polluting a global environment". However, I th

Getting rid of virtual environments with a better dependency system

2020-11-11 Thread j c
Hello all, I don't know if this suggestion is missing some point, or it's part of something already proposed. In a professional environment, we've came to a point in which most people use virtual environments or conda environments to avoid "polluting a global environment". However, I think th

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