Re: Issues with running python in Command prompt

2021-01-16 Thread OmPs
On Sat, 16 Jan 2021, 23:51 mohsen shooshtari, 
wrote:

> hello,
> Thanks in advance for your consideration. I install python3.8 and then
> install Pycharm but when I call python in Command prompt, followed by
> ( 'python'
> is not recognized as an internal or external command, operable program or
> batch file.
>

You need to set the path in your batch file so the batch file knows where
To look for python package. Search in google for setting up path in
baychfile in windows.


> what should I do to fix this problem?
> --
> https://mail.python.org/mailman/listinfo/python-list



>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Vnev issue - AttributeError: module 'sysconfig' has no attribute '_get_default_scheme'. Did you mean: 'get_default_scheme'?

2021-11-05 Thread OmPs
How are you creating the virtualenv. Creating virtualenv is pretty
straightforward. Please share what you are doing?

On Fri, 5 Nov 2021 at 10:15 PM, pranesh kumar 
wrote:

>
>
>Hi
>
>Facing problem in creating virtual environment and in importing modules
> in
>pycharm community version 2021.2.2.
>
>Trying to import Open CV in pycharm but not able to complete
>
>When creating new virtual environment error I got is "AttributeError:
>module 'sysconfig' has no attribute '_get_default_scheme'. Did you mean:
>'get_default_scheme'?"
>
>
>
>Pranesh Kumar
>
>9789411538
>
>
>
>Your inputs could be so grateful on this issue
>
>Sent from [1]Mail for Windows
>
>
>
>
>
> References
>
>Visible links
>1. https://go.microsoft.com/fwlink/?LinkId=550986
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Downloading Python

2020-08-02 Thread OmPs
It's quite possible you have a version mismatch. Try installing python 3.8
first.

BtW, before the would you like to check what version python command reports.

Sorry for top post.  I am sending from my phone and bottom post pretty
confusing here.

On Mon, Aug 3, 2020, 00:56 Eryk Sun  wrote:

> On 8/1/20, MRAB  wrote:
> > On 2020-08-01 21:58, Barry wrote:
> >> On 31-7-2020 22:10, Tanmay Shah wrote:
> >>>
> >>> After downloading Python 3.8.5 IDLE, an error message popped up,
> >>> saying the code execution cannot proceed because python38.dll was
> >>> not found. What should I do in order to use the Python interpreter?
> >>
> >> I have never had to reboot windows when installing python.
> >> Was I lucky?
> >
> > No. I've never had a problem with it either.
>
> I don't know what "[a]fter downloading Python 3.8.5 IDLE" means to the
> OP. For a successful installation of Python 3.8 using an "executable"
> or "web-based" installer from python.org [1], the file "python38.dll"
> will be installed in the same directory as python.exe and will thus
> always be found.
>
> [1] https://www.python.org/downloads/release/python-385
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


xml problem in parsing the great grandchildren

2014-11-13 Thread OmPs
http://pastebin.com/GCD6J0wd

I am stuck here. What I am looking for  is description of the system
memory, but system has lot of places where class=memory is used and hence i
can't use it. i need the one's which has id=bank:0 .. n and collect the
decryption of it.

I don't have option to use lxml.






 Computer
 Satellite A100
 TOSHIBA
 PSB10U-SA10ES1
 [REMOVED]
 32
 
  
  
  
  
  
  
 
 
  SMBIOS version 2.31
  DMI version 2.31
  SMP specification v1.4
  Symmetric Multi-Processing
 
  
   Motherboard
   MPAD-MSAE Customer Reference Boards
   Intel Corporation
   0
   Not Applicable
   [REMOVED]

 BIOS
 Phoenix Technologies LTD
 0
 1.70 (05/11/2006)
 114400
 983040
 
  ISA bus
  PCI bus
  PCMCIA/PCCard
  Plug-and-Play
  Advanced Power Management
  BIOS EEPROM can be upgraded
  BIOS shadowing
  ESCD
  Booting from CD-ROM/DVD
  ACPI
  USB legacy emulation
  AGP
  BIOS boot specification
 


 CPU
 Genuine Intel(R) CPU   T1350  @ 1.86GHz
 Intel Corp.
 4
 cpu@0
 6.14.8
 [REMOVED]
 U1
 186700
 186700
 32
 
  boot processor
  mathematical co-processor
  FPU exceptions reporting
  
  virtual mode extensions
  debugging extensions
  page size extensions
  time stamp counter
  model-specific registers
  4GB+ memory addressing (Physical Address Extension)
  machine check exceptions
  compare and exchange 8-byte
  on-chip advanced programmable interrupt controller (APIC)
  memory type range registers
  page global enable
  machine check architecture
  conditional move instruction
  
  debug trace and EMON store MSRs
  thermal control (ACPI)
  multimedia extensions (MMX)
  fast floating point save/restore
  streaming SIMD extensions (SSE)
  streaming SIMD extensions (SSE2)
  self-snoop
  thermal interrupt and status
  pending break event
  
  
  
  
  
  
  
  
  
  
  
  CPU Frequency scaling
 
  
   L1 cache
   5
   L1 Cache
   16384
   16384
   
Asynchronous
Internal
Write-back
   
  
  
   L2 cache
   6
   L2 Cache
   2097152
   
Burst
External
Write-back
   
  


 System Memory
 12
 System board or motherboard
 2147483648
 2147483648
  
   SODIMM DDR Synchronous
   0
   M1
   1073741824
   32
  
  
   SODIMM DDR Synchronous
   1
   M2
   1073741824
   32
  


 Host bridge
 Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub
 Intel Corporation
 100
 pci@:00:00.0
 03
 32
 3300
 
  
 
 
  
 
  
   VGA compatible controller
   Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller
   Intel Corporation
   2
   pci@:00:02.0
   03
   32
   3300
   


   
   
Message Signalled Interrupts
Power Management
bus mastering
PCI capabilities listing
extension ROM
   
   





   
  
  
   Display controller
   Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller
   Intel Corporation
   2.1
   pci@:00:02.1
   03
   32
   3300
   

   
   
Power Management
bus mastering
PCI capabilities listing
   
   

   
  
  
   Audio device
   N10/ICH 7 Family High Definition Audio Controller
   Intel Corporation
   1b
   pci@:00:1b.0
   02
   64
   3300
   


   
   
Power Management
Message Signalled Interrupts
PCI Express
bus mastering
PCI capabilities listing
   
   


   
  
  
   PCI bridge
   N10/ICH 7 Family PCI Express Port 1
   Intel Corporation
   1c
   pci@:00:1c.0
   02
   32
   3300
   

   
   

PCI Express
Message Signalled Interrupts
Power Management
bus mastering
PCI capabilities listing
   
   




   
  
  
   PCI bridge
   N10/ICH 7 Family PCI Express Port 2
   Intel Corporation
   1c.1
   pci@:00:1c.1
   02
   32
   3300
   

   
   

PCI Express
Message Signalled Interrupts
Power Management
bus mastering
PCI capabilities listing
   
   




   
  
  
 

Varable parsing error with python

2015-02-09 Thread OmPs
In an XML file which contain a tag and then these tags contain properties,
which later are being called in anoter tag where these properties are
expanded as variables.

For eg.









  

 1.0

  







 1.2

  Red Hat Enterprise Linux Server 5 X86_64

  testsapppath









 my testapp area

 ${APPVERSION}





So now i have written a python program whcih is parsing this program, so
what i am doing in here is reading this xml file



with open(filename, "r") as f:

orig_xml = f.read()

#unescape html characters like %20

xmlstring = urllib.unquote(orig_xml)

#convert xml to dict

doc = xmltodict.parse(xmlstring)

#replace property values in xml string via instancename

s = Template(xmlstring)

#iterate over instances/ match the one we need

for i in doc.get("application").get("instance", None):

#when found

# s/r properties in xml and then convert it back to dict

try:

if i.get("@name", None) == instancename:

try:

instance_property = dict(i.get("property"))

final_string = s.safe_substitute(instance_property)

final_dict = xmltodict.parse(final_string)

except TypeError:

final_dict = doc

# Handle strings in case of dict, strings do not have get method.

except AttributeError:

final_dict = doc



and when i am trying to get the version no. using a function for getting
the package version



def _getPackgeVersion(xmlfile, p):

package = str(p)

if isinstance(fpmdict["application"]["package"], list):

for i in fpmdict["application"]["package"]:

if i["@name"] == p:

_pkgVersion = i["version"]

else:

_pkgversion = fpmdict["application"]["package"]["version"]

return _pkgVersion



pkgVersion = _getPackgeVersion(final_doc, testpackage)

print type(pkgVersion)



I am getting the below error


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Varable parsing error with python

2015-02-10 Thread OmPs
On 10 Feb 2015 13:12, "Chris Angelico"  wrote:
>
> On Tue, Feb 10, 2015 at 6:30 PM, OmPs  wrote:
> > def _getPackgeVersion(xmlfile, p):
> > package = str(p)
> > if isinstance(fpmdict["application"]["package"], list):
> > for i in fpmdict["application"]["package"]:
> > if i["@name"] == p:
> > _pkgVersion = i["version"]
> > else:
> > _pkgversion = fpmdict["application"]["package"]["version"]
> > return _pkgVersion
>
> One of your branches doesn't have a return statement in it, so Python
> just returns None. You may want to unindent that return statement one
> level.
>
Tried that as well getting the same error.
> ChrisA
> --
> https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Varable parsing error with python

2015-02-10 Thread OmPs
On 10 Feb 2015 13:59, "OmPs"  wrote:
>
>
> On 10 Feb 2015 13:12, "Chris Angelico"  wrote:
> >
> > On Tue, Feb 10, 2015 at 6:30 PM, OmPs  wrote:
> > > def _getPackgeVersion(xmlfile, p):
> > > package = str(p)
> > > if isinstance(fpmdict["application"]["package"], list):
> > > for i in fpmdict["application"]["package"]:
> > > if i["@name"] == p:
> > > _pkgVersion = i["version"]
> > > else:
> > > _pkgversion = fpmdict["application"]["package"]["version"]
> > > return _pkgVersion
> >
> > One of your branches doesn't have a return statement in it, so Python
> > just returns None. You may want to unindent that return statement one
> > level.
> >
> Tried that as well getting the same error.

I feel its something to do with variable substitution.

> > ChrisA
> > --
> > https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


Parsing data from text file to python

2015-08-09 Thread OmPs
Hi All,

Please accept my apologies, if this similar question has been asked
earlier, I tried to search over the stack network and googled but couldn't
find relevant information, partly may be because I may not be able to
search effectively.

I have built a contact form which sends me email for every user
registration My question is more related to parsing some text data into csv
format. and I have received multiple users information in my mail box which
I had copied into a text file. The data looks like below.

Name: testuser2
Email: testus...@gmail.com
Cluster Name: o  b
Contact No.: 12346971239
Coming: Yes

Name: testuser3
Email: testus...@gmail.com
Cluster Name: Mediternea
Contact No.: 9121319107
Coming: Yes

Name: testuser4
Email: tus...@yahoo.com
Cluster Name: Mediterranea
Contact No.: 7892174896
Coming: Yes

Name: tuser5
Email: tusern...@gmail.com
Cluster Name: River Retreat A
Contact No.: 7583450912
Coming: Yes
Members Participating: 2

Name: Test User
Email: testu...@yahoo.co.in
Cluster Name: RD
Contact No.: 09833123445
Coming: Yes
Members Participating: 2


As can see the data contains some common fields and some fields which are
not present, I am looking for solution/suggestion on how I can parse this
data so under the heading Name, I will collect the name information under
that column, and similarly for other, the data with title "Members
Participating" I can just pick the nos and add it into excel sheet under
the same heading, incase for the user this information is not present, it
can just go blank.

Stackoverflow link to this question:
http://stackoverflow.com/questions/31911191/parsing-data-from-text-file-to-python


Regards,
Om Prakash Singh
Live Curious
-- 
https://mail.python.org/mailman/listinfo/python-list


error while installing using pip.

2015-09-20 Thread OmPs
Hi all,

I am getting the below error while I am trying to install atfork package
from pip repositories. I have done a thorough google search but am not able
to find and appropriate solution for it.Installation of SSL packages and
ssl package from python too do not solve the mystry.

# pip install --allow-external atfork atforkCollecting atfork
  Could not find a version that satisfies the requirement atfork (from
versions: )
  Some insecure and unverifiable files were ignored (use --allow-unverified
atfork to allow).
No matching distribution found for atfork


It says no matching distribution, but at pypi repo I am able to see it.

https://pypi.python.org/pypi/atfork/0.1.2
-- 
https://mail.python.org/mailman/listinfo/python-list